Plan: Identity-Based Placement Matching — Child Facts from the Authoritative Record (#972)

Archive record

Merge requests: !1608 (U0 plan page + ADR-073, Relates to #972) + !1609 (MR-1, Closes #1774) + !1611 (MR-2, Closes #1775) + !1612 (MR-3, Closes #1776 / #1779) + the close-out MR (MR-4, Closes #1777 / #972 / #1785)

2026-09-12 — GET /v1/placement/matching is a search FOR A CHILD: case_id + child_id (the attribute params deleted pre-1.0), the age / ICWA / sibling facts read synchronously from craig-cases' data-minimised placement-facts projection under the acting worker’s relayed credentials (ADR-073: no PII copy into placement, no event-fed replica, fail-closed and bounded at 4 s), the criteria decided by the tier-1 {j}-placement-eligibility v1.3 child_criteria tables (GA + TX; ICWA person OR case ⇒ require, siblings ≥ 2 ⇒ prefer, ⁂ #1073) and applied MECHANICALLY (require a WHERE arm, prefer a rank prefix) by the ONE consult that also answers the #1721 scope; both activation sites prove the same facts (a child leg with or without a home, CHILD_CRITERIA_VIOLATED naming the arm, re-checked under the home lock); craig-web’s case → child cascade, the CLI, the test-lib, the e2e and the placement / CLI / financial test corpora moved onto real cases. Follow-ups #1778–#1783.

Status

Done (2026-09-12) — !1608, !1609, !1611, !1612

Anchors

#972 (epic &94; children #1773 U0, #1774 MR-1, #1775 MR-2, #1776 MR-3, #1777 MR-4), ADR-073 (Proposed at U0), ADR-072 (tier doctrine — the child criteria are tier 1), ADR-068 (ceilings; Appendix A hop census), ADR-062 (replay precheck ordering), ADR-058 (rule_evaluations retention), the #1721 as-built (matching-scope, the one consult per search MR-3 extends), the #1107 / #1158 projection posture (data-minimised reads, never the whole PII row), #1660 / #1666 (the tier-1 waves on the orphaned {j}-placement-matching), follow-ups #1778 (retire sibling_placements), #1779 (CLI column drift fix:), #1780 (child care-needs facts + level-of-care criterion — the deferred #1666 RTC precedence), #1781 (ADR-068 Appendix A census refresh), #1783 (test(mq): the subscriber_shutdown session build trips the 15 s #1528 budget under battery load — surfaced by the MR-3 battery), ⁂ readings on #1073 (sibling count, ICWA carrier).

Context

GET /v1/placement/matching is attribute-based: the caller supplies child_age / icwa_required / sibling_group_size and MATCHING_FILTER_SQL (services/craig-placement/src/store/foster_homes.rs:534-538 after #1721) matches homes against those client-supplied values; #837 deleted the vestigial required child_id and named #972 as the identity-based redesign. For a CCWIS the match must be FOR A CHILD: the attributes come from the authoritative record (craig-cases persons + case household), never from the client, and the search is scoped by the child’s case assignment. The blocker named on #972 — cases owns the child, placement owns the search — is a cross-service consistency decision: ADR-073.

Design-shaping facts (the research map + #1721 validation on the issue) are ADR-073 § Context’s constraint list; the ones the units lean on: placements.child_id / case_id are UNVERIFIED bare UUIDs and placement holds NO cases client; the #1641 memo key (EligibilityFacts) carries home facts only; "the child’s case" is undefined without a case_id (case_household has no (case_id, person_id) uniqueness); persons.date_of_birth is BlindIndex ciphertext; ICWA has THREE worker-entered carriers; sibling structure = the case’s child-role household; person events are id-only; the financial→cases CasesClient has NO per-request .timeout; #1086 (admin-unit scoping) is open — no county scoping here.

Decisions (recorded in ADR-073)

  1. Identity wire. GET /v1/placement/matching?case_id=<uuid>&child_id=<uuid>[&page&per_page] — BOTH required (the create_placement shape). child_age / icwa_required / sibling_group_size are DELETED (pre-1.0; plan-lifecycle Q3 — no fallback, no dual-accept). per_page=0 keeps its shape (an EMPTY page with total: 0, no consult, no cases call — not a computed count). MatchingQuery gains deny_unknown_fields AND the handler takes Result<Query<MatchingQuery>, QueryRejection> (axum’s raw Query rejects as plain text; no wrapper exists in craig-common / craig-api) mapped to bad_request_typed(problem_types::STRUCTURAL_MISMATCH, rejection.body_text(), None) — the test asserts the problem type + application/problem+json, not just 400 — so a stale client’s attribute params are a typed 400.

  2. Authoritative facts = a cases-side PROJECTION, not the person row. services/craig-cases/src/api/placement_facts.rs: GET /v1/cases/cases/{case_id}/children/{child_id}/placement-facts?on=YYYY-MM-DD → craig_cases_contracts::PlacementFacts { age_years: u8, icwa_person: bool, icwa_case: bool, sibling_group_size: u32 } (BOTH ICWA carriers raw — the derivation is a cited ruleset row, decision 4; no cohort_revision: a closed projection carries only what the consumer reads). Handler order: deny_pure_service (ruling A = worker-attributed only) → get_case 404 → authz.check(case_resource_ref, Read) (the list_household shape) → clock rule (|on − BusinessClock::today()| > 1 day ⇒ typed 400 PLACEMENT_FACTS_CLOCK_DRIFT, field on) → list_household (active rows): the child must be a child-role member else typed 400 CHILD_NOT_IN_CASE (field child_id — the IVE_CHILD_NOT_IN_COHORT precedent; ApiError::NotFound has no typed constructor and is not grown here); sibling_group_size = count(DISTINCT person_id where role == child) (case_household permits duplicate (case_id, person_id) rows and the add path does not dedupe — the IV-E snapshot’s HashSet shape; a duplicate-membership test pins it); the DOB via the narrowed decrypt (dob_fields / age_in_years lifted to pub(crate) from ive_children.rs); a missing DOB, OR no age derivable at on (age_in_years is None when on precedes the DOB; a value outside u8 likewise) ⇒ the same typed 422 CHILD_DOB_MISSING (placement passes ITS business date — one clock per request). PlacementFactsQuery { on: NaiveDate } is deny_unknown_fields; the shared response struct is NOT (cases deploys first) — the closed wire shape is pinned by a strict local struct in the cases test. utoipa path + schema registered; a TYPED test-lib CasesClient::placement_facts (B7 counts untyped methods); route-to-client-method.toml regen.

  3. Scoping at the source: relayed acting worker (RULED 2026-09-10). Placement forwards the caller’s bearer (+ X-Craig-Actor) to the projection endpoint — the relayed_auth pair already lifted for rules — so cases evaluates the ACTING WORKER against the case with its existing case: read rows (caseworker → i_assigned; supervisor / admin; readonly allowed at cases but still 403 at the rules consult, as today — recorded). Placement keeps its FosterHome / List check as the entry gate. No new ResourceRef shape, no ruleset text change, no duplicated scoping logic in placement. Mechanics: relayed_auth lifts authorization VERBATIM (with Bearer `) — the client sets `.header(AUTHORIZATION, bearer) exactly as RulesClient::evaluate does, never .bearer_auth(); cases' auth layer needs aud ∋ craig-cases, which the BFF pair and the devstack craig-api client both already carry (a deployment precondition the ADR records). readonly performs one cases read and is then refused at the merged consult (recorded). Alternative B (a service-principal read + placement-side scoping): rejected, ADR-073 § Alternatives.

  4. ICWA source (RULED 2026-09-10: person OR case). child_criteria row: icwa_person == true OR icwa_case == true ⇒ icwa: require (an ICWA-compliant home is REQUIRED — the conservative reading of 25 USC §1915(b) placement preferences; good-cause departures are a worker act outside matching), cited in the row; recorded ⁂ on #1073 until DFCS names the authoritative carrier. referrals.icwa_flag is intake-time evidence and NOT an input.

  5. Sibling semantics (⁂). sibling_group_size = the count of ACTIVE child-role members of the case, INCLUDING the focus child. The criterion for ≥ 2 is prefer (sibling-capable homes rank first) — the reading the #1660 wave recorded: 42 USC §671(a)(31)(A) is a "reasonable efforts" duty, so "required" over-reads the statute; a jurisdiction that wants a hard bar flips the row’s token (require) with its own citation. role = 'sibling' rows and the dormant sibling_placements table are NOT consulted (#1778 retires the table). Recorded ⁂ on #1073.

  6. Child facts move into the ruleset NOW (RULED 2026-09-10) — as per-REQUEST child_criteria tables, not a per-home fact. {j}-placement-eligibility v1.3 (on the #1721 v1.2) gains FOUR first-hit tables merged at the output node, the as-built shape of license-gate / training-gate / matching-scope (one first-hit table per independent output — a single table would need a cross-product row set; collect is unused corpus-wide): child-age-band (input child.age_years → age_band), child-icwa (child.icwa_person, child.icwa_case → icwa; rows: person ⇒ require, case ⇒ require, neither ⇒ ignore — decision 4), child-sibling (child.sibling_group_size → sibling; >= 2 ⇒ prefer per decision 5, else ignore), child-matchability (→ child_refusal_reason, an OPEN vocabulary: none = matchable — Georgia’s one row; any other string is a jurisdiction’s reason, added as a row above it and relayed VERBATIM as the 409 detail). Output vocabulary require | prefer | ignore on the three mode keys (CLOSED); every row cited (§B); the Texas twin gets the same four nodes with 26 TAC / DFPS citations. Deferred, explicitly: #1666’s RTC-vs-ICWA precedence needs level-of-care facts (care-needs inputs) that PlacementFacts does not carry and a result the three modes cannot express (residential-treatment selection); it stays in the orphaned {j}-placement-matching ruleset — #1780, not a v1.3 row. ONE consult per request — it IS the #1721 scope consult: the facts-free ScopeProbe {} becomes MatchingProbe { child } ({ "child": { age_years, icwa_person, icwa_case, sibling_group_size } }); the same evaluate answers matching_scope_statuses AND the four child keys (the gates' keys on a child-only document are ignored — the #1721 test already proves zen tolerates missing inputs). ConsultContext::MatchingScope → MatchingRequest(child_id) = ("placement-matching-criteria", Some(child_id)) (the placement-matching-scope token retires, pre-1.0; the #1721 devstack pin matching_runs_at_least_one_scope_consult_per_search is re-pointed). Placement decodes ChildCriteria { age_band, icwa, sibling: CriterionMode, refusal: Option<String> } (parse_child_criteria beside parse_matching_scope; an unknown mode token, or a missing / non-string child_refusal_reason, ⇒ the named drift 500) and applies it MECHANICALLY: require ⇒ a WHERE arm of MATCHING_FILTER_SQL, prefer ⇒ a rank prefix of MATCHING_ORDER_SQL, ignore ⇒ neither; MATCHING_SCOPE_PREDICATE_SQL and the free-bed fact (current_occupancy < max_capacity — a SQL fact by the #1721 citation) are untouched; a child_refusal_reason ⇒ typed 409 CHILD_NOT_MATCHABLE (detail = the reason) BEFORE the candidate scan. Binding: MatchingCriteria { child_age, age_band, icwa, sibling } replaces MatchingFilters; $1 child_age (INT), $2 icwa_mode / $3 sibling_mode / $6 age_mode (TEXT mode tokens — today $2::BOOL / $3::INT, so MATCHING_FILTER_SQL changes), $4 today / $5 scope kept in place so the scope predicate + its byte pin stay identical (the tails shift: phase-1 limit → $7; phase-2 ids / limit / offset → $7 / $8 / $9); one bind_criteria for both phases; a new pin matching_criteria_are_bound_not_hard_coded. The per-home EligibilityFacts document and its memo (MAX_DISTINCT_TUPLES = 64) are UNTOUCHED — home×child compatibility varies PER HOME and would multiply every (license, training) tuple by up to eight (or by the fleet’s age-band variety), tripping the 503 cap on an ordinary search. Activation parity at BOTH activation sites, child leg SEPARATE from home leg (there is no /activate route): birth-active create_placement and planned → active update_placement run a child_validation step for EVERY activating transition — with or without a foster_home_id (today both paths skip the gate entirely when the home is None; a home-less active placement must still prove membership, DOB and matchability) — AFTER the ADR-062 replay precheck (a committed replay makes no S2S call) and only on the activating branch (planning stays ungated): fetch ChildFacts for the placement’s own (case_id, child_id) under the relay, run the merged consult (MatchingProbe { child } under MatchingRequest(child_id) when there is no home — no home owns the audit row; ActivationProbe { #[serde(flatten)] facts, child } under Activation(home_id) when there is), refuse child_refusal_reason (409 CHILD_NOT_MATCHABLE); then, ONLY when a home exists, the home leg: license → training → home_meets_child_criteria (409 CHILD_CRITERIA_VIOLATED, naming the arm and the home’s value) → capacity 400; the locked-row gate check_home_admits_activation re-runs home_meets_child_criteria on the locked home (pure in-memory; child facts are not re-derived under the lock — recorded). The orphaned {j}-placement-matching ruleset stays orphaned (its #1660 / #1666 fixes landed as the tier-1 waves; child_criteria lives in a different file). MR-3 is authored against the #1721 as-built.

  7. Failure posture: fail-closed, bounded. FactsError (thiserror: Transport, Unauthorized, Forbidden, NotFound, Refused{status, body}, Upstream, Malformed) folded by map_facts_error beside map_consult_error: timeout / transport / 5xx / 429 → typed 503 MATCHING_FACTS_UNAVAILABLE (the generic no-Retry-After #784 posture, naming the 4 s budget); Forbidden → forbidden_policy(problem_types::FORBIDDEN, detail) (403; ApiError::Forbidden carries no detail); the cases 400 / 422 (CHILD_NOT_IN_CASE / CHILD_DOB_MISSING / PLACEMENT_FACTS_CLOCK_DRIFT) re-emitted with the SAME type + status; Malformed / unknown type → the named 500 — but a timeout / transport error WHILE READING THE BODY stays Transport → 503 (do not copy the rules client’s blanket json() → Malformed fold). Never "degrade to attributes". Budgets (ADR-068 Standard 20 s, strict <): matching CASES_FACTS_BUDGET 4 s + RULES_CONSULT_BUDGET 4 s + MATCHING_CONSULT_BUDGET 8 s + MARGIN 2 s = 18 s (the const-assert extended; MATCHING_CONSULT_BUDGET stays 8 s); both activation routes 4 + 4 + 2 = 10 s; the tx statement timeout runs after the S2S legs (outside the asserted partition, as today; the ADR says so). per_page = 0 returns BEFORE the cases read (the #1721 observable: an empty page consults nothing and calls nothing; membership is not verified for it — recorded). ADR-068 Appendix A gains the placement → cases hop (4 s; synchronous depth 3 on a COLD authz cache — cases' authz.check may lazily load a missing ruleset over the rules HTTP client; placement’s own 4 s bound caps its wait).

  8. Plumbing. cases_base_url becomes a SHARED leaf on ServiceSettings (moved OUT of ExchangeSettings, same #[serde(default = "default_cases_base_url")], read as settings.cases_base_url by exchange AND placement; env names unchanged — CRAIG_EXCHANGECASES_BASE_URL / CRAIG_PLACEMENTCASES_BASE_URL): ServiceSettings flattens the five extension structs in order and serde hands a duplicated leaf to the FIRST struct that declares it, so a PlacementSettings.cases_base_url would silently keep its localhost default under a real env override and every container search would 503; the exchange pins move to the shared leaf and a NEW pin proves a non-default CRAIG_PLACEMENTCASES_BASE_URL reaches placement. services/craig-placement/src/cases_client.rs CasesClient { http, base_url } — relay only, NO service token, .timeout(CASES_FACTS_BUDGET) on the request (the financial precedent lacks one — an unwrapped call inherits the 30 s client total), send_with_metrics(.., "craig-placement", "craig-cases"); craig-cases-contracts added to placement’s Cargo.toml; wired in main.rs → build_router → api::routes → .layer(Extension(cases)) beside the rules layer; docker-compose.yml placement env CRAIG_PLACEMENTCASES_BASE_URL: http://craig-cases:8002 (+ the cluster compose); a contested-surfaces.toml s2s-client.craig-placement.cases entry (status = covered, anchor cases_client.rs::placement_facts, legs timeout / 5xx / malformed; the handler 503 fold recorded as the accepted gap, the financial precedent).

  9. Consumers move in the SAME MR as the wire (the battery’s e2e would break otherwise): the craig-web matching page becomes case → child (the htmx household cascade copied from routes/placement/placements.rs + new_placement.html; the age / ICWA inputs and the dead child_id text box go; with case_id / child_id ABSENT the BFF renders the form and calls nothing — the bare /placement/matching load the screenshot / a11y / placement specs make; with both present it calls the backend; the pagination extra carries &case_id=…&child_id=… so page 2 keeps the identity — an e2e multi-page search pins it), the web.ftl keys (i18n coverage test), the caseworker guide, CLI placement match --case-id --child-id (the dead --child-id-only shape and the phantom capacity / match_score columns go — the column drift is the pre-existing defect #1779, closed by MR-3 because the table is rewritten there), test-lib PlacementClient::search_matching typed, e2e placement.spec.ts + the placement-expiry.spec.ts URL loops onto ONE ?case_id=&child_id= from givenCase (its child is ~10 — a seeded child can be 19 and fall outside the specs' acceptsAges: [0, 18] band, failing the counter for the wrong reason), api pages regen, route-to-client-method.toml, CHANGELOG Changed (pre-1.0 BREAKING; names the placement-matching-scope → placement-matching-criteria token change) + Removed. Placement’s own test corpus moves too: every birth-active / planned→active leg today uses synthetic Uuid::now_v7() child / case ids across ~11 test files (placements, activation_provenance, activation_events, concurrent_transitions, license_gate_race, training_gate_race, service_row_tightening, create_assignment_authority, authz_recheck_race, request_claims_placement, replay_guards) and the ten tests/api/matching.rs calls pass only paging — all convert to given_case (a real case + child); the race tests must not let the extra S2S call widen their windows, and a NEW race leg changes the home’s age band / ICWA / sibling flag between the consult and the lock (the existing license / training races do not exercise the locked child check). Positive fixtures need compatible homes: both home builders leave the age band NULL (crates/craig-test-lib/src/given/placement.rs given_home; tests/e2e/lib/given/placement.ts givenHome), which age_band: require scopes OUT — the builders default to a wide band (accepts_ages 0–18) with the NULL band kept as an explicit option for the intentional NULL-band tests. Consumers outside placement’s tests move too: the CLI prerequisites (services/craig-cli/tests/cli/placement.rs create_prerequisites, tests/cli/financial.rs) create a case + person WITHOUT household membership — they gain the child-role membership; craig-financial’s tests that seed ACTIVE placements from synthetic case ids (subsidy_create.rs seed_placement_for, sg_create_api.rs, sg_activate_api.rs; with test-lib workflows.rs and the two CLI files, SIX files outside placement build placements) convert to given_case because the home-less activation gap is closed. This is the largest single cost in MR-3 and is budgeted in its weight.

  10. Consistency model (the ADR’s core, also answering #1688’s reverse-hop question): cross-service child facts are read SYNCHRONOUSLY at request time from a purpose-built, data-minimised projection endpoint owned by the authoritative service, under the acting worker’s relayed credentials, bounded and fail-closed; NO PII copy INTO PLACEMENT, NO event-fed replica (person events are id-only by design); the only placement-side cases replica stays case_assignments (assignment facts, not child facts). One retained data flow is recorded, not hidden: the merged consult sends the derived child facts (age in years, two ICWA booleans, a sibling count) with context_id = child_id (home_id for a with-home activation, unchanged), and craig-rules persists every evaluation’s input + context in rule_evaluations (archived whole under ADR-058’s evaluations class) — ADR-073 names this snapshot, its minimisation (no DOB, no name), its access (the rules admin surface, rule_evaluation authz) and its retention (the ADR-058 window). The reverse hop (cases ← placement history, #1688) follows the same rule when it lands.

Units — each Relates to #972; MR-4 Closes #972

MR Issue Scope W

U0

#1773

This page (Active nav), ADR-073 (Proposed) + the ADR-072 / ADR-068 pointers, epic &94 + child issues, the follow-ups #1778 / #1779 / #1780 / #1781 + the sibling-count and ICWA-carrier ⁂ on #1073; §B — the codebook / statute citation for every child_criteria row confirmed against the PAMMS + USC text

1

MR-1

#1774

craig-cases: the projection endpoint (contracts PlacementFacts with both ICWA carriers, route + case_resource_ref Read authz under the relayed worker, membership + DOB-narrowed decrypt + on clock rule, typed errors, api page, test-lib client method, tests incl. not-in-cohort / missing-DOB / clock-drift / authz-scoped / closed wire shape)

3

MR-2

#1775

Tier-1 content: {j}-placement-eligibility v1.3 Child Criteria tables (on v1.2) for GA + TX (every row cited per §B; cargo xtask rules check; the scenario-inventory rows + rules-side evaluation tests; the rules-side context_type token); merges on green pre-push like every other MR (the spot-verify rule was retired 2026-09-11)

3

MR-3

#1776

craig-placement: identity wire + CasesClient (relay, budget, fail-closed taxonomy) + the merged criteria consult + mechanical SQL binding (require / prefer / ignore) + activation parity at both sites + contested entry + settings / devstack + the placement / CLI / financial test-corpus conversion to given_case + the wide-band home builders + the shared cases_base_url leaf; craig-web page (case → child cascade, form-only bare load) + guide; CLI (--case-id --child-id, DTO columns; closes #1779); test-lib; e2e; docs + CHANGELOG; the ADR-068 Appendix A row; ADR-073 → Accepted. B1 / B2 cautions: placements.rs create_placement (99 lines) / update_placement (95) — new logic goes INSIDE activation_gate / consult_for_transition; services/craig-cases/src/api/mod.rs has 51 lines of B1 headroom, ive_children.rs 15 (visibility change only), web routes/mod.rs 12

8

MR-4

#1777

Close-out: plan Status Done, nav → Archive + archive.adoc row, .claude/CLAUDE.md, plan-lint --done

1

MR-1 and MR-2 are additive and independent of each other (the v1.3 tables are dormant until a consumer sends child.* facts); MR-3 is the pre-1.0 cutover and requires both. Collisions: none with #1721 (on main; MR-3 builds on it), #1723 (training arm — orthogonal), #1086 (no admin-unit scope — recorded, not attempted).

Test matrix (by risk)

  • cases: membership (active child role only; inactive / sibling-role / other-case → typed 400 CHILD_NOT_IN_CASE; a missing case → 404), a duplicated membership row counts ONE child, DOB missing → 422, age on on (leap-day
    birthday-today edges; proptest years_since monotone in on), the ICWA OR-derivation table, sibling count (1 / 2 / 3 children; inactive excluded), clock rule (on = today ±1 accepted, ±2 → 400), authz (assigned caseworker 200, unassigned caseworker 403, supervisor 200, readonly 200, bare service token → per ruling A), no PII field on the wire (a deny_unknown_fields decode of the response pins the closed shape).

  • rules: the four v1.3 tables on json!({}) and on full documents (age band require; ICWA person / case / both ⇒ require, neither ⇒ ignore; sibling 1 ⇒ ignore, 2 / 3 ⇒ prefer; matchability none); v1.3 changes NO gate verdict and NO scope answer on the existing ga_eligibility_doc documents; TX twins; cargo xtask rules check + policy audit (every new row cited, pamms rows pinned via policy sync-cache --pin); scenario-inventory rows.

  • placement: the criteria verdict → WHERE / ORDER binding table (require filters, prefer ranks — a 2-child case lists sibling-capable homes first, ignore drops the arm; a NULL age band is scoped out under require and ranked last under prefer; a child_refusal_reason ⇒ 409 before any home scan); the merged consult answers scope AND criteria in ONE evaluation (the re-pointed devstack pin counts placement-matching-criteria rows); activation parity at both sites (a require violation ⇒ 409 naming the arm; an admitted home activates; a committed replay makes no cases call); deny_unknown_fields on the query (stale child_age → 400); the fail-closed matrix (cases timeout / 5xx / malformed / 404 / 422 / 403 → the typed status each maps to, under the fault registry’s L1 legs); the budget const-asserts; per_page=0 count shape unchanged; readonly → 403 at the consult (unchanged); the memo tuple count unaffected by child facts (pinned: a fleet of 65 distinct age bands still consults ≤ 64 home tuples).

  • web / CLI / e2e: the case → child cascade renders the case’s children; a bare /placement/matching renders the form and calls nothing; a match for a 2-child case lists BOTH kinds of otherwise-eligible homes with the sibling-accepting ones FIRST (prefer is an ordering, not a filter); a multi-page search keeps case_id / child_id on page 2; the expiry loops (a givenCase child) still see the license / training exclusions; CLI placement match columns = the DTO; a stale ?child_age= → the typed 400 (application/problem+json).

Verification

Per MR: fmt, clippy -D warnings --locked, budgets (B1: services/craig-placement/src/api/matching.rs
services/craig-cases/src/api/cases/*.rs line counts), the 22 lints, validate-authz-coverage, api-docs regen (cases
placement), coverage-matrix-mapping, contested-registry census, check-docs, plan-lint. Devstack: placement + cases batteries --run-ignored all, placement e2e specs, CLI legs, a live probe (a match for a seeded 2-child case; the same call as an unassigned caseworker → 403; cases stopped → 503 within 4 s).

Rollout

MR-1 + MR-2 additive (cases image; ruleset upsert via the seed / rules loader — the v1.3 tables fire only when a consumer sends child.* facts). MR-3: promote v1.3 AND the cases image BEFORE the placement image (a v1.2 answer lacks the child keys ⇒ the parser’s typed 500 on every search — #1721 doctrine), then placement + web + CLI in one window (the wire has no dual-accept); rollback in reverse = N−1 images (no schema change). Ruleset rollback = re-publish v1.2 (rows are data).

Rulings (recorded 2026-09-10 / 2026-09-11)

Decisions 3 (relayed acting worker — A), 4 (ICWA = person OR case) and 6 (child facts into the ruleset NOW) carry their rulings inline. Merge policy: "if prepush passes you may always merge" (2026-09-10), extended 2026-09-11 to tier-1 ruleset content ("Yes — merge them all on green pre-push") — every MR of this plan.

Citations (§B) — one record per child_criteria row, the #1721 record shape

MR-2’s citations.toml records (value, authority, source_ref, section, manual_transmittal, effective_date, verified_date, verified_by, notes, derivation, source_sha256) carry these sources; each file’s #description header is refreshed to declare the four tables (the #1721 precedent). Verified in-tree = the governing sentence is already quoted verbatim by an existing record (agent-verified against the synced PAMMS-CWS cache dfcs-cws 1b77b6d6 / uscode.house.gov "Current 2024 Main Ed. (1/6/2025)"); the gitignored .policy-cache/ is absent from a fresh checkout, so anything not quoted in-tree is UNVERIFIED — MR-2 confirms after policy sync-cache --pin — never invented here. GA rows: authority = "pamms" (USC text restated by the PAMMS page, the #1660 shape); TX rows: "manual" / "federal_statute", no source_sha256 (manual policy source). Total rows (ignore / none) carry a derivation; MR-2 decides whether each rides the exception ledger as [plumbing] (the #1641 catch-all precedent). A require row whose sentence MR-2 cannot locate keeps its output and rides the ledger as [source-not-located] (the class the ledger header names) — MR-2 does not stall on it.

Row (<file>#nodes[id=…].content.rules[n]) Output Intended source — governing sentence (verbatim) + anchor Status

GA child-age-band rules[0] (any age)

require

PAMMS 10.4 Selecting a Placement Resource (dfcs-cws/modules/cws/pages/10-04.adoc, mt 2023-02, effective 2023-03-01): the placement-selection requirement that the home’s approved age range include the child — section anchor + sentence to be located (the in-tree 10.4 quotes cover least-restrictive, kinship, sibling, proximity and PRTF only); fallback PAMMS 14.15 (the approval’s stated age range)

UNVERIFIED — MR-2 confirms

GA child-icwa rules[0] (icwa_person) and rules[1] (icwa_case)

require

25 USC §1915(b) (https://www.govinfo.gov/link/uscode/25/1915?link-type=html, effective 2025-01-06): "In any foster care or preadoptive placement, a preference shall be given, in the absence of good cause to the contrary, to a placement with-(i) a member of the Indian child’s extended family; (ii) a foster home licensed, approved, or specified by the Indian child’s tribe;" — verified in-tree (the texas-placement-matching placement-preference rules[1] record). PAMMS restatement: 10.4’s ICWA item UNVERIFIED; the in-tree Georgia ICWA sentence is Policy 1.6 (01-06.adoc #requirements-icwa, requirement 4 + NOTE, mt 2021-12): "Make every effort to determine if a child is a member or eligible for membership in an Indian Tribe, beginning at intake and continuing throughout DFCS' involvement with the child and family. DFCS must comply with ICWA from the earliest stages of a child welfare case." derivation: person OR case carrier (ruling 2, ⁂ #1073); require = the conservative reading (good-cause departures are a worker act); referrals.icwa_flag is not an input

statute verified in-tree; PAMMS 10.4 anchor UNVERIFIED — MR-2 confirms

GA child-icwa rules[2] (neither)

ignore

§1915(b) governs "the Indian child" only — derivation on the same record (total row)

as above

GA child-sibling rules[0] (>= 2)

prefer

PAMMS 10.20 Preserving Sibling Connections (10-20.adoc #requirements, DFCS will: item 2, mt 2020-06, effective 2020-09-01): "Make reasonable efforts to place siblings removed from their home in the same foster care, kinship, or adoptive placement unless:"; PAMMS 10.4 #requirements, item 4 sub-item d: "Placement of siblings together in the same home unless joint placement is contrary to the safety or well-being needs of any sibling;"; 42 USC §671(a)(31)(A): "reasonable efforts shall be made …​ to place siblings removed from their home in the same foster care, kinship guardianship, or adoptive placement, unless the State documents that such a joint placement would be contrary to the safety or well-being of any of the siblings". derivation: prefer because the duty is "reasonable efforts" (the #1660 reading); the count includes the focus child and is the case’s ACTIVE child-role members (⁂ #1073)

verified in-tree (the #1660 sibling-placement records)

GA child-sibling rules[1] (1)

ignore

total row — the duty is over "siblings removed from their home"; a single child has none to co-place (derivation)

as above

GA child-matchability rules[0]

none

Georgia refuses matching for no child fact — the total row; [plumbing] on the exception ledger

MR-2 confirms

TX child-age-band rules[0]

require

26 TAC ch. 749 Subchapter G foster-home verification (the ages / number of children a home is verified for; chapter-749-cpa.pdf, August 2026 edition) and CPS Handbook 4114 Required Factors (CPS_pg_4000.asp#CPS_4114) — section + sentence to be located

UNVERIFIED — MR-2 confirms

TX child-icwa rules[0] / rules[1] / rules[2]

require / require / ignore

25 USC §1915(b) as the GA row (the record above, reused verbatim); the CPS Handbook ICWA restatement UNVERIFIED

statute verified in-tree; handbook anchor UNVERIFIED — MR-2 confirms

TX child-sibling rules[0] (>= 2)

prefer

CPS Handbook 4114.2 Separating Siblings (#CPS_4114_2), first paragraph (heading "CPS September 2026"): "Under federal law, DFPS must make reasonable efforts to place siblings together, unless DFPS or the SSCC documents that doing so is contrary to the safety or well-being of one of the siblings."; 42 USC §671(a)(31)(A) (…/USC-prelim-title42-section671…, effective 2025-01-06): "to place siblings removed from their home in the same foster care, kinship guardianship, or adoptive placement, unless the State documents that such a joint placement would be contrary to the safety or well-being of any of the siblings;"

verified in-tree (the #1622 sibling-placement records)

TX child-sibling rules[1] / child-matchability rules[0]

ignore / none

as Georgia; the deferred #1666 RTC-vs-ICWA precedence is NOT a v1.3 row (#1780)

MR-2 confirms

Review log

Rev 1–3 folded a 12-finding maintainer plan-mode gate (2026-09-11) before review; rev 4 entered round 1.

Round Vendor Resolved model Verdict

1

Anthropic — one fresh contextless subagent, the four plan-lifecycle questions, over this page + ADR-073

Claude Fable 5.1

no-ship (2026-09-11; 2 blockers, 7 advisories) → folded: B1 child_refusal_reason declared an OPEN vocabulary (none / a verbatim reason; the drift 500 only for a missing or non-string key); B2 this log re-cut to the rule’s rounds; advisories 1–7 (no-age-derivable ⇒ the same 422, the home-less activation audit context, forbidden_policy type URL, TEXT mode binds, MR numbers out of the body, the [source-not-located] ledger fallback, the fleet count made exact)

2

open — run by the maintainer through another vendor’s model

open

open

Errata

  • Erratum (2026-09-12): Decision 9 / test matrix — the bare /placement/matching load fetches the case list that fills the select (one GET /v1/cases/cases); it calls NO matching endpoint ("calls nothing" reads as "calls no matching endpoint").

  • Erratum (2026-09-12): Decision 9 — the pagination extra carries per_page beside case_id / child_id (the multi-page e2e pins the size too).

  • Erratum (2026-09-12): Decision 7 — FactsError::Refused { status, problem: ProblemBody } (a decoded RFC-9457 body: type_url, detail, field) rather than Refused{status, body}; Upstream folds 5xx / 429 → 503 and any other unexpected status → the named 500; 401 and 403 both → forbidden_policy(FORBIDDEN, detail).

  • Erratum (2026-09-12): Decision 6 — home-less activations STAMP activation_evaluation_id / activation_rule_set_revision from the child-only consult (placement-matching-criteria, context = the child id); the activation_provenance test is renamed accordingly.

  • Erratum (2026-09-12): Decision 6 — the #1721 devstack pin is matching_runs_one_criteria_consult_per_search (no inventory row bound the old name) and EXACT (+1 row, context_id = child_id).

  • Erratum (2026-09-12): Test matrix — "NULL band ranked last under prefer`" is pinned at the STORE level (`foster_homes.rs devstack unit test) and the 409-before-scan seam by a stub-driven unit test in api/matching.rs; the child-not-matchable 409 has no integration leg (Georgia’s child-matchability answers none) — unit-pinned.

  • Erratum (2026-09-12): Decision 9 — the CLI home list capacity column drift is #1782 (out of scope); the docs screenshot 23-placement-matching.png is refreshed in the close-out MR.

  • Erratum (2026-09-12): Decision 9 / test corpus — MR-3’s first live battery corrected three test classes (the wire detail is placement: <arm> because ApiError::Conflict renders {entity}: {detail}; a seeded end_reason: "test" main had silently ignored; the #1317 window arms serialized in a nextest group with per-arm park windows) and moved the e2e create placement spec onto givenCase / givenHome — the plan’s own fixture rule, applied to one more spec.

Edit this page · latest