Plan: AFCARS Placement Capture III — The Element Capture: Arrangement, Removal, Exit and Child Facts (#2052, P-B3 of #949)

Archive record

Merge requests: !1742 (U0 plan page + the ADR-079 amendment Proposed + the unit issues, Relates #2052) + !1743 (U1, Closes #2080) + !1754 (U2, Closes #2081) + !1755 (U3, Closes #2082) + !1758 (U4, Closes #2083) + !1759 (U5, Closes #2084) + !1760 (U6, Closes #2085) + !1761 (U7, Closes #2086 / #2052 / #1963)

2026-09-30 — rev 2 approved in plan mode 2026-09-28 (rulings R-B29–R-B31 and R-B33 as recommended; R-B32 / R-B34 ruled at P-B2’s gate) after a contextless round 1 (ship, 14 non-blocking findings), the maintainer’s round 2 (no-ship, 13 findings folded) and a verifier over the folds (5 minor fold defects fixed); what landed — arrangement facts (U1: sixteen nullable placements columns for (e)(5)–(e)(8) and (i)(5)–(i)(8), the placements PUT’s complete-state arrangement_facts, craig_validation::required_nullable, the web forms' facts_rev); removal facts (U2: forty-three required-nullable removal_responses answers for (d)(3), (d)(4), (i)(1) and (i)(4)); trafficking (U3: the episode_trafficking_statements and trafficking_law_enforcement_reports event ledgers for (d)(5)–(d)(6)(ii), event::live_through, 400 ledger-fact-date-after-event); the adoption / guardianship exit (U4: twenty-one exit_responses answers for (h) less (h)(14) and (i)(10)–(i)(13), two adoptive-parent slots checked against the cases projection — 503 person-lookup-unavailable while craig-cases is down, replays exempt); child facts (U5: the (b)(9) health_records.health_assessment visit flag, the child_health_facts and child_education_facts window ledgers for (b)(10)–(b)(12) and (b)(14), placement’s first refuse_fact_row_mutation(), the stage at B3U5 = LAST_UNIT and the partition complete at 142 = 57 + 67 + 18); the Tribe’s order (U6: tribe_order_foster_care / tribe_order_adoptive on cases child_icwa_facts, required keys, the child_icwa_facts re-pin, the ledger-lift golden re-blessed); ADR-079’s element-capture amendment Accepted as built, no new ADR (R-B35); three craig_placement floors (20260929110000, 20260930100000, 20260930120000) and one craig_cases floor (20260930150000), each a voluntary bump on an additive file — U1 and U5 bump none (U5 keeps health_assessment’s `DEFAULT false, which an N−1 health create relies on). As built beyond the approved text: a body missing a required key is 422 validation-failed, not 400; every ledger act answers 200, not 201; P-C D1’s row columns are supersedes_id / retired_reason / retired_note / retired_by, never “corrects”, and the event ledgers hash through spec_of, the window ledgers through statement_spec; a facts PUT on a retracted episode’s row is 409 episode-retracted; the (i)(1)(iii), (i)(8), (i)(13) and (b)(10) gates are one family CHECK each; U4’s child refusal runs after authorize through EpisodePath.child_id on the exit and its correction (the historical episode checks its body’s child_id), and slot existence is one cases-projection display_names read after the ADR-062 precheck (a replay answers from its claim while craig-cases is down; a fresh act is 503); no trafficking or child-fact act stages an audit event (the trafficking acts publish placement.episode_facts_changed, the child-fact acts no event, D4); U6’s CHECKs are the belt behind the garde body gate, with no typed mapper. Follow-ups: #2087 (craig-exchange ICPC receiving_state vs (e)(5) / (e)(6)), #2088 (the element test’s categories_match admits a duplicated pair), #2089 (INVALID_STATE_TRANSITION documented 409, answered 400), #2111 (U1’s arrangement enums and CLI flags missing from shared-crates / cli.adoc), #2112 (the web query-string guard’s cfg(test) blind spot), #2113 (handler skip markers cannot coexist), #2114 (the case detail tab reads location.hash under the Alpine CSP build), #2115 (a person picker for the adoptive-parent slots), #2116 (health create --record-type help). P-D’s input (#1965) — the trafficking anchor, the (b)(9) episode-bounded interval, the two tribe-order bindings, the (d)(6)(ii) cross-ledger gate; P-E’s — (h)(14) (#1966); #2000 holds the sensitive columns ((d)(4), trafficking, health, ICWA) and the unattributed facts PUT.

Status

Done (2026-09-30) — !1761

Anchor What binds here

#2052; AFCARS 2020 Program (#949)

A3 (crosswalks), A5 + its 2026-09-24 erratum (capture-first, effective-dated, governed), A6 (sources answer at each element’s anchor; trafficking flags are PII) — errata requested (D5)

P-B2 (#2026)

D1 (one rule for where a fact lives — every column and ledger here) and D11 (the element map: Person / Derived, the 67 owned keys, this page’s landing units B3U1–B3U5, LAST_UNIT = B3U5, the hermetic and partition tests) — binding; D2 (the setting vocabulary and identity), D4 (the kinship household), D6 (the slot rule), R-B35 (no new ADR; nothing governed)

P-B1 (#1963)

D1 (the lifted ledger core), D2 / D4 (episodes, removal and exit responses; the act order and lock order), D3 (the replacement protocol), D7 (the scope) — binding; this page’s close-out closes #1963

rulesets/federal/federal-afcars-2020.json 1.1.0 + the pinned CFR

every key, value set, cardinality and anchor quoted here (citations.toml / sources.toml notes; an "L604"-style cite is a pinned-CFR XML line)

ADR-079

amended again (D5), after P-B2’s amendment

ADR-078 D1

the correction model, through craig-ledger; P-C D1’s four acts

ADR-072 § Amendment — #949

federal text only in rulesets/federal/; state variance in the crosswalk or the state bundle

ADR-062, ADR-063 D3, ADR-077 D6, ADR-003

claim_first; a DROP or write-breaking CHECK bumps the floor in its own file; the admin_unit stamp; parsers and consumers before producers

P-C D1, D3, D4, D8, R-C2, R-C9, R-C10; P-A2 D4

the column conventions; person_siblings; child_icwa_facts; the seed rule; health / education are P-B’s; Plaintext + #2000; MaritalStatus / KinshipRelationship are NOT crosswalks

⁂ = a reading DFCS (Georgia’s Division of Family and Children Services) may rule otherwise, logged on #1073; "P-B2 Dn" is P-B2’s section, a bare Dn this page’s. ACF: Administration for Children and Families; ICPC: Interstate Compact on the Placement of Children; IEP / IFSP: Individualized Education Program / Family Service Plan; P-D (#1965), P-E (#1966): the AFCARS pipeline, the assistance file.

Context (census 2026-09-26, re-verified on main 2026-09-28)

Of the 45 rows P-B2 D11 lands here, (d), (e)(5)–(e)(7), (h) less (h)(14) and (i) have no home (P-B1 U3 dropped removal_reason; no person is linked to an exit); (e)(8) has only kinship_options.relationship; (b)(9)–(b)(12) and (b)(14) sit wrong-shaped on the UPDATE-in-place health_records / education_records (store/education.rs:206-227); (b)(20) / (b)(21) count cases person_siblings, which placement cannot read (craig-cases api/ledgers/person_siblings.rs:264). The Georgia / testonia sex—​oohc_h7/h12 and ethnicity—​oohc_h6/h11 crosswalks presuppose adoptive parents as cases persons. Twenty each category columns exceed Postgres’s 63-byte identifier under this page’s prefixes (D5). Every placement idempotency intent enumerates its fields (api/intents/), and the web and CLI writers build their own bodies (craig-web routes/placement/episodes.rs:200, episodes/exits.rs:50-56; craig-cli cmd/placement/episode.rs:151-162, episode/exit.rs:154-166): a new key is dropped from the hash, and an omitted key reads as NULL — D6 closes both.

Design

D1 — Per-arrangement facts: (e)(5)–(e)(8), (i)(5)–(i)(8)

Nullable columns on placements (NULL = unanswered). The create and historical bodies and the read carry them flat (ArrangementFacts in craig-placement-contracts arrangements.rs, #[serde(flatten)]; the store decodes them through a service-side wrapper, as FosterFamilyHomeTypes, store/models.rs:187); the placements PUT gains an optional arrangement_facts object — absent = unchanged; present = the COMPLETE state of all eight, validated against the row’s setting as the create is, alone or beside a transition, on a planned, active or ended row (P-B2 D1; any other row: the PUT’s invalid-transition 400; the setting, its identity and the (e)(3) flags never change). A facts-only PUT stages no event and no field audit (nothing here is governed, R-B35; placements has updated_at and no last-writer column), so the write is unattributed — intended until #2000 rules on these columns. Additive migration (no guard, no bump). A token set is CHECK (<col> IN (…)) (a NULL passes a CHECK); every gate on a nullable column is <col> IS NULL OR <gate> IS NOT DISTINCT FROM '<token>' (a bare = passes on a NULL gate, child_icwa_facts.sql:127).

Row Column (value set) CHECK beyond its token set

(e)(5)

arrangement_location (4 tokens)

arrangement_location IS NULL OR arrangement_location = 'runaway_or_whereabouts_unknown') = (placement_type IN ('runaway', 'whereabouts_unknown')

(e)(6)

arrangement_jurisdiction (TEXT; the API trims whitespace, a blank is 400)

char_length(arrangement_jurisdiction) BETWEEN 1 AND 255 AND arrangement_jurisdiction = btrim(arrangement_jurisdiction, E' \t\r\n'); NULL unless (e)(5) is out_of_state_or_out_of_tribal_service_area or out_of_country; free text until the ACF format lands (#1973), P-D renders

(e)(7), (e)(8)

foster_parents_marital_status (4), relationship_to_foster_parents (3)

NULL unless placement_type = 'foster_family_home'

(i)(5), (i)(6)

icwa_available_<5> (yes | no | not_applicable), icwa_preference_met (6)

—

(i)(7), (i)(8)

icwa_good_cause, icwa_good_cause_basis_<5> (yes | no)

(i)(7) only when (i)(6) = placement_does_not_meet_icwa_placement_preferences; (i)(8) only when (i)(7) = yes

  • (e)(8) repeats the (e)(3) relative / kin definitions (CFR L604–L631, L659; their agreement is P-D’s finding); (e)(5) / (e)(6) sit beside craig-exchange’s per-child ICPC receiving_state (U0 files a consistency follow-up).

  • The (i) gate b6i_yes_icwa_applies is a cases fact: no cross-service write gate; P-D’s applicability blanks. craig-web renders the (i) block on every family and congregate arrangement form (create, historical, the facts edit) unconditionally — no read gates it (cases' placement-facts hop answers only the current ICWA window, active members and today ± 1 day, api/placement_facts.rs:51, :111, :200). A re-record (P-B1 D3) is a full create carrying these facts.

  • ⁂ #1073: whether (i)(5)–(i)(8) apply on a non-caregiving row (P-B2 D3’s six settings, PlacementType::setting_class, incl. placed_at_home) is a P-A2 dictionary question; U0 logs it; the columns stay nullable meanwhile.

D2 — Removal facts and trafficking: (d)(3)–(d)(6)(ii), (i)(1), (i)(4) (R-B29)

  • On removal_responses (nullable): environment d)(3), 7 tokens); circumstance_<34> ((d)(4), applies | does_not_apply); icwa_transfer_requested, icwa_transfer_denied (yes | no), icwa_denial_<3> (applies | does_not_apply; (i)(1), gated denied ← requested yes, reasons ← denied yes); icwa_clear_and_convincing_evidence, icwa_qualified_expert_witness, icwa_active_efforts (yes | no; (i)(4. RemovalFacts (craig-placement-contracts episodes.rs:48) grows, so the open, historical and correction bodies and EpisodeRow.removal carry them; a correction is the complete state; FACT_COLUMNS (RemovalResponsesTable, store/removal_episodes.rs:115) extends. U2’s migration: additive, VOLUNTARY floor bump (an N−1 correction would supersede the new answers with NULLs).

  • episode_trafficking_statements — an event ledger on the lifted core, keyed episode_id (FK RESTRICT): stated_on DATE (EVENT_DATE, ≤ today on the jurisdiction clock) · prior_victim, prior_reported (yes | no), prior_reported_on DATE d)(5)–(d)(5)(ii); fact_dates returns it) · in_care_victim, in_care_reported (yes | no; (d)(6), (d)(6)(i · one-way gates down each chain · P-C D1’s row columns with retired_by; many roots. A statement is the complete state known on stated_on: a changed answer is a new statement, an error a correction (⁂ #1073). CHECK prior_reported_on IS NULL OR prior_reported_on ⇐ stated_on binds every statement and every correction (a row of its own); the act pre-checks it — 400 LEDGER_FACT_DATE_AFTER_EVENT, a new type beside LEDGER_DATE_AFTER_TODAY (craig-common error.rs:755).

  • trafficking_law_enforcement_reports — an event ledger on the same lifted core, keyed episode_id (FK RESTRICT): reported_on DATE NOT NULL (EVENT_DATE, ≤ today), one row per report d)(6)(ii; P-C D1’s row columns (provenance, corrects, retired_at / retired_by / reason); many roots. Both ledgers attach refuse_event_row_mutation().

  • Acts: POST|GET /v1/placement/episodes/{id}/trafficking and …/trafficking-reports, each with …/{row_id}/corrections and …/{row_id}/retract — P-B1’s act order (deny_pure_service, authority, client_request_id, claim_first, P-B1 D2’s lock order), Action::Update / Action::Read through EpisodePath::authorize (as api/exits.rs:104), 409 EPISODE_RETRACTED. GET …/trafficking is the cases list_event shape (craig-cases api/ledgers/events.rs:303-304: ?as_of= → the statement in force, event::at_anchor; absent → event::history). GET …/trafficking-reports lists EVERY live report dated ≤ ?as_of= (absent: all), newest first, through a new craig-ledger read event::live_through(filter, cutoff) — at_anchor’s `DISTINCT ON answers one row per key (store/event.rs:87-99). Each act publishes placement.episode_facts_changed: EpisodeLedger (craig-placement-contracts events.rs:180-187, and its name-table test) gains both table names, and ADR-003’s closed ledger set (adr-003-rabbitmq-topology.adoc:57) widens.

  • Episode retract: retires both ledgers' live rows in its transaction and still stages ONE removal_episodes / retracted event (ADR-003:57; api/episodes/acts.rs:669-671) — the retired rows stage none. U3 CREATE OR REPLACE`s `check_episode_current_instants() (latest 20260925150000_exit_responses.sql:91-124) so the inert arm also refuses a live row of either ledger, and attaches the ck_episode_current_instants constraint trigger (AFTER INSERT OR UPDATE, DEFERRABLE INITIALLY DEFERRED) to both. U3’s migration: additive, voluntary bump (an N−1 episode retract would not retire the ledgers' rows).

  • ⁂ #1073 — the anchor: removal_date selects the EPISODE; the value is its latest live statement with stated_on ≤ the period’s resolved to, and every report dated ≤ it (a P-D input).

D3 — The exit to adoption or guardianship: (h), (i)(10)–(i)(13) (R-B30, R-B34)

  • On exit_responses (nullable): adoptive_marital_status h)(1), 5 tokens) · relationship_<4> ((h)(2), applies | does_not_apply) · first_adoptive_parent_person_id, second_adoptive_parent_person_id (UUID; cases persons, no FK) · jurisdiction_kind ((h)(13), 3) · siblings_in_home INTEGER (0–999) + siblings_not_applicable BOOLEAN ((h)(15); TRUE or NULL, never beside a count) · adoptive_icwa_available_<4> (yes | no | not_applicable), adoptive_icwa_preference_met (5), adoptive_icwa_good_cause, adoptive_icwa_good_cause_basis_<5> (yes | no; gated as D1’s (i)(6)–(i)(8. ExitFacts (craig-placement-contracts episodes.rs:61) grows, so the exit, exit-correction and historical bodies and the episode read’s exit row carry them.

  • The adoptive slots. A second slot needs a first and names another person (CHECK second_adoptive_parent_person_id IS NULL OR (first_adoptive_parent_person_id IS NOT NULL AND second_adoptive_parent_person_id <> first_adoptive_parent_person_id)). When the body names one, the act checks each with the cases projection’s person_exists after the ADR-062 replay precheck and before the transaction, as the binding create does (api/caregivers.rs:170-183; 503 while cases is down), and refuses a slot naming the child: the exit reads its episode (episodes::get_episode, api/exits/acts.rs:142), the correction reads it before event::correct (:218-244), and the historical record compares the slots with its body’s child_id. An unknown person, the child, a repeated person or a second without a first is 422 ApiError::unprocessable(<slot>, …), the binding create’s shape; the CHECK backstops.

  • CHECKs — one-way, NOT the two-way chk_exit_responses_transfer_paired: every (h) column IS NULL OR exit_reason IN ('adoption', 'guardianship') (the (h) preamble as a DB fact); every (i) column IS NULL OR exit_reason = 'adoption'. A correction is the complete state, so one to another reason carries none; the columns follow the exit’s own supersede and retract (P-B1 D4).

  • Mapping: (h)(3)–(h)(12) are the two persons' cases facts at the exit date, as P-B2 D6: Mapping::Person { via: PersonVia::Column { table: "exit_responses", column: "first_adoptive_parent_person_id" }, fact } for (h)(3)–(h)(7), the second_… column for (h)(8)–(h)(12); the facts reuse the FOSTER_PARENT_ TRIBAL_MEMBERSHIP / RACE / ETHNICITY / SEX constants, and (h)(3) / (h)(8) take Mapping::Column { table: "persons", column: "date_of_birth" } (a declared year alone leaves it missing). The four (h) crosswalk tables serve (h)(6), (h)(7), (h)(11), (h)(12). (h)(15) maps Mapping::DateWithIndicator { table: "exit_responses", date: "siblings_in_home", indicator: "siblings_not_applicable" }. The second person need not adopt.

  • (h)(13) and (h)(15) are captured, never derived from (e)(5) or person_siblings (a sibling in the new home may never have been in care, ⁂ #1073). (h)(14) is P-E’s (rulesets.adoc:752), already in OWNED_ELSEWHERE (afcars_capture.rs:137): U4 maps 18 keys. An (h)-only correction republishes placement.episode_exited with an unchanged current (financial repeats a log-only WARN) — accepted; the guardianship handoff records the exit without (h), completed by correction. Migration: additive, voluntary bump.

D4 — Child facts: health and education, the sibling counts, the Tribe’s order (R-B31–R-B33)

  • (b)(9) — health_records.health_assessment BOOLEAN NOT NULL DEFAULT false, a visit flag, in the health create (required, D6) and PUT (absent = unchanged) bodies (api/health_dtos.rs): (b)(9) is yes iff a row with active = true so flagged has visit_date within the episode the record reports — from its removal_at to the earlier of its exit_at and the anchor ("during the current out-of-home care episode", rulesets/federal/citations.toml:210); a visit after the exit, or in a later episode, never answers an earlier one. It maps Mapping::Named { columns: &[("health_records", "health_assessment"), ("health_records", "visit_date"), ("health_records", "active"), ("removal_episodes", "removal_at"), ("removal_episodes", "exit_at")] }, pinned in NAMED_OVERRIDES; P-D evaluates it (D5 input). ⁂ #1073: for a child exited before period end, "current" is the episode the record reports.

  • (b)(10)–(b)(12), (b)(14) — two per-child WINDOW ledgers on the lifted core, keyed child_id (P-C D1’s four acts and row columns; one open window per child through excl_<table>_window / uq_<table>_one_open, bound by WindowLedger::EXCL / UQ_ONE_OPEN), not columns on the UPDATE-in-place records (R-B31 amends R-C2’s letter, not its intent). U5 defines placement’s first refuse_fact_row_mutation(), byte-equal with its COMMENT to cases' (20260925120000_ledger_actors.sql:167):

    • child_health_facts under ResourceType::HealthRecord: condition_status ((b)(10)'s four parent tokens) + condition_<11> (existing | previous | does_not_apply, gated on child_has_a_diagnosed_condition) — Mapping::Gated;

    • child_education_facts under ResourceType::EducationRecord: school_enrollment ((b)(11), 6), educational_level ((b)(12), 17), special_education ((b)(14), yes | no — an IEP or an IFSP).

      Routes /v1/placement/children/{child_id}/health-facts and …/education-facts (POST, GET ?as_of=, …/{row_id}/corrections, …/retract, …/close; no history route): deny_pure_service, then authz.check on a new child-keyed ref (resource_id = child_id, assigned_worker_sub: None, as api/education.rs:25-42) — Action::Update for every write, Action::Read for the read (the cases child-fact rule); no case-open guard. The at-anchor read is the window containing period end ((b)(11): the earlier of it and the exit). Staff state not_school_age, not_enrolled and a 0–3 child’s IFSP directly. The records' grade_level (grade enrolled in), record_type, diagnosis, school_type, iep_flag stay (R-C2). No event (no consumer). Migration: additive, no bump.

  • (b)(20), (b)(21) — derived at projection, no column: P-B2 D11’s R-B32 text binds unchanged (archive/afcars-placement-facts.adoc § D11, "Per R-B32"). The siblings are the child’s live person_siblings links at the anchor (⁂ #1073: "in foster care" = in an episode of this agency’s responsibility). Placement owns both keys (Mapping::Derived; B2U1 maps (b)(20), B2U5 (b)(21)); P-D evaluates them and checks (b)(21) ≤ (b)(20) ≤ (b)(19).

  • The Tribe’s order of preference — cases owns it (R-B33) as TWO child_icwa_facts columns, because 25 U.S.C. 1915(c) lets a resolution set either order alone: tribe_order_foster_care i)(5)(v): the order "for foster care or pre-adoptive placements") and tribe_order_adoptive ((i)(10)(iv, each yes | no, gated court_determination IS NOT DISTINCT FROM 'yes_icwa_applies' as determination_tribe (craig-cases 20260923140000_child_icwa_facts.sql:139-140), registered Plaintext (craig-cases-fields child_icwa_facts.rs), in IcwaFacts (craig-cases-contracts child_facts.rs) and the store’s FACT_COLUMNS; additive, voluntary floor bump. The ruleset’s one predicate tribe_established_order_of_preference (its (i)(5) and (i)(10) arms, federal-afcars-2020.json:4792-5296) binds to tribe_order_foster_care at each (i)(5) arrangement date and to tribe_order_adoptive at each (i)(10) exit date (a P-D input). U6 re-blesses the cases ledger-lift golden (services/craig-cases/tests/golden/ledger_lift/) with exactly this two-field delta and re-pins per D6.

D5 — Names, ADR, docs, seed, followers, errata, inputs

  • Slugs — the twenty columns over 63 bytes (dictionary order within a family; every other category column is <prefix>_<category>): (d)(4) circumstance_caretakers_impairment_physical_emotional, circumstance_family_conflict_orientation_gender_identity; (i)(1)(iii) icwa_denial_parents_objected, icwa_denial_tribal_court_declined, icwa_denial_state_court_good_cause; (i)(5) icwa_available_ + tribe_licensed_foster_home, indian_foster_home_non_indian_licensed, indian_institution, tribe_order_of_preference; (i)(10) adoptive_icwa_available_
    extended_family, tribe_members, tribe_order_of_preference; (i)(8) icwa_good_cause_basis_ and (i)(13) adoptive_icwa_good_cause_basis_ + parents_request, no_suitable_placement, extraordinary_needs, sibling_attachment.

  • Enums and wire — craig-reference enums with strum::VariantNames: applies | does_not_apply = SourceApplies, yes | no = YesNo, yes | no | not_applicable = YesNoNotApplicable; new: ArrangementLocation (e)(5), FosterParentsMaritalStatus (e)(7), FosterParentsRelationship (e)(8), IcwaFosterCarePreference (i)(6), RemovalEnvironment (d)(3), AdoptiveMaritalStatus (h)(1), AdoptionJurisdiction (h)(13), IcwaAdoptivePreference (i)(11), ConditionStatus and ConditionHistory (b)(10), SchoolEnrollment (b)(11), EducationalLevel (b)(12). An each family is flat on the wire: one Option<answer enum> field per category, named by its column (the cases ledger bodies, craig-cases-contracts child_facts.rs:148-169).

  • ADR and docs. ADR-079 gains == Amendment (<date>, #2052) — the element capture, drafted in U0, flipped as-built at close-out; no new ADR (R-B35). Per unit: data-model-placement.adoc (canonical, its element → column table), data-model-cases.adoc (U6), the ADR-003 row (U3), the deployment guide § AFCARS placement capture rollout, CHANGELOG per MR (U3’s ledger set: Changed; each replaced intent’s replay 409, D6).

  • Seed: every new value DERIVED from existing draws (P-C D8, P-B1 D5), one bless per MR naming what moved: U1 (e)(5) everywhere (the runaway token on runaway / whereabouts rows, else in-state), (e)(7) / (e)(8) on foster_family_home rows; U2 (d)(3) and ≥ 1 (d)(4) circumstance per episode; U4 the (h) facts and a first adoptive parent on adoption / guardianship exits; U5 an education window per school-age child, a health window per child in care, (b)(9) on the first physical_exam inside each episode; (i), U3, U6 none.

  • Followers — craig-web (services/craig-web/src/routes/): U1 placement/placements.rs (create), placement/episodes/historical.rs (the historical PLACEMENT form, :107) and a facts edit on placement/placement_detail.rs relayed as the PUT (as placements.rs:836); U2 placement/episodes.rs (the open form and the removal correction, CorrectBody :200); U3 a trafficking panel on the episode page; U4 placement/episodes/exits.rs (ExitBody, the exit and its correction) and placement/guardianship_handoff.rs:403-411 (its ExitBody sends every new key null, no facts_rev: the handoff shows no (h) block, completed by correction, D3); U5 facts panels on placement/health.rs and education.rs (read-only list pages today); U6 cases/child_facts/form.rs and the IcwaFacts parse (cases/child_facts/ledgers.rs:491). The web posts no historical EPISODE. craig-cli — placement create / update / historical (U1), placement episode open / correct (U2) and the historical episode body (episode/exit.rs:141, U2 and U4), a new placement episode trafficking (U3), placement episode exit (U4), facts subcommands of health / education and the health create’s --health-assessment (U5), child-facts (U6); craig-test-lib (typed clients incl. clients/placement/episodes.rs:168, PlacementBuilder, givens); the Playwright givens tests/e2e/lib/given/placement.ts and specs; k6 and NCANDS none.

  • U0 records: program errata — the P-B row ((h)(14) to P-E, (b)(20) / (b)(21) "P-B defines, P-D evaluates", R-B31; P-B3 weight 24 → 25 and the combined 49 → 50, afcars-program.adoc:313-314), A6 (placement’s export carries adoptive person ids, not their race; cases' export admits those adults); P-D inputs (#1965) — the trafficking anchor (D2); the (b)(9) episode-bounded interval, with a test that a visit after the exit and one in a re-entry episode leave the earlier episode’s (b)(9) no; the (b)(20) / (b)(21) derivations and check; the two tribe-order bindings (D4); cases' persons/afcars-export admitting the adoptive parents with (h)(3) / (h)(8)'s full birth date (D3); P-E (#1966) — (h)(14); #2000 — the sensitive columns ((d)(4), trafficking, health, ICWA) and the unattributed facts PUT (D1), per P-B2 D1.

D6 — Intents and writers: no new key is dropped

  • Intents. Each intent a growing body feeds is REPLACED by its next version carrying every new field — pre-1.0, no dual decode (the #2056 / #2058 precedent, api/intents/creates.rs:283-290): U1 PlacementIntentV6 → V7 (creates.rs:292), HistoricalPlacementIntentV3 → V4 (arrangements.rs:38); U2 OpenEpisodeIntentV1, CorrectRemovalIntentV1 (episodes.rs:62, :71) and HistoricalEpisodeIntentV1 (exits.rs:64) → V2; U4 ExitIntentV1 (exits.rs:55, the exit and its correction) → V2, HistoricalEpisodeIntentV2 → V3; U5 HealthIntentV1 (creates.rs:433) → V2. The new ledger acts (U3, U5) hash their facts whole (craig-ledger intents.rs:75-84). The placements PUT takes no claim (UpdatePlacementRequest has no client_request_id). Cases hashes IcwaFacts whole, so U6 re-pins the child_icwa_facts record and correct rows of api/intents/ledger_pins.rs:603-614 from the drift report (:688-690). A claim minted before a unit and replayed after it answers 409 IDEMPOTENCY_CONFLICT (craig-api request_claims.rs:465-477); each unit’s CHANGELOG says so.

  • Required keys. Every key this page adds is REQUIRED on every create, historical, exit and correction body that carries it and inside the PUT’s arrangement_facts object — present, null meaning unanswered: ArrangementFacts, RemovalFacts, ExitFacts, the health create’s health_assessment (a bool), cases' two tribe-order keys (every IcwaFacts body). The health PUT keeps absent = unchanged (a patch, not a complete state). A new craig_validation::required_nullable (beside double_option, craig-validation/src/lib.rs:308) is the field’s deserialize_with, with no default, so serde refuses a missing key: an absent key is a 400, never a NULL, and an N−1 writer is refused rather than erasing. Each such field carries #[schema(required = true, nullable)] (utoipa-gen 5.4.0’s field attributes), so the OpenAPI spec states what the server enforces.

  • Writers. craig-web relays every key (no skip_serializing_if on a fact key). Each web form with a fact block renders a hidden facts_rev naming the unit that last changed that block (b3u1, b3u2, b3u4, b3u6); a POST whose facts_rev is missing or not current gets the reload flash ("This changed since you loaded the page — reload and try again.", clients/composition.rs:256) and relays nothing — a form an N−1 replica rendered never submits NULLs for inputs it never showed. The CLI’s json! builders send every key (their key-set pins, episode.rs:269, episode/exit.rs:223, move with the wire), as do craig-test-lib and the givens.

Erratum (2026-09-28): a body missing a D6 key is 422 validation-failed (the extractor’s data-error status, as a missing client_request_id), not 400 — D6, the Test matrix and Rollout row U1 read 422 (#2080).

Erratum (2026-09-28): (i)(8)'s gate is one family CHECK, num_nonnulls(<the five columns>) = 0 OR icwa_good_cause IS NOT DISTINCT FROM 'yes' — equivalent to five <col> IS NULL OR … gates, and within 63 bytes (#2080).

Erratum (2026-09-28): a facts PUT on a row of a retracted episode is 409 episode-retracted, as a status change is (#2080).

Erratum (2026-09-30): P-C D1’s row columns are as-built supersedes_id / retired_reason / retired_note / retired_by (the lifted core’s insert, craig-ledger store/event.rs:63), not “corrects” (D2); an event ledger’s facts hash WHOLE through craig-ledger intents.rs:52-70 (spec_of), not :75-84 (the window projection) — D2, D6 and U5 read these (#2082).

Erratum (2026-09-30): U5’s migration sorts after 20260930120000_adoption_exit_facts.sql (U4), not the kinship file the Units prose names; its window ledgers hash through craig-ledger intents.rs:73-115 (statement_spec, bounds + facts whole — the 2026-09-30 spec_of note is the EVENT ledgers'), and every ledger act answers 200 (claim_act), so the racing-open test expects one 200, not 201 (#2084).

Units

Each MR Relates to #2052 and #949 and closes its own unit issue; the close-out MR Closes #1963 and #2052, and no earlier MR description writes "closes #1963". A landing unit bumps AFCARS_CAPTURE_STAGE (crates/craig-placement-contracts/src/afcars.rs:52, now B2U5) to its own variant (U1 → B3U1 … U5 → B3U5 = LAST_UNIT) and adds its keys to AFCARS_ELEMENT_COLUMNS (same file, doc comment included). Element tests: services/craig-placement/tests/afcars_elements.rs; partition: xtask/src/cmd/afcars_partition.rs.

MR Scope (the keys it maps) W

U0

this page (Active nav); the ADR-079 amendment (Proposed); the unit issues under epic &99 (Plan::AFCARS, a type and a priority label, the weights below); errata, ⁂ log (with D1’s (i)(5)–(i)(8) question), #2000 note, P-D / P-E inputs (D5); the ICPC consistency follow-up

1

U1

ARRANGEMENT FACTS (D1; D6’s required_nullable, facts_rev and the U1 intents) e)(5)–(e)(8), (i)(5)–(i)(8; categories_match (afcars_elements.rs:227-236) admits a column other than <prefix>_<category> only when that name exceeds 63 bytes and the column starts <prefix>_, is ≤ 63 bytes and unique in its family; admitted_types gains Atom::Text → text

3

U2

REMOVAL FACTS (D2; the U2 intents) d)(3), (d)(4), (i)(1), (i)(4

3

U3

TRAFFICKING (D2): the two ledgers, acts, events, event::live_through d)(5)–(d)(6)(ii; CARDINALITY_TABLES (:40) gains ("episode_trafficking_statements", PerRemoval) and ("trafficking_law_enforcement_reports", RepeatingDates)

5

U4

THE ADOPTION / GUARDIANSHIP EXIT (D3; the U4 intents) h) less (h)(14), (i)(10)–(i)(13; PERSON_KEYS gains (h)(3)–(h)(12); each_pin_set_is_exactly_its_mapped_entries’ person count goes 10 → 20 (:415`); the partition’s cases_inputs(placement::AFCARS_ELEMENT_COLUMNS).len() goes 34 → 56 (11 cases columns per person) with its doc comment (afcars_partition.rs:446-460)

5

U5

CHILD FACTS (D4; HealthIntentV2) b)(9)–(b)(12), (b)(14; CARDINALITY_TABLES gains both window ledgers (MostRecent), NAMED_OVERRIDES (b)(9), placement_columns a Mapping::Gated arm; at LAST_UNIT the probe a_key_owned_after_the_stage_is_unmapped (:425) becomes at_the_last_unit_every_owned_key_is_mapped, the partition’s assert!(c.at_last_unit && !p.at_last_unit) becomes assert!(c.at_last_unit && p.at_last_unit), and its pinned OK line (afcars_partition.rs:459-463) reports placement complete

5

U6

THE TRIBE’S ORDER (D4; craig-cases; D6’s re-pin)

2

U7

CLOSE-OUT: the ADR-079 amendment Accepted as-built, data-model-placement.adoc complete, the archive row; closes #1963, #2052

1

Weight 25. Start order: U0 first; P-B2 is merged (stage B2U5), so U1–U6 may start after U0. Merge order (P-B2 D11 — the stage test is an exact set match): U1 → U5 in variant order; U6 maps no key and merges any time after U1 (it uses U1’s required_nullable and facts_rev). Every MR green alone; // @axis: on every new test; each migration sorts after its service’s newest (20260928120000_kinship_households.sql, 20260925120000_ledger_actors.sql) and its header states its class and rollback (20260927100000_foster_home_provider_kind.sql:14-22).

Test matrix (by risk)

  • Evil (evil): a service principal on every new route — 403; an (h) column on a non-adoption / guardianship exit, an (i)(10)–(i)(13) column on a guardianship exit, a dependent leaf without its gate, another (e)(5) on a runaway row, a blank (e)(6), a tribe order without yes_icwa_applies — refused typed; an adoptive slot naming an unknown person, the episode’s child or the other slot’s person, or a second without a first — 422; a prior_reported_on after stated_on, on a statement or its correction — 400 LEDGER_FACT_DATE_AFTER_EVENT; a body missing a key D6 requires — 400; a web POST with a missing or stale facts_rev — the reload flash, nothing relayed; a trafficking act on a retracted episode — 409 EPISODE_RETRACTED; any UPDATE / DELETE of a new ledger row outside RETIRE (and CLOSE on a window) — refused by trigger.

  • Sad (sad): a_trafficking_no_to_yes_is_a_new_statement · an_episode_retract_retires_its_trafficking_rows_and_stages_one_event · every_report_dated_on_or_before_as_of_is_listed (three reports, one after the cutoff) · a_removal_fact_correction_keeps_d2 · an_h_only_correction_keeps_g2 (d2 / g2: the (d)(2) / (g)(2) transaction dates, P-B1’s first_recorded_at) · a_correction_away_from_adoption_blanks_h_and_i · a_child_fact_change_closes_the_open_window · a_facts_only_put_on_an_ended_arrangement_changes_only_its_facts · an_unneeded_or_overlong_slug_is_a_problem (hermetic) · per replaced intent, <intent>_hashes_every_new_fact (the api/intents/exits.rs:224 pattern; health’s first).

  • Concurrency / replay (conc / replay): two_opens_racing_for_one_child_leave_one_window — both with one effective_from, fired through craig_test_lib::concurrent::concurrent_fire_synchronized (concurrent.rs:211): one 201, the other 409 LEDGER_WINDOW_OVERLAP (both inserted) or 400 LEDGER_NOT_A_CHANGE (it saw the committed window, craig-ledger store/window.rs:249-255), and exactly one live open window · a_trafficking_act_racing_an_episode_retract_serializes (the act 409s or its row is retired) · a_replayed_trafficking_statement_answers_the_committed_row · an_adoption_exit_replay_answers_200_while_cases_is_down.

  • Fault (fault): a_fresh_adoption_exit_answers_503_while_cases_is_down_then_commits_on_retry — in-process over the devstack DB (the app_state_over fixture, api/list_scope_fence_tests.rs) with the cases projection at craig_test_lib::fault::s2s_stub spawn_fault_server: 503, no exit row, no claim; the same client_request_id against spawn_typed_response_server naming the person — committed.

  • Invariant (happy): P-B2’s partition test — P3 over placement at LAST_UNIT, P4 over the (h) person facts from U4 · the existing every_new_enum_is_its_dictionary_set_and_its_check gains an EnumRow per new enum, per new category column, and per scalar column reusing a shared enum — icwa_good_cause, icwa_transfer_requested, icwa_transfer_denied, the three (i)(4) columns, the four trafficking answers, adoptive_icwa_good_cause, special_education (12; check_list_tokens(<sql>, "CHECK (<col> IN (")) · cases' tests/constraints/child_icwa_facts_ddl.rs pins both tribe-order CHECKs · the existing the_portal_projection_key_sets_are_unchanged (evil) · the existing the_trigger_functions_are_byte_equal_across_databases (tests/constraints/removal_episodes_migration.rs:220) is extended to both guards (a refuse_fact_row_mutation() definer beside EVENT_GUARD_DEFINER, :187).

  • Property, DB-backed (evil, #[ignore = "requires devstack"]): child_fact_windows_never_overlap_under_generated_acts.

Verification

  • Per MR: P-B1’s gate list (fmt, clippy, budgets at their locks — new handlers in new modules under 500 lines: api/trafficking.rs, api/child_facts.rs), rules check (with P-B2’s partition finding), policy drift, check-docs, plan-lint, validate-authz-coverage, the evil-corpus / route-role / coverage-matrix gates per new route, the Playwright spec for each unit’s form or panel, the battery.

  • Close-out: the partition test green at 57 + 67 + 18 = 142, placement at LAST_UNIT (P3 over both maps); both element tests green (every_due_key_maps_to_a_column_its_dictionary_row_fits, every_mapped_column_exists_with_a_type_its_atom_admits); cargo xtask plan-lint --done docs/modules/ROOT/pages/plans/archive/afcars-placement-elements.adoc --allow-open 949,1073,1963,1965,1966,1973,2000,2027,2052.

Rollout + risks

Unit Roll first → then

U0, U7

docs only

U1, U5

placement → craig-web, craig-cli: until they roll, an N−1 writer’s fact-carrying body is refused 400 (a missing D6 key)

U2, U4

placement (voluntary floor bump, every replica replaced) → craig-web, craig-cli: the same refusal; an N−1 correction erases nothing

U3

placement (voluntary bump) → craig-web, craig-cli; the new EpisodeLedger values ride placement.episode_facts_changed, already in craig-security’s placement.episode_ family (event_parsing.rs:190-197) and reporting’s no-op allowlist — neither rolls

U6

craig-cases (voluntary floor bump, every replica replaced) → craig-web, craig-cli: the same refusal

Risks: the (d)(4) answers ride every staff episode read; the (e)(6) format waits on the ACF bulletins (#1973); each unit’s refusal window — an N−1 writer fails closed until it rolls.

Rulings requested (recommendation first; U0 records each and D1–D6 are then binding)

# Recommendation Alternative

R-B29

(d)(3) / (d)(4) / (i)(1) / (i)(4) on the removal response; trafficking in two episode event ledgers ⁂

all on the removal response (a no → yes becomes a "correction")

R-B30

(h) and (i)(10)–(i)(13) on the exit response, adoptive parents as cases persons

a separate (h) chain; captured person tokens (deletes four crosswalk tables)

R-B31

(b)(10)–(b)(12), (b)(14) in two per-child window ledgers (amends R-C2’s letter); (b)(9) a visit flag

NEW columns on the records (R-C2’s letter: write-once triggers, NAMED overrides, a school-age bundle bound, an IFSP home)

R-B33

the Tribe’s order is two cases child_icwa_facts columns, one per 1915(c) order (foster care or pre-adoptive; adoptive)

one shared flag (cannot hold a resolution setting one order); a per-arrangement and per-exit placement column

Errata requested on the program page: D5’s. Already ruled at P-B2’s gate (2026-09-26) and binding here: R-B32 — (b)(20) / (b)(21) placement-owned, derived by P-D (D4); R-B34 — (h)(14) is P-E’s (D3).

Review log

Round Vendor Resolved model Verdict

1

Anthropic — one fresh contextless reviewer (the page, the rules, the four questions)

Claude Opus 5.5

ship — no blocker; 14 non-blocking findings recorded on #2052 for the units

2

maintainer-run

as reported

no-ship — 13 findings, 7 corrections and the tribe-order question folded (D6’s replaced intents, required keys and facts_rev; (b)(9) bounded by the episode; the ungated ICWA block; live_through; the statement date CHECK; the adoptive slots; the web followers; the cases re-pin; the partition and enum pins; the racing-open outcome set; the fault test; two tribe-order columns)

verify

Anthropic — one fresh contextless verifier over the round-2 folds

Claude Opus 5.5

every finding fixed; 5 minor fold defects fixed (D6’s scope beside the health PUT, the child check on the correction and historical paths, the guardianship handoff follower, the OpenAPI required / nullable, the (e)(6) backstop) and 3 loose anchors corrected

Edit this page · latest