Plan: The paths that end early — a report screened out, an investigation that finds nothing, a family served at home

Status

In progress

Closes: #3249.
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), #3236 (the outcomes still to walk), #3248 (the case page’s Close button), #3250 (the closure reason), #1693 (Georgia’s binding screening admissibility).
Tree: written against branch chore/pin-georgia-journey-bindings at 59102ca89 (main 5127aa9c4 plus the re-entry journey’s two steps and the Georgia pin, which are on the merge train).
Maintainer (2026-12-04, question 6): the next plan is the paths that end early.
Maintainer (2026-12-04, question 7): a case with no removal closes as services_completed, a new closure reason; #3248 is fixed with it; the in-home walk closes its case.

Erratum (2026-12-04): of D1. The generated API page does not move with the enum: it names the ClosureReason schema on the case update and lists none of its values, so cargo xtask api-docs writes the same page. The OpenAPI document and its pinned digest do move.

Context

Most reports do not lead to foster care. They end at one of three places, and the lifecycle battery reaches none of them as a family’s story:

  • At screening. A screening decision states a disposition, the facts the screener attests and a rationale (POST /v1/cases/reports/{id}/screening-decisions, services/craig-cases/src/api/reports/decisions.rs). Georgia’s dispositions are screened_in, screened_out, screened_out_and_referred and i_and_r, and only the first converts to a referral (metadata.screening of target/config/layers/georgia/georgia-intake-screening.json): converting any other is refused 400 naming disposition_kind (validate_convertible, services/craig-cases/src/screening_surface_client.rs). A report has one effective decision: a second that does not name the first is refused 409 (refuse_concurrent_leaf, decisions.rs). A decision is superseded by a worker of the same role or of a role the ruleset’s override_authority names; anyone else is refused 403 screening-override-not-authorized (validate_override_authority), and a decision that already has a successor is not superseded again (409). A decision may carry follow-up actions (services/craig-cases/src/api/reports/follow_ups.rs). The reporter can ask what became of the report (GET /public/v1/reports/{id}/status, services/craig-intake/src/api/public.rs): the answer is pending, or the effective decision’s disposition (services/craig-intake/src/sink/cases_forwarder.rs).

  • At the investigation. An investigation moves from open to pending review to closed, or straight to closed (services/craig-cases/src/transitions.rs), and a close needs a disposition and nothing else (services/craig-cases/src/api/investigations/crud.rs). The dispositions are substantiated, indicated, the two alternative-response ones, unsubstantiated, unsubstantiated_false_report and closed_no_finding (Disposition, crates/craig-reference/src/enums.rs). The first contact is recorded on the investigation and its timeliness is read against the derived due time. A safety assessment may be recorded (services/craig-cases/src/api/investigations/safety.rs).

  • At home. A case opens from an investigation of any disposition, or from none (resolve_referral_id, services/craig-cases/src/api/cases/crud.rs), and holds a plan with tasks (services/craig-cases/src/api/case_plans/tasks.rs) and contacts (services/craig-cases/src/api/contacts.rs) whether or not a child is ever removed. Nothing marks a case as in-home; it is one with no custody episode.

Three specs touch these as flows on a fixture, none as a family’s story: tests/e2e/specs/intake-review.spec.ts screens a report out on the page and reads its public status; journey-investigation-pending-review-close.spec.ts assesses safety, closes an investigation as unsubstantiated, and holds the refusals of a backward move and of a close with no disposition; journey-case-close-refuses-mutation.spec.ts closes a case that never had custody. Georgia’s pack states two screening rows that no test is bound to (georgia.screening.supervisor-supersedes-cicc and georgia.screening.non-convertible-refusal, the layer’s scenarios/screening.toml).

