Plan: The guardianship journey — one family from a report to a subsidized guardianship with a relative
Status
Done (2026-12-04) — the battery walks a third family to its outcome: from a maltreatment report to a relative’s guardianship, with the relative paid the Enhanced Relative Rate from the placement’s first day, the handoff to subsidized guardianship made on the day the court granted it, each month paid once across it, and the case closed for guardianship; a second test shows Georgia’s six-month residence floor.
Closes: #3237.
Epic: &124. Relates to: #3187 (the programme; its rules R1 to R6 are in
docs/modules/ROOT/pages/plans/archive/lifecycle-journeys.adoc and bind this plan), #3230 (the adoption journey),
#3236 (the outcomes still to walk), #3231, #1073. Tree: written against main at c45339706 with #3230’s last
step on the train.
Maintainer (2026-12-04, question 2): the next plan is a third outcome, guardianship with its subsidy.
Maintainer (2026-12-04, question 3): the relative receives ERR while the child is in care, and the walk goes
through the handoff to subsidized guardianship.
Erratum (2026-12-04): of D2. The builders' re-entry test also asks for two generations at once and asserts what they pay, so generateCurrentMonth is exercised in the step it lands in, with the 409 job-already-active it waits out when another generation of the month is under way; the list of payment-reading specs the Risks promise for step 2 is in step 1’s MR. Two small exports the section did not name are added beside their kin: the legal-status token GUARDIANSHIP_GRANTED (NGP) in custody.ts, and dayOfMonthBack beside monthStartBack in backpay.ts.
Erratum (2026-12-04): of the Risks bullet on a retried walk. The walk can be re-walked under one run id only up to the handoff, which is earlier than its outcome: its first-generation beat asserts the ERR’s nine payments as they stood before the guardianship, and after the handoff a generation voids one of them. A retry converges when the first attempt stopped before the handoff, which was shown by a first attempt made to fail after the first generation.
Erratum (2026-12-04): at the close. Issues filed for what Scope left out: #3238 (what a guardianship exit does to the ERR and the pending SG), #3239 (a court order for a guardianship, and the activation’s evidence), #3240 (the exit’s adoptive-parent fields also hold a guardian), #3241 (typed refusals for an SG activation); the approval clock is noted on #1073, the relative placement’s per-diem stays with #3231 and the outcomes still to walk with #3236. Georgia’s agent binds its education oracle to this spec and the adoption spec, and writes its subsidy row, once the spec is on main; the pin that takes that commit is #3242.
Context
The battery walks two families to an outcome, reunification and adoption
(tests/e2e/specs/journey-lifecycle-reunification.spec.ts, journey-lifecycle-adoption.spec.ts). Neither meets a
subsidy. Two specs do, and neither starts from a family:
-
tests/e2e/specs/subsidies-guardianship.spec.tsdrives the handoff on the county director’s pages, over a seeded placement and its seeded ERR: the pending agreement, the placement’s end for guardianship, the refusals of a premature activation and of an activation beside an open ERR, the ERR’s termination, and the activation with its transfer day and the month its payments begin. It stops there. No payment is generated, and the transfer is dated yesterday, so the guardianship subsidy could not pay yet. -
tests/e2e/specs/journey-subsidy-generator-month-emission.spec.tsgenerates one month for a seeded agreement, under a seed variant.
No test shows what a relative is paid, month by month, from the placement through the handoff, or closes the case of a child who left care to a guardian.
The product can be driven along that path through its APIs today:
-
The relative placement.
givenKinshipPlacement(tests/e2e/lib/given/placement.ts) places a child in afoster_family_homeflaggedrelative_foster_family_homewith no licensed home; craig-placement mints a kinship household, andgivenCaregiverBindingbinds a caregiver to it from a stated day. Under Georgia’s layer the placement bills thekinshiprate class, which has no rate, so it gets no per-diem. -
ERR.
POST /v1/financial/subsidy-agreementswithprogram: errenrols an active agreement whose coverage starts on the placement’s first day (services/craig-financial/src/api/subsidy_create.rs,subsidy/store/create.rs). The placement must be active, and a relative or kin home that is not licensed; each party must hold a caregiver binding today; the child must have no live per-diem beginning in the coverage (perdiem_beginning_between,subsidy/store/handoff.rs). The act is the county director’s. An approval clock of 120 days from the placement’s start is reported and refuses nothing (approval_clock_overdue,api/subsidy_shared.rs). -
Subsidized guardianship (SG). The same route with
program: sgcreates a pending agreement, signed on the day the body states (api/subsidy_create_guardianship.rs).POST …/{id}/activateactivates it (api/subsidy_activate.rs,subsidy/store/activation.rs) once the placement has ended and the removal episode has exited to guardianship on the day the relative’s residence ended (subsidy/guardianship_witness.rs), the child’s permanency plan on that day is not reunification (subsidy/plan_check.rs), the agreement was signed before that day, the residence began at least six months before it (guardianship_residence_months = 6, Georgia’sbundle/subsidy_policy.toml), each party held a caregiver binding on that day, and the child has no other open agreement. Its payments begin the month after the transfer. -
The handoff. An active ERR blocks the SG’s activation (409
conflict).POST …/{id}/transitionswithto_status: terminatedandreason_code: guardianship_finalized, dated the exit day, ends the ERR (api/subsidy_mutations.rs; the Rust testguardianship_finalized_terminates_the_anchored_err_over_http,services/craig-financial/tests/api/sg_activate_api.rs). Nothing does this by itself: craig-financial’s consumer of the exit only logs (inbox/guardianship_warns.rs). -
The payments. An agreement’s payable months are queued when it is enrolled and whenever its active coverage changes (
enqueue_reconcile_months,subsidy/store/transition.rs). A generation run pays its month for every agreement and then drains that queue (generate_for_month,subsidy/generator.rs): the month an ERR begins is prorated by days (prorate_first_month,subsidy/policy.rs), a month whose first day finds the agreement active is whole, a month that expects no payment has its undisbursed row voided, and an SG month before its payments begin is skipped. The service runs one for the current month when it starts and every hour (workers/schedulers.rs);POST /v1/financial/subsidy-payments/generateenqueues one as a job (api/subsidy_generation.rs). -
The exit and the close. The removal episode exits as
guardianship, naming the guardian in the exit’s answers; custody closes under Georgia’sNGP(Guardianship); the case closes withclosure_reason: guardianship.
Scope
In: the builders and the shared generation helper (D2), the journey (D1), its refusal test (D3), its education beat (D4) and its corpus row (D5).
Out, each filed as an issue at the close unless it already has one:
-
An automatic handoff: the exit to guardianship neither ends the ERR nor activates the SG.
-
A court order for the guardianship, and its evidence: activation takes an unverified document key.
-
The exit names a guardian in fields called adoptive parents.
-
The refusals of an SG activation are untyped 400s, told apart only by their text.
-
What the 120-day approval clock should do to an ERR that outlives it. It is report-only today, so the walk’s ERR reads overdue from the day it is enrolled; #1073 holds the open policy confirmations.
-
Whether a relative placement should be paid a per-diem (#3231 records how that would collide with ERR).
-
Non-relative subsidized guardianship, the closed cohorts, reviews after activation, and a controllable clock (#3236).
A defect the walk finds in a service is a fix: issue with its own branch and tests; the walk is then written to
the corrected behaviour.
Design
D1. The story
Spec tests/e2e/specs/journey-lifecycle-guardianship.spec.ts, test.describe('Journey: a report to guardianship'),
in the journey project. Its main test is "a substantiated report ends with a relative’s subsidized
guardianship". Business dates are backdated, as the other journeys' are, and are fixed by calendar month, so the
rules about months hold whatever today’s day is: M is the current month, and each day used is between the 5th
and the 20th, which every month has (monthStartBack, tests/e2e/lib/given/backpay.ts, gives a month’s first).
The acts, in the order the walk makes them. The date is the business date each act states.
| Dated | Act |
|---|---|
the 5th of M−8 |
Report, screened-in referral, investigation, substantiated close, a case with the victim as its child. The
child is a student the education agency knows (D4). Custody opens as |
the 6th of M−8 |
The child is placed with a grandmother: a relative placement in a kinship household, the grandmother bound as its caregiver from that day. |
today |
The county director enrols the grandmother in ERR on the placement, at 465.00 a month. First generation. |
the 15th of M−3 |
The permanency goal becomes |
the 20th of M−2 |
The grandmother signs a subsidized guardianship agreement at 500.00 a month; the county director records it, pending. |
the 10th of M−1 |
The court grants guardianship. The placement ends ( |
So the guardianship is recorded after this month’s ERR payment was generated, which is how a court’s order
usually reaches the record, and the second generation has to correct it. Every act is a builder (rule R6). A
generation is the route’s job for the current month, polled to its end. The walk reads one worker page: the SG
agreement’s page shows its transfer day and the month its payments begin (guardianship-transfer-on,
guardianship-payments-begin, services/craig-web/templates/financial/subsidy_agreement_detail.html).
The main test asserts, through the service that owns each fact. The first three are Georgia’s subsidy policy; the last four are the product’s own (D5).
-
err_pays_from_the_placement_start: after the first generation the child’s live payments are nine, all the ERR’s: the placement’s month from the 6th to its end, priced at the monthly amount times the days covered over the days of that month, rounded to cents; then each month through M whole. Each issubsidy_err, pending, and names the agreement and no placement. The child has no per-diem. -
handoff_pays_each_month_once: after the second generation the ERR’s payment for M is voided and its payment for M−1 stands, whole; the SG has one payment, for M, whole,subsidy_sg, pending; and from M−8 through M the child has exactly one live subsidy payment a month. -
guardianship_activation_takes_the_exit_day: the SG is active withguardianship_transfer_onthe exit’s day andpayments_begin_monththe first of M; the ERR’s open interval isterminated, reasonguardianship_finalized, from that day. -
guardianship_exit_names_the_guardian: the episode’s exit readsguardianshipat noon of the 10th of M−1, with the grandmother as the first guardian andrelationship_relatives: applies. -
custody_closes_on_exit_date: the custody episode’scustody_untilis the exit’s day, and the latest legal status is not in custody, under the token the walk closed with. -
case_closed_terminal_with_event: the case is closed withguardianship, a reopen is refused, andcase.closedreaches the audit trail with that reason. The SG agreement still reads active afterwards. -
cross_service_refs_resolve: the placement names the case, the child, the kinship household and the episode; both agreements name the child and the placement; each payment names its agreement.
The monthly amount is chosen so that no month length puts the prorated amount on a half cent: 465.00 over 28, 29, 30 and 31 days from the 6th gives 381.96, 384.83, 387.50 and 390.00.
D2. Builders and the generation helper
In tests/e2e/lib/given/subsidy.ts, each replaying the real endpoint under the library’s request-id rule:
-
givenErrAgreementtakes an optionalcaregiverFrom, the first day of the caregiver binding it makes, so the binding can begin at the placement’s start. The SG’s activation reads the binding as of the exit day, and a second binding of the same person from another day is refused. -
givenPendingSgAgreement(given, { placement, caregiver, signedAt, monthlyAmount? }): the SG create. -
givenErrEndedForGuardianship(given, { agreement, on }): theguardianship_finalizedtransition under the agreement’s open interval. It reads first and skips the write when the agreement is already terminated, since a transition that has happened is a refusal and not a replay. -
givenSgActivated(given, { agreement }): the activation under the agreement’s pending interval, read first for the same reason. -
readAgreement(given, id): the agreement’s detail.
In tests/e2e/lib/subsidy-generation.ts (new): generateCurrentMonth(given) posts the generate route with no
month under a fresh request id, polls the job to its end and answers its report; waitForJob moves there from
journey-subsidy-generator-month-emission.spec.ts, which imports it.
In tests/e2e/lib/lifecycle-walk.ts: expectDelisted (the agency no longer lists the child, and the listing
send and doe_slds.custody_closed are the only two sends) moves there unchanged from
journey-lifecycle-adoption.spec.ts, which imports it, so the two walks assert the delisting the same way.
tests/e2e/specs/given-builders.spec.ts gains a test, "the guardianship builders converge on re-entry", that
enters each new builder twice on the way to an activated SG and reads one of everything at the end.
D3. The six months
The refusals of the handoff’s order (a premature activation, an activation beside an open ERR) are held on the
worker’s pages by subsidies-guardianship.spec.ts and are not repeated. One rule no Playwright test holds is
Georgia’s residence floor, so the file’s second test is "a guardianship before six months with the relative is
not subsidized". A second family’s relative placement began on the 6th of M−3, the grandmother bound from that
day; she signed a pending SG on the 20th of M−2; the court granted guardianship on the 10th of M−1 (the placement
ended, the episode exited). Activating the SG is refused with 400, and the detail says the residence floor is not
met and names the residence’s first day, six months and the transfer day (ResidenceFloorShort,
services/craig-financial/src/subsidy/error.rs). The SG is still pending and the child has no payment. This
family has no ERR and no permanency plan, so the floor is the first rule the activation meets in the store.
D4. The education agency
The main walk asks for the doe fixture (tests/e2e/lib/doe-education.ts). The agency lists the child while the
child is in custody (expectListed) and drops the child when custody closes on the guardianship
(expectDelisted, D2): the sends are exactly the listing send and doe_slds.custody_closed. That is Georgia’s oracle
doe_lists_child_only_in_custody; binding the spec to it is Georgia’s change, briefed at the close.
D5. The corpus rows
core.permanency.report-to-guardianship in compliance/scenario-inventory/permanency.toml: tier t1-core,
level journey, the four oracles of D1 that hold whatever the jurisdiction (guardianship_exit_names_the_guardian
store-only, custody_closes_on_exit_date none, case_closed_terminal_with_event store-only,
cross_service_refs_resolve reconcile), one e2e-spec binding to the spec’s describe. The three subsidy
oracles are Georgia’s policy (its programs, its six months, the month after the transfer). The spec asserts them,
and they are stated as a row of Georgia’s pack beside its other subsidy rows, which Georgia’s agent writes and
binds once the spec is on main, as it did for the Medicaid referral; the pin that takes it is its own issue. The
spec records its footprint with JourneyLedger (tests/e2e/lib/journey.ts: cases, children, placements,
payments, agreements), so the post-journey sweep runs craig-financial’s subsidy invariants over the walk’s child
and its two agreements, multiple_subsidy_payments_same_child_month among them. The ledger is re-blessed with
cargo xtask scenarios audit --bless.
Steps
Each step is one MR with its tests, docs and changelog fragment.
-
The builders and the generation helper (D2), with the given-builders spec.
-
The journey and the close (D1, D3, D4, D5).
Risks
-
The walk meets a service that refuses an act the documented path allows, or allows one it should refuse (an ERR enrolled eight months into its placement; an exit dated a month back; a queue that does not pay the back months; an ERR payment for M that is not voided) — fail-closed for the plan: the step stops, the defect is a
fix:issue with its own MR and tests, and the walk is written to the corrected behaviour. Mitigation: D1’s oracles name the expected facts, so a difference is a finding recorded on the issue. -
The journey passes while asserting less than it says — silent. Mitigation: every oracle is asserted on a value the walk produced; before step 2 merges each of D1’s seven oracles is shown to fail by one planted change to the walk, and the list is in the MR.
-
A generation the walk asks for pays other tests' agreements — silent for those tests. Mitigation: the walk generates the current month only, which the service’s own scheduler does when it starts and every hour, so it pays nothing the scheduler would not; before step 2 merges, every spec that reads payments is listed in the MR with why an earlier drain does not reach its assertions, and one it does reach is changed to assert on its own rows.
-
The scheduler’s hourly run falls between two of the walk’s acts — silent (the ERR’s payment for M could be born, or voided, by a run the walk did not ask for). Mitigation: each oracle is asserted after a generation the walk itself ran to its end, on live rows and on the one voided row by its month, and a scheduler run in between leaves that state the same.
-
The walk straddles midnight at a month’s end, so the services' current month is no longer the walk’s M — fail-closed (the month assertions fail). Mitigation: the walk compares the month each generation reports with its own M and fails at once naming both.
-
A retried walk meets an act its first attempt completed — fail-closed. Mitigation: every act is a builder under the run’s request ids, and the two that are transitions read before they act; the builders' re-entry test enters each twice. As with the other journeys, a walk that has reached its outcome is not walked again under one run id.
-
Moving
waitForJoborexpectDelistedchanges the journey it came from — fail-closed. Mitigation: each move is textual; the adoption journey runs in the car’s battery and the generator journey in its seed-variant line.
Tests
-
Journey: the main test of D1 with the education beat of D4, and the test of D3.
-
Builders: "the guardianship builders converge on re-entry", in the given-builders spec.
-
Regression: the generator journey and the adoption journey (each after its helper’s move), the reunification journey and the subsidy specs (
tests/e2e/specs/subsidies-*.spec.ts) pass unchanged. -
Planted defects and the list of payment-reading specs: evidence in step 2’s MR; the battery keeps no test for them.
-
Contract, concurrency: none. No wire and no service code changes; a
fix:issue the walk raises carries its own.
Delivery
-
Canonical page:
docs/modules/ROOT/pages/testing-reference.adoc, the section "Lifecycle journeys (#3187)", gains the guardianship walk; the given-library section lists the new builders. -
CHANGELOG entry: one
changelog.d/<issue>.<slug>.changed.adocfragment per step. -
The close: step 2’s MR closes the issue. This page is archived with its Status; the issues under Scope are filed and named on the page; Georgia’s agent is briefed on its two bindings (the education oracle and its own subsidy row); a note goes on epic &124.