The third path cannot end truthfully. A case closes with one of seven reasons: reunification, adoption, guardianship, emancipation, transfer, aging out, death (ClosureReason, crates/craig-reference/src/enums.rs; chk_cases_closure_reason, services/craig-cases/migrations/20260305200000_reference_data_validation.sql). None describes a family whose services ended with the child never removed. And the worker’s page does not ask: the Summary tab’s Close button sends closure_reason=reunification as a hidden field (services/craig-web/templates/cases/_tab_summary.html), and the handler passes the form on as it came (update, services/craig-web/src/routes/cases/detail.rs), so every case closed on the page is recorded as a reunification (#3248). The spec above closes its no-custody case as a reunification too, through the API.

Scope

In: the closure reason and the close form (D1), the library (D2), the three journeys (D3 to D5) and their corpus rows (D6).

Out, each filed as an issue at the close unless it already has one:

  • Other ways a case with no removal ends (the family declined services; the family moved). One reason is added here; the rest of that vocabulary, and whether it belongs to the jurisdiction, is a ruling.

  • Whether a closure reason should be checked against the case’s history. A reunification for a case that never held custody is accepted today, and services_completed for one that did will be.

  • Whether craig-cases should refuse a close that states no reason. It accepts one today, and craig-reporting raises a data-quality issue for the event afterwards (services/craig-reporting/src/main.rs).

  • What must exist before an investigation closes. Today only a disposition: no finding on its allegations, no safety assessment, no review.

  • Georgia’s screening admissibility, which admits any proposed disposition until #1693. The walk’s screen-out is one its attested facts support.

  • A screened-out report’s retention. Nothing expunges or ages one.

  • What Georgia’s court-reporting interface is told of an investigation (case.intake_created and case.investigation_closed are its triggers). It is still a mock; a simulator for it is its own plan (rule R1).

A defect a 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. A case with no removal can be closed for what happened (product change)

The reason. ClosureReason gains ServicesCompleted (services_completed): the case closed with the family’s services ended and no child removed. A migration replaces chk_cases_closure_reason with one that admits it. craig-cases takes it wherever it takes a closure reason today, and case.closed carries it. The OpenAPI document, its pinned digest (the openapi.sha256 golden of services/craig-cases/tests/api/ledger_lift_golden.rs) and the generated API page (cargo xtask api-docs) move with the enum. No reason is renamed or removed, and nothing checks the reason against the case’s history (Scope).

The form (#3248). The Summary tab’s close form asks for the reason: a required choice among every ClosureReason, labelled as the tab already labels a stored reason, with none chosen until the worker chooses. The hidden reunification goes. craig-web’s handler refuses a close that states no reason, with the page’s error message and no call to craig-cases; any other update goes on as it does today.

These are two changes under two issues: the reason is a feat: filed at approval (#3250); the form is #3248.

D2. The library

In tests/e2e/lib/given/, each replaying the real endpoint as a named actor:

  • givenScreeningDecision (referral.ts): a decision of any disposition with the facts attested, optionally superseding another. givenScreenedInReferral keeps its behaviour and is built on it.

  • givenFollowUp (referral.ts): a follow-up action on a decision.

  • givenInvestigationClosed (outcome.ts): an allegation with the finding given, then the investigation’s close with that disposition, through pending review when asked. givenSubstantiatedClose becomes the substantiated case of it.

  • givenFirstContact and givenSafetyAssessment (outcome.ts): the first contact’s instant; a safety assessment that answers every fact of the jurisdiction’s safety surface.

  • givenPlanTask and givenTaskCompleted (plan.ts), givenContact (case.ts): a task of a plan, its completion, and a contact with the family (a visit names the child it saw).

  • givenCaseClosed takes services_completed.

tests/e2e/specs/given-builders.spec.ts gains a test, "the early-ending builders converge on re-entry", that enters each twice and reads one row of each back.

D3. A report that ends at screening

Spec tests/e2e/specs/journey-lifecycle-screened-out.spec.ts, test.describe('Journey: a report that ends at screening'), in the journey project.

Main test, "a report about someone who is not the child’s caregiver is screened out and referred". A neighbour reports a child through the public edge. The intake worker (bob.smith, Georgia’s cicc_intake) attests the facts, among them that the alleged maltreater is not in a caregiving role, which Georgia’s ruleset screens out with a referral to law enforcement. The worker records screened_out_and_referred and a follow-up action, le_assistance. It asserts:

  • non_convertible_disposition_never_converts: converting the report is refused 400 naming disposition_kind, and no referral names the report as its source;

  • one_effective_decision_per_report: a second decision that does not name the first is refused 409, and the report’s effective disposition is still the first;

  • follow_up_stays_with_its_decision: the follow-up reads back under the decision;

  • reporter_is_told_the_outcome: the public status route answers pending before the decision and the disposition after it.

Second test, "a supervisor overrules a screen-out, and an intake worker cannot overrule the supervisor". The intake worker screens a report out; a supervisor (jane.doe, cicc_supervisor) supersedes that decision with screened_in; the report converts. It asserts supersession_follows_the_rulesets_authority: the superseding decision is the effective one and the referral names it as its authorizing decision; the intake worker’s attempt to supersede the supervisor’s decision is refused 403 screening-override-not-authorized; and a second supersession of the first decision is refused 409. The referral, the last thing the test makes, is left as it is.

D4. An investigation that finds nothing

Spec tests/e2e/specs/journey-lifecycle-unsubstantiated.spec.ts, test.describe('Journey: an investigation that finds nothing'), one test: "a screened-in report is investigated, found unsubstantiated and closed without a case". A report is screened in and converted; an investigation opens with its derived response time; the investigator makes the child’s record and links the report’s entry to it, records the first contact, records a safety assessment that finds the child safe, records the allegation’s finding as unsubstantiated, sends the investigation to review and closes it as unsubstantiated. No case is opened. It asserts:

  • first_contact_meets_the_response_time: the investigation reads on_track before the contact and met after;

  • unsubstantiated_close_records_the_finding: the investigation is closed as unsubstantiated with its closing instant, the allegation carries the same finding, and the safety assessment its decision, SAFE;

  • unfounded_report_stays_in_the_childs_history: the child has no case, and the child’s family chain page (services/craig-web/templates/cases/person_chain.html) links the report, the referral and the investigation and nothing else.

The refusals of an investigation’s backward moves and of a close with no disposition stay with journey-investigation-pending-review-close.spec.ts.

D5. A family served at home

Spec tests/e2e/specs/journey-lifecycle-in-home.spec.ts, test.describe('Journey: a family served at home'), one test: "a substantiated report is worked at home and the case closes with no removal". A report is substantiated and a case opens with the child, who has a GTID and is a student the education agency knows. The worker approves a case plan with a task, records home visits that name the child, completes the task, and closes the case as services_completed. It asserts:

  • in_home_case_holds_no_removal: at the close the child has no custody episode, no removal episode and no payment;

  • medicaid_application_needs_custody: an Initial Medicaid Application for the child is refused 409 custody-not-open (services/craig-cases/src/api/ledgers/medicaid_application_acts.rs);

  • plan_and_visits_belong_to_the_case: the plan, its completed task and the visits read back under the case, each visit naming the child;

  • case_closed_terminal_with_event: the case is closed as services_completed, refuses a reopen, and case.closed reaches the audit trail with that reason; the Summary tab shows the worker the reason.

The walk’s last act reads the education agency: it does not list the child and CRAIG has sent it nothing (Georgia’s doe_lists_child_only_in_custody, for a child who is never in custody). The walk asks for the doe fixture (tests/e2e/lib/doe-education.ts). This is a check at one moment. No act of the walk can tell it that craig-exchange has finished with the child’s events, since nothing is sent for it to wait on.

D6. The corpus rows

Three rows, each tier t1-core, level journey, with one e2e-spec binding to its spec’s describe:

  • core.intake.report-ends-at-screening, the five oracles of D3, in compliance/scenario-inventory/intake.toml;

  • core.investigation.unsubstantiated-without-a-case, the three of D4, in investigation.toml;

  • core.case.in-home-services-close, the four of D5, in case.toml.

Every oracle is store-only except first_contact_meets_the_response_time and in_home_case_holds_no_removal (none). Each main test writes its JourneyLedger record; the in-home walk tracks its case, child and plan. compliance/scenario-coverage.lock is re-blessed with cargo xtask scenarios audit --bless. Georgia’s two screening rows and its education oracle are Georgia’s to bind; its agent is briefed at the close.

Steps

Each step is one MR with its tests, docs and changelog fragment.

  1. The closure reason (D1, the feat: issue).

  2. The close form (D1, #3248).

  3. The library (D2), with the given-builders spec.

  4. The screened-out journey (D3) and its row.

  5. The unsubstantiated journey (D4) and its row.

  6. The in-home journey (D5), its row, and the close.

Risks

  • The new reason reaches a database whose CHECK does not admit it — fail-closed: the constraint refuses the close and nothing is stored. Mitigation: the migration ships with the enum in step 1, and a store test closes a case with every ClosureReason.

  • A reader of closure_reason holds its own list of reasons and drops or rejects the new one — silent. Mitigation: step 1’s MR names every reader (craig-reporting’s data-quality check, the audit trail, craig-web, the CLI) with what it does with the new reason; the in-home journey reads the audit record with it.

  • The form’s fix still lets a close through with no reason (a browser that does not enforce required) — fail-closed: craig-web’s handler refuses it before calling craig-cases, and a route test posts one.

  • A walk passes while asserting less than it says — silent. Mitigation: every oracle is asserted on a value the walk produced; before each journey merges, each of its oracles is shown to fail by one planted change to the walk, and the list is in the MR.

  • A walk finds a defect in screening, the investigation or the case — 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.

  • The education agency is sent something about a child who was never in custody — silent in the product if it happens, and a send that came after the walk’s one check would pass it. Mitigation: the check is the walk’s last act, after the case’s close has reached the audit trail; the planted change for this beat takes the child into custody and must fail the check, which shows a listing arrives inside the walk’s length; the order of a GTID and a custody at the trigger is held by craig-exchange’s own leg tests (services/craig-exchange/src/triggers/doe_legs_tests.rs). A send is a finding with its own fix: issue.

  • 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 each status act reads first, so acts replay, and a refusal asked again is refused again. Two beats assert the state before an act: the reporter’s pending before the decision (D3’s main test) and on_track before the first contact (D4). A walk retried after that act fails that beat, as the other journeys' walks do past their outcome: it is red, never a false pass. D3’s second test and D5 assert final states and converge from any point.

Tests

  • Journey: the two tests of D3, the one of D4, the one of D5.

  • Builders: "the early-ending builders converge on re-entry", in the given-builders spec.

  • Contract: the OpenAPI document and its pinned digest carry services_completed; a wire test round-trips the reason through PUT /v1/cases/cases/{id} and the read.

  • Store: a case closes with each ClosureReason, and a reason outside the list is refused by the migrated constraint.

  • Regression: the test that would have caught #3248: a case closed on the page with a reason other than reunification reads back with that reason (tests/e2e/specs/cases.spec.ts); and craig-web route tests that the form offers every reason with none preselected, and that a close stating no reason calls nothing.

  • Planted defects: evidence in each journey’s MR; the battery keeps no test for them.

  • Concurrency: none; no new write path.

Delivery

  • Canonical pages: docs/modules/ROOT/pages/data-model-cases.adoc for the closure reason; docs/modules/ROOT/pages/testing-reference.adoc, the sections "Lifecycle journeys (#3187)" and "The journey "given" library (#666, B2)", for the journeys and the builders.

  • CHANGELOG entry: one changelog.d/<issue>.<slug>.<kind>.adoc fragment per step; step 1’s says the wire gained an enum value, step 2’s that the page no longer records a reason the worker did not choose.

  • The close: step 6’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 bindings; a note goes on epic &124.

Edit this page · latest