Plan: AFCARS Placement Capture II — The Arrangement Vocabulary, Setting Identity, the Element Map (#2026, P-B2 of #949)
- Archive record
- Status
- Context (census 2026-09-26, verified on
main) - Design
- D1 — One rule for where a fact lives
- D2 — Providers, the arrangement vocabulary and setting identity: (e)(2)–(e)(4) (R-B23, R-B36)
- D3 — Non-conventional periods are rows (R-B25)
- D4 — The kinship household (R-B26; ADR-076 D5 amended)
- D5 — Financial: the rate class, ERR, the residence run (R-B24, R-B27)
- D6 — Provider facts (e)(9)–(e)(18), through bindings (R-B28)
- D11 — The element map and the partition test
- D12 — ADR, docs, seed, followers, errata, inputs
- Units
- Test matrix (by risk)
- Verification
- Rollout + risks
- Rulings requested (recommendation first; U0 records each and D1–D6, D11, D12 are then binding)
- Review log
Archive record
Merge requests: !1728 (U0 plan page + the ADR-079 / ADR-076 D5 / ADR-056 amendments Proposed + the P-B3 page and issue, Relates #2026) + !1730 (U1, Closes #2054) + !1731 (U2, Closes #2055) + !1732 (U3, Closes #2056) + !1733 (U4, Closes #2057) + !1734 (U5, Closes #2058) + !1735 (U6, Closes #2059) + !1736 (U7, Closes #2060) + !1737 (U8, Closes #2061 / #2026; #1963 stays open for P-B3 #2052)
2026-09-27 — rev 2 approved in plan mode 2026-09-26 (rulings R-B22–R-B28, R-B32 and R-B34–R-B36 as recommended) after
a contextless round 1 of four lenses (20 blockers), a verifier over the folds (1 blocker), the maintainer’s gate on rev 1
(14 findings + 1 pre-existing gap) and a verifier over rev 2 (6 blockers); what landed — the element map (U1: Person /
Derived mappings, all 67 placement keys on their landing unit, OWNED_ELSEWHERE’s 18 keys and the `rules check
ownership partition 57 + 67 + 18 = 142; the stage at B2U5 after U5); providers (U2: foster_homes.provider_kind,
license_type iff family, the congregate refusals, provider_kind required on matching, the seed’s congregate twins);
the federal vocabulary (U3: placement_type = foster_family_home + the 14 (e)(4) tokens, the six ffh_type_* flags and
the generated foster_family_home, setting identity by CHECK and trigger, the rate class as bundle data returning today’s
payment types, ERR on the relative / kin flags); non-conventional rows (U4: a non-caregiving activation skips the facts hop
and the consult, financial’s silent skip); kinship households (U5: the case-less, admin_unit-scoped setting identity,
household-keyed caregiver bindings with the overlap EXCLUDE, the portal and portal payments re-keyed, the seed households);
the residence run (U6: derived at read time and served as PlacementSubsidyEligibility.residence, episode_exit served to
every caregiving member of a run ending at the episode’s latest effective arrangement — ADR-079 D4 amended — financial’s guardianship witness and SG / NRSG residence
floor on the run, a non-caregiving anchor refused 422); seed caregivers (U7: a primary binding per family home and per
kinship household, plus a co on each home that accepts sibling groups); ADR-079, ADR-076 D5 and ADR-056 amended and
Accepted as built, ADR-055 annotated; three craig_placement floors (20260927100000, 20260927120000, 20260928120000); two
refuse-on-data units (U3 a devstack wipe; U5 in place behind a four-shape guard). As built beyond the approved text: U5’s
guard has a fourth shape (a non-UUID created_by); a second OPEN binding stays 409 duplicate-resource, only a dated
overlap is caregiver-binding-overlap; Texas supervisors and regional directors hold no kinship-binding authority; the
binding events carry no audit resource id until #1877; D12’s "`licensed_at` falls after every generated start" does not
hold (the seed takes the earlier date literally); the close-out renamed the leftover kinship_unit test names and the
#1901 heal log field (kinship_options_unit_healed). Follow-ups: #2052 (P-B3, closes #1963), #2053 (the
binding-authority race, found by the gate), #2063–#2068 (the units' out-of-scope defects and gaps; #2062 fixed in
!1729), #2069 (the rate class in data-model-financial and the remaining kinship-placement wording). P-D’s input (#1965) —
D6’s caregiver slot rule and its missing data (an adult’s abandoned race / ethnicity), D3’s runaway exit finding, D11’s
(b)(20) blank rule (an undeterminable sibling blanks (b)(20) and (b)(21); placed_at_home siblings excluded), plus (e)(4)
blank when (e)(2) is yes and oohc.a1–a4 in OWNED_ELSEWHERE; P-E’s input — (b)(18), (h)(14) and the twelve
assistance keys in OWNED_ELSEWHERE (#1966).
Status
Done (2026-09-27) — !1737
Erratum (2026-09-26, U0): two contradictions in the approved text, corrected as the page lands — the SG / NRSG non-caregiving anchor refusal is U6’s (the Units table), not U3’s (D5 had it under ERR); and a run row between caregiving members counts within the residence span (the floor mechanism), where D5’s ⁂ line also said it "does not count toward" residence.
Erratum (2026-09-26, U2 #2055): two corrections — Rollout U2 reads placement → craig-web, craig-cli (backend first, the
FosterHomeView precedent), not craig-web, craig-cli → placement, with an accepted window until both roll (N−1 web and CLI
home creates and matching searches refuse, and no congregate provider may be created); and D12 Followers gains the k6 create bodies, since U2’s
required provider_kind on the create body makes the five k6 create bodies followers ("k6: U2’s create bodies; NCANDS none").
Erratum (2026-09-26, U3 #2056): Rollout U3 is craig-web → financial → placement. craig-security has nothing to roll —
it stores placement payloads verbatim (services/craig-security/src/lib.rs:675) and maps both events by type, and U3 adds
no routing key. Neither web / placement order has a working window (a new craig-web sends settings and ffh_types an
N−1 placement refuses; an N−1 craig-web cannot decode a new row); accepted because U3 is a devstack wipe and the guard
refuses any placements row elsewhere.
Erratum (2026-09-26, U5): D11’s "CARDINALITY_TABLES gains each table as it lands" covers tables holding a mapped element’s row; U5 lands none — (b)(21) is Derived over placements columns — so kinship_households is not added (#2058).
Erratum (2026-09-26, U5): Verification’s evil-corpus / route-role gates bite mutating verbs / craig-web BFF routes only; for the two household GETs the gates are validate-authz-coverage and the route→client mapping drift gate (#2058).
| Anchor | What binds here |
|---|---|
#2026; AFCARS 2020 Program (#949) |
A3 (crosswalks), A5 + its 2026-09-24 erratum, A6 (sources answer at each element’s anchor; provider race is PII) — errata requested (D12) |
D1–D5 and D7 as built — binding, except D4’s "an earlier arrangement gets null", which D5 amends (with ADR-079 D4) |
|
P-B3 (issue filed by U0) |
bound by D1 and D11; its R-B32 / R-B34 are ruled here |
|
every key, value set and anchor ((e)(3) / (e)(4) at pinned XML L604–L639); §1355.20 / .42 are NOT pinned — #2027 |
amended (D12); U0 waits for #2025 |
|
ADR-072 § Amendment — #949 |
federal text only in |
ADR-037, ADR-052, ADR-062, ADR-063 D3, ADR-077 D6, ADR-003 |
roster stays six; the re-anchor stays the only |
column
conventions; the seed rule; |
Lands as docs/modules/ROOT/pages/plans/afcars-placement-facts.adoc. ⁂ = a reading DFCS may rule otherwise, logged on #1073.
Rulings continue P-B1’s numbering; P-B3 holds R-B29–R-B31 and R-B33. ERR = GA’s Enhanced Relative Rate; SG / NRSG = GA’s
subsidized / non-reimbursable subsidized guardianship; GA 22.8 = that DFCS policy section; RTC / QRTP / CCI / SIL = the (e)(4)
congregate settings. A setting identity is the physical setting an arrangement names: a foster_homes row or a
kinship_households row.
Context (census 2026-09-26, verified on main)
Of 142 dictionary rows cases owns 57, placement 7 and 17 are neither’s; 61 need shapes P-B1’s map cannot hold
(services/craig-placement/tests/afcars_elements.rs:32-36). placement_type (8 tokens, enums.rs:1136-1153) keys money.
foster_homes is case-less and admin_unit-scoped (api/foster_homes.rs:44-66); nothing ties a setting to a home — the seed’s
residential rows name a family home (datagen.rs:2138-2139) and no congregate identity exists. caregiver_bindings key
foster_home_id XOR placement_id; placement-keyed bindings split a home-less household across a run or a re-record. The
generated seed rows name a home; the subsidy fixtures C, D, E, G (datagen.rs:3642, :3682, :3783, :3946) and the opt-in
backlog variant (:4695) are home-less kinship rows. The seed writes no bindings.
Design
D1 — One rule for where a fact lives
A fact lives on the row of its pinned grain, in the ledger class that row already has — for P-B3’s columns and ledgers too:
| Grain | Home | A later write is |
|---|---|---|
per arrangement |
a |
set on create / historical record; (e)(5)–(e)(8), (i)(5)–(i)(8) also by the PUT on a planned, active or ended row; the setting, its identity and the (e)(3) flags never change — retract + re-record |
per removal / per exit |
a |
a correction (supersede; (d)(2) / (g)(2) never move) |
per episode, changing |
an episode event ledger (P-B3 D2) |
a new statement |
per child, most recent |
a per-child window ledger (P-B3 D4) |
P-C D1’s four acts |
a person’s fact |
cases, reached through a person placement names (D6, P-B3 D3) |
cases' own acts |
-
Columns (P-C D1): value sets are
TEXTtokens under a CHECK;BOOLEANonly for anindicator; NULL = unanswered; a dependent leaf has a one-way gateCHECK (<dep> IS NULL OR <gate> IS NOT DISTINCT FROM '<token>'); cross-element agreement is P-D’s §1355.46 validator. Aneachcategory column is<prefix>_<category>, or over 63 bytes a hand-written<prefix>_<slug>. -
Enums: every stored closed set is a craig-reference enum with
strum::VariantNames, pinned to its dictionary set and CHECK;applies | does_not_applyandyes | no | not_applicableare one shared enum each. -
At rest
Plaintext(R-B13); A6’s PII class is enforced at the export. Not governed: nothing joinsfoster_home_portal. -
Wire: a changed body or payload is a CHANGELOG
Changed; a new routing key has its ADR-003 row and craig-security arm first.
D2 — Providers, the arrangement vocabulary and setting identity: (e)(2)–(e)(4) (R-B23, R-B36)
-
Providers (U2).
foster_homes.provider_kind TEXT NOT NULL∈family_home | congregate_facility(CHECK; immutable by trigger);license_typebecomes NULL-able and NOT NULL ifffamily_home(its CHECK kept; the update refuses alicense_typeon a congregate provider, 400 —store/foster_homes.rs:226COALESCEs it today); caregiver bindings, training and the portal refuse a congregate provider (422). The create / update bodies,FosterHomeView, the list filter?provider_kind=, craig-web’s home forms, the CLI and craig-test-lib’s builder carry it; the matching list (MATCHING_FILTER_SQL,store/foster_homes.rs:561-565) filters by the requested setting’s class. The with-home activation consult runs unchanged over a congregate provider’s own license, capacity, ages, ICWA and sibling facts (placements.rs:607-618); occupancy, the capacity guard and per-diem billing hold as for any home.xtask caregiver_coverageexpects caregivers only on family rows. Migration: every existing rowfamily_home; floor bump LAST (an N−1 image’s INSERT omits the column); no DB default. Authority unchanged (FosterHome). -
Vocabulary (U3).
PlacementTypeand its CHECK becomefoster_family_homeplus the 14 (e)(4) tokens verbatim, with a pin test ((e)(4) ∪ {foster_family_home} = enum = CHECK);trial_home_visitbecomesplaced_at_home. No crosswalk (P-A2 D4 stands). Three classes: family (foster_family_home), congregate (the three group homes, RTC, QRTP, both CCI, SIL) and non-caregiving (D3’s six). -
(e)(3):
FosterFamilyHomeType(licensed_home,therapeutic_foster_family_home,shelter_care_foster_family_home,relative_foster_family_home,pre_adoptive_home,kin_foster_family_home); six columnsffh_type_<category>(applies | does_not_apply), NOT NULL iff family (CHECK);Mapping::Each. Bodies and the row carryffh_types: Option<Vec<FosterFamilyHomeType>>: absent on a family row, present on another, or duplicated → 400. -
(e)(2):
foster_family_home TEXT GENERATED ALWAYS AS (CASE WHEN placement_type = 'foster_family_home' THEN 'yes' ELSE 'no' END) STORED. (e)(4):Mapping::Column(placements.placement_type); P-D blanks it when (e)(2) is yes. -
Setting identity (U3; U5 tightens it): from U3, family →
foster_home_idNULL or afamily_homeprovider (a home-less family row stays legal until U5 — the seed fixtures C, D, E, G are such rows); congregate →foster_home_idNOT NULL of acongregate_facilityprovider; non-caregiving → neither (CHECKchk_placements_setting_identity; the provider-kind agreement by a BEFORE trigger, SQLSTATE 23514 → 400SETTING_PROVIDER_MISMATCH; the API pre-checks both). From U5, family → exactly one offoster_home_id/kinship_household_id(D4). -
Migration (U3):
-- devstack: wipe-before-apply — … (#2026)on line 2; a refuse-on-data guard FIRST on anyplacementsrow; the re-cut, columns, CHECKs and trigger; floor bump LAST; rollback = N−1 images AND a restore; every replica replaced. U3 also landsis_caregiving()andrefuse_unbindablerefusing any placement unit but a home-less family row (422). -
Decoder window: no serde alias or default; a new-image craig-web refuses an old-token row — devstack-only (the wipe leaves none).
-
Followers: craig-web (a setting select, six checkboxes, a provider picker filtered by class); the CLI (
--ffh-type,--provider-kind);PlacementBuilder(foster_family_home+licensed_home);given/placement.rs; the Playwright twin; the U3 issue lists string fixtures by a census grep first.
D3 — Non-conventional periods are rows (R-B25)
-
A run, whereabouts unknown, a trial home visit and a juvenile-justice, medical or psychiatric stay are rows with that (e)(4) setting, under P-B1 D3’s containment and non-overlap, ended by an ordinary
end_reason. A child on the run when responsibility arrives is arunawayrow withstarted_at = removal_at. -
is_caregiving()isfalsefor exactlyrunaway,whereabouts_unknown,placed_at_home,juvenile_justice_facility,medical_or_rehabilitative_facility,psychiatric_hospital: no setting identity (D2). From U4 its activation — on BOTH paths, the birth-active create (placements.rs:571-580) andplanned → active(:1535-1544) — runs neither the cases placement-facts hop (eligibility.rs:595-607; its DOB and ICWA consult,craig-cases/src/api/placement_facts.rs:119-133) nor the matching consult: the episode open already ran the hop (api/episodes.rs:143), so a rules outage never blocks recording a run; the #1724 pair stays NULL. financial logs it without stagingmissing_foster_home(craig-financial/src/main.rs:1172-1182). -
Respite is still not a row (R-B16). ⁂ #1073: a short medical, psychiatric or juvenile-justice stay while the base arrangement is held open is not a row. ⁂ trial home visit: a
placed_at_homerow while responsibility lasts; the exit is dated when it ends. -
A
runaway_or_whereabouts_unknownexit whose leaving row is not a run or whereabouts row (or the reverse) is a P-D finding.
D4 — The kinship household (R-B26; ADR-076 D5 amended)
-
kinship_households:id UUID PK(v7) ·admin_unit TEXT NOT NULL·created_by,created_at. Case-less: one home-less family household, whatever case its children belong to — siblings of two cases in one relative home share it. No lifecycle; a trigger refuses every UPDATE and DELETE. -
placements.kinship_household_id UUID NULL REFERENCES kinship_households ON DELETE RESTRICT;chk_placements_setting_identitygains: family → exactly one offoster_home_id/kinship_household_id. -
Choosing it. The create and historical bodies carry
kinship_household: {"existing": <id>} | {"new": {"admin_unit"?}}, only on a home-less family row (else 400).existing: 409INVALID_KINSHIP_HOUSEHOLDwhen unknown; the actor needsFosterHomeRead on it (403).newmints in the act’s tx under the act’s own authorization (the create’s or the historical record’s — a household holds no fact but its unit); itsadmin_unitis the episode’s stamp, or — only while that stamp is NULL — the body’s (canonicalized as the foster-home create,api/foster_homes.rs:108-124); a body value beside a stamp, or neither, is 400. A household’s unit is fixed at mint (a worker-asserted unit on an unhealed case included; a household that moves is a follow-up). Absent on a home-less family row: a re-record — the live create or the historical record namingreplaces_placement_id— whose retracted row had a household reuses it; otherwisenewwith the defaults. -
Authority — a household is a home. Reads are
FosterHomerefs (the household id, no pair,admin_unit); binding acts areFosterHomeCaregiverrefs of the home-unit shape (api/caregiver_units.rs:76-90). Routes (newapi/kinship_households.rs):GET /v1/placement/kinship-households/{id}→{id, admin_unit, created_at};GET /v1/placement/kinship-households?person_id=→ the households where the person holds a binding, scoped byadmin_unitas the foster-home list (:344-360). -
Bindings (U5).
caregiver_bindings.placement_idbecomeskinship_household_id(XOR CHECK and open-person partial unique re-keyed); NEWEXCLUDE USING gist (COALESCE(foster_home_id, kinship_household_id) WITH =, person_id WITH =, daterange(effective_from, ended_on, '[)') WITH &&)— one person’s bindings on one unit never overlap (23P01 → 409CAREGIVER_BINDING_OVERLAP; the open-person unique’s 23505 keeps today’s 409;btree_gistexists; bindings are never deleted, so the guard’s remedy for an existing overlap is a restore — devstack: reseed).POST/GET /v1/placement/caregiverstradeplacement_idforkinship_household_id;Unit::PlacementbecomesKinshipHousehold. P-B1’sARRANGEMENT_HAS_BINDINGSguard and the create’s placement-row lock retire. The eligibility projection’s caregiver list is distinct by person (a binding ending ondand the next starting ondlist one person once). -
The pre-existing race. Binding end, invitation issue / revoke and identity revoke authorize before their tx and lock only their own rows (
caregivers.rs:334-374,caregiver_invitations.rs:83-296): a placement unit’s assignment pair, or a home’sadmin_unit(updatable,store/foster_homes.rs:223), can change unseen. After U5 no binding ref carries an assignment pair; the home-unitadmin_unitrace remains. U0 files both (and identity revoke reaching a person-wide identity) as onefix:issue. -
Readers re-keyed: the eligibility projection;
PortalUnitKindandpending_edits_fhp_unit_kind→home | kinship_household;SubjectCaregiverBindingtradesplacement_idforkinship_household_id,child_arrangement_ids(ACTIVE arrangements naming it — the portal’s child scope) andpayment_arrangement_ids(every arrangement ever naming it but cancelled ones — issued and cleared payments survive a retraction,craig-financial/src/store/payments.rs:333-346); financial’s portal subsidy leg readsa.placement_id = ANY(payment_arrangement_ids)(a household has no per-diem rows — home-less rows never bill,main.rs:1172-1181— so its per-diem leg is empty) andPortalUnit::PlacementbecomesKinshipHousehold(store/portal_payments.rs:84-100,api/portal_payments.rs:62-71);xtask/src/cmd/caregiver_coverage.rs:55; the invariantplacement_retracted_with_open_binding.sqlretires. -
Migration (U5): guard FIRST (a binding keying anything but a home-less family row; such a row with a NULL
admin_unit; two overlapping bindings of one person on one unit); one household per home-less family row (its id = that placement’s id, itsadmin_unitthe row’s; bindings andkinship_household_idmoved);DROP CONSTRAINT pending_edits_fhp_unit_kind, rewriteunit_kind 'placement'→'kinship_household',ADD CONSTRAINT(home | kinship_household);DROP COLUMN caregiver_bindings.placement_id; the EXCLUDE; the CHECK; floor bump LAST. Rollback = N−1 images AND a restore. -
Decoder window: a new-image portal or financial fails closed (503) on an N−1 placement’s
SubjectCaregiverBinding— devstack-only.
D5 — Financial: the rate class, ERR, the residence run (R-B24, R-B27)
-
Rate class (U3).
RateClass(foster_care | kinship | therapeutic | pre_adoptive | group_home | residential | supervised_independent_living, the valuesrate_tables.payment_type/payments.payment_typehold). Bundle data:StateBundle::rate_class_policy() → RateClassPolicySpec { family_home_precedence: &[(FosterFamilyHomeType, RateClass)], family_home_default, settings: &[(PlacementType, RateClass)] }, defaultTODAYS_PAYMENT_TYPES; financial’srate_class(&spec, setting, &ffh_types) → Option<RateClass>, first applying flag wins:Setting (flags, first applying wins)
RateClassfamily:
pre_adoptive_home; elsetherapeutic_…; elselicensed_home⁂pre_adoptive;therapeutic;foster_carefamily: else
relative_…orkin_…; else nonekinship;foster_caregroup_home_*; RTC, QRTP, both CCI; SILgroup_home;residential;supervised_independent_livingnon-caregiving
none
placement.activatedgainsffh_types; every read of itsplacement_typeas a payment type reads the class (main.rs:1062-1068,:1348-1349,:1473). A congregate row bills on its provider’sfoster_home_idas any homed row. -
ERR (U3).
err_qualifying_placement_types(craig-state-bundle/src/subsidy.rs:113) becomeserr_qualifying_home_types
err_disqualifying_home_types— Georgia: relative, kin; licensed ⁂.PlacementSubsidyEligibilitygainsffh_types; ERR qualifies on a family anchor with a qualifying flag and no disqualifying one (api/subsidy_create.rs:421-422).placement.recordedgainsplacement_typeandffh_types(its payload is strict,events.rs:291— financial rolls first); P-B1’s re-anchor (inbox/anchor_replacement.rs) still moves an ERR agreement onto its replacement (ADR-052) and raises the #1070-class WARN when the replacement fails the ERR rule. -
The residence run (U6) — derived at read time, never stored or moved. For a caregiving arrangement X, its run is the maximal sequence of effective arrangements of X’s episode, by
started_at, containing X, whose FIRST and LAST members are caregiving, whose caregiving members all name X’s setting identity, and in which each member starts on the jurisdiction date the previous one ended (date_of(next.started_at) = date_of(prev.ended_at),BusinessClockasplacements.rs:1134; two members on different dates end the run); non-caregiving members sit only between. Recomputed on every read, so a correction, retraction, historical record or replacement changes it at once; no event carries it; no agreement moves (ADR-052’s re-anchor unchanged).-
Placement:
PlacementSubsidyEligibilitygainsresidence: Option<{ started_on, ended_on: Option<NaiveDate>, arrangement_ids }>— served for an effective caregiving anchor only (null for a planned, cancelled, retracted or non-caregiving one): the first member’s start, the last member’s end (null while it is open).episode_exitis served when the anchor is its episode’s latest effective arrangement (P-B1’s rule,store/exit_responses.rs:97-110) OR its run’s last member is — this AMENDS P-B1 D4 / ADR-079 D4’s "an arrangement the child left earlier gets null": an earlier arrangement of the same run is witnessed, one of another setting identity or across a gap still gets null. Caregivers are filtered on the run’s identity atexit_on. -
Financial:
witness_guardianship_exit(subsidy/guardianship_witness.rs:53-89) requiresresidence.ended_on == exit_onin place of the anchor’sended_on;verify_guardianship_endingpassesresidence.started_onthroughActivateGuardianshipParams(api/subsidy_activate.rs:160-170) intocheck_activation_witnesses’ residence floor (`subsidy/store.rs:3076-3094), in place of the snapshot — so a run, a replacement on either path and a later correction all judge the live history.placement_started_onstays the ERR coverage start and snapshot. Billing, ERR generation and the review sweep read no residence (billing never reads the anchor,main.rs:1164-1252). SG / NRSG creates refuse a non-caregiving anchor (422,api/subsidy_create_guardianship.rs:151-156). The #1070 WARN arms still fire when a run member ends (inbox/guardianship_warns.rs:88-97): at that moment the child has left the subsidized home; a later return restores the run, and the witness judges the live run when it runs. -
P-B1 tests and texts rewritten in U6:
an_earlier_arrangement_never_witnesses_a_later_guardianship_exit(services/craig-placement/tests/api/episode_exit.rs:140-172) splits into a different-identity case (still null) and a same-home adjacent case (served);the_projection_and_the_rewrite_state_one_latest_effective_rule(store/exit_responses.rs:246-265) pins the U6c rewrite’s rule as history and the projection’s run rule apart; the witness’s module doc and NO_EXIT detail (guardianship_witness.rs:7-10,:33-39). -
⁂ #1073: a run or hospital row between two caregiving members does not interrupt GA 22.8’s residence, and its days fall inside the run’s span (the floor compares
residence.started_onwith the transfer); ADR-056’s residence window is the run (amended).
-
D6 — Provider facts (e)(9)–(e)(18), through bindings (R-B28)
-
No stored column. (e)(9)–(e)(13) / (e)(14)–(e)(18) describe the first / second foster parent of a family arrangement’s identity (
foster_home_idorkinship_household_id; none when (e)(2) = no) on its (e)(1) dated. Covering bindings:effective_from ⇐ d AND (ended_on IS NULL OR ended_on > d) AND ended_on IS DISTINCT FROM effective_from. Slots are DISTINCT PERSONS: each person takes its first covering binding by (roleprimary,co;effective_from;created_at;id); the first two persons in that order fill First and Second (U5’s EXCLUDE makes a person’s overlap unrepresentable). ⁂ #1073: "first / second" has no CFR meaning; a caregiver bound afterdis not reported for that arrangement. -
Values at
d, from cases: year =persons.birth_year, elseyear_of_birth_declared; sex =persons.sex; the liveperson_demographic_factsrow’stribal_member, sevenrace_*andethnicity(ethnicity—oohc_e12/e17). An adult’sabandonedrace or ethnicity is P-D missing data ⁂. -
Map:
Mapping::Person { via: CaregiverSlot(First | Second), fact }(D11). P-D inputs (#1965): placement’s export answers the two slot person ids per arrangement; cases'persons/afcars-exportadmits caregiver ids.
D7–D10 moved to P-B3 as its D1–D4 (R-B22).
D11 — The element map and the partition test
-
Mapping(craig-reporting-contracts) gainsPerson { via: PersonVia, fact: &'static Mapping }(via:CaregiverSlot(First | Second)orColumn { table, column }) andDerived { placement: &'static [(&str, &str)], cases: &'static [(&str, &str)] }. (b)(20): casesperson_siblingsperson_a,person_b,effective_from,effective_until,retired_at; placementremoval_episodeschild_id,removal_at,exit_at,retired_atandplacementschild_id,placement_type,activated_at,started_at,ended_at,status. (b)(21): those plusplacementsfoster_home_id,kinship_household_id.DateWithIndicator.dateholds (h)(15)'s integer (one doc line). -
Per R-B32 (ruled here): (b)(20) counts siblings whose live episode covers the anchor AND whose effective arrangement there is not
placed_at_home⁂ (§1355.20 unpinned; #2027); a sibling whose live episode covers the anchor with no effective arrangement there makes (b)(20) — and so (b)(21) — blank (§1355.43(d): never default missing information; a blank costs the record’s clean class, so P-D reports the sibling’s gap as its data-quality finding) ⁂. (b)(21) counts those whose arrangement at the anchor names the child’s setting identity; non-caregiving rows share none ⁂. P-B3 D4 carries this text. -
The map:
PlacementCaptureUnitbecomes one variant per landing unit; U1 lists all 67 keys inOWNED_ELEMENTS(len == 67),owned_after_unit(key)andLAST_UNIT(= B3U5; cases gains the same const). The stage test is an exact set match, so landing units merge in variant order — U1, U3, U5, then P-B3 U1…U5:Rows
n
Variant — landing unit
(d)(1), (d)(2), (e)(1); (g)(1)–(g)(4)
3; 4
B1U3,B1U4— P-B1 U3, U4 (todayU3,U4)(e)(9)–(e)(18); (b)(20)
11
B2U1— U1, THE MAP(e)(2), (e)(3), (e)(4)
3
B2U3— U3, THE VOCABULARY(b)(21)
1
B2U5— U5, KINSHIP HOUSEHOLDS (every identity exists)(e)(5)–(e)(8), (i)(5)–(i)(8)
8
B3U1— P-B3 U1(d)(3), (d)(4), (i)(1)(i)–(iii), (i)(4)(i)–(iii); (d)(5)–(d)(6)(ii)
8; 6
B3U2,B3U3(h)(1)–(h)(13), (h)(15), (i)(10)–(i)(13)
18
B3U4(b)(9)–(b)(12), (b)(14)
5
B3U5;LAST_UNIT -
The hermetic test takes cases' shape rule plus
NAMED_OVERRIDES,PERSON_KEYS,DERIVED_KEYS;CARDINALITY_TABLESgains each table as it lands.at_u4_every_owned_key_is_mappedbecomes the interim probea_key_owned_after_the_stage_is_unmapped; P-B3 U5 turns it intoat_the_last_unit_every_owned_key_is_mapped. The devstack test types every named column (token →text, indicator →boolean, integer →integer/smallint, date →dateortimestamp with time zone); aDerivedinput exists. -
OWNED_ELSEWHERE(18):oohc.a1–a4→ P-D (#1965);oohc.b18,oohc.h14, 12assist.*→ P-E (#1966). -
The partition test —
xtask/src/cmd/afcars_partition.rs, arules checkfinding (xtask gainscraig-placement-contracts): P1 every dictionary key in exactly one of the twoOWNED_ELEMENTSandOWNED_ELSEWHERE; P2 every listed key a dictionary key; P3 a map at itsLAST_UNITmaps every owned key; P4 everyPerson/Derivedcases half inDEFAULT_REGISTRY; P5 a synthetic double owner and orphan reported. From U1: 57 + 67 + 18.
D12 — ADR, docs, seed, followers, errata, inputs
-
ADRs (R-B35): ADR-079
== Amendment (<date>, #2026)records this page’s D1–D6 and amends ADR-079 D4 (an earlier arrangement of the same residence run is witnessed, D5), re-pointing "the rest is P-B2’s (#2026)" (L11) to P-B2 + P-B3; ADR-076 D5 (the household); ADR-056 (the residence window is the run, D5). Drafted in U0; flipped as-built at close-out. -
Docs per unit:
data-model-placement.adoc(canonical),shared-crates.adoc,rulesets.adoc, the ADR-003 rows, the deployment guide § AFCARS placement capture rollout, CHANGELOG per MR. -
Seed (new values DERIVED from existing draws, one bless per MR):
-
U2: per home a seeded
residentialrow names, a congregate provider twin (Uuid::new_v5(&home_id, b"congregate_provider")) copying the home’sadmin_unit, capacity, license status and expiry, ages, ICWA and sibling facts (so the consult admits it), with nolicense_type; those rows name the twin. -
U3:
foster_care→ (family, {licensed});kinship→ (family, {relative});therapeutic→ (family, {licensed, therapeutic});residential→residential_treatment_centeron its twin. -
U5: a household per home-less family row — fixtures C, D, E, G and the backlog variant — by the migration’s rule: its id is that placement’s id, its
admin_unitthe row’s (a migrated devstack and a fresh reseed agree). -
U7: per family home a
primarybinding, pluscoiffaccepts_sibling_groups; per household aprimarybinding (the fixture’s relative party when it names one, else a derived caregiver); each effective from the earlier of the home’slicensed_atandBusinessClock::date_ofits first seeded arrangement’sstarted_at(the jurisdiction date D6’sduses;licensed_atfalls after every generated start,datagen.rs:2012-2018vs:2601-2606). Caregivers are cases personsUuid::new_v5(&unit_id, b"caregiver_primary" | b"caregiver_co"), their facts from the id’s bytes.
-
-
Followers: craig-web, craig-cli, craig-test-lib, the Playwright twin; k6 and NCANDS none.
-
Program errata (U0): the P-B row (P-B2 weight 25, P-B3 24); A5 —
arrangement_typeover the state’s vocabulary is not buildable as crosswalk data (the federal tokens are the vocabulary, R-B23); A6 — placement’s export carries slot person ids. P-D inputs (#1965): D6’s slot rule and missing data; D3’s runaway exit finding; D11’s (b)(20) blank rule. -
P-B3 draft errata (U0): its D4 (b)(20) / (b)(21) text per D11; "kinship unit" → "kinship household"; congregate identity per D2.
Units
Each MR Relates to #2026 and #949 and closes its unit issue; the close-out Closes #2026. A landing unit (U1, U3, U5) bumps
AFCARS_CAPTURE_STAGE to its variant.
| MR | Scope | W |
|---|---|---|
U0 |
this page (Active nav, the P-B3 number filled in for |
1 |
U1 |
THE MAP (D11): |
3 |
U2 |
PROVIDERS (D2): |
3 |
U3 |
THE VOCABULARY (D2, D5 rate class + ERR): the re-cut, setting identity + its trigger, |
5 |
U4 |
NON-CONVENTIONAL ROWS (D3): the hop and consult skip on both paths, financial’s silent skip |
2 |
U5 |
KINSHIP HOUSEHOLDS (D4): the table, routes, choice, bindings + EXCLUDE, readers, portal payments, seed households |
5 |
U6 |
THE RESIDENCE RUN (D5): the projection’s |
3 |
U7 |
SEED CAREGIVERS (D12) |
2 |
U8 |
CLOSE-OUT: the amendments Accepted as-built, |
1 |
Weight 25; P-B3 carries 24. Start order: U0 → U1 → U2 → U3 → {U4, U5}; U6 needs U4 and U5; U7 needs U5. Merge order (D11): U1,
U3, U5, then P-B3’s U1–U5. Every MR green alone; // @axis: on every new test.
Test matrix (by risk)
-
Money:
the_rate_class_follows_the_d5_table_for_every_setting_and_flag_set(property; a reference fn from the table) ·a_kinship_err_qualifies_on_the_relative_or_kin_flag·a_licensed_relative_home_is_not_err_eligible·a_congregate_row_bills_on_its_provider·a_non_caregiving_row_bills_nothing_and_signals_nothing. -
The residence run (U6):
a_run_and_return_keeps_the_residence_start·members_on_different_dates_end_the_residence_run·a_leading_run_row_never_counts_toward_residence·correcting_the_run_into_another_home_breaks_the_residence_at_once·a_replaced_member_keeps_the_run_on_both_paths·the_witness_reads_the_run_end_against_exit_on·a_non_caregiving_or_retracted_anchor_has_no_residence·a_same_home_adjacent_predecessor_is_witnessed·an_sg_create_refuses_a_non_caregiving_anchor· property, DB-backed (requires devstack):the_served_run_equals_the_reference_derivation_under_generated_acts. -
Evil: a service principal on the binding and household routes — 403;
ffh_typeson the wrong class — 400; a congregate row naming a family home, or a family row a congregate provider — 400SETTING_PROVIDER_MISMATCH; a non-caregiving row naming any identity — 400; an unknown household — 409INVALID_KINSHIP_HOUSEHOLD;newwith neither, or with both, a stamp and a bodyadmin_unit— 400; overlapping bindings — 409CAREGIVER_BINDING_OVERLAP; a binding, training row orlicense_typeon a congregate provider — 422 / 400; anykinship_householdsUPDATE or DELETE, or aprovider_kindchange — refused by trigger. -
Sad:
siblings_of_two_cases_in_one_household_share_it·a_replacement_reuses_or_mints_its_household_as_chosen·a_retracted_arrangements_payments_stay_visible_in_the_portal·one_person_fills_one_slot·a_runaway_row_activates_while_rules_are_down·every_seeded_family_arrangement_has_a_first_slot_at_its_start. -
Invariant: the partition tests P1–P5 ·
every_new_enum_is_its_dictionary_set_and_its_check·the_portal_projection_key_sets_are_unchanged·the_trigger_functions_are_byte_equal_across_databases. -
Concurrency: two creates minting households for one relative home (two households — admitted; staff pick
existing); a binding create racing an overlapping one — one 409. Live: Playwright — a run and return keeps the caregivers and the residence.
Verification
-
Per MR: P-B1’s gate list,
rules check(with the partition finding),policy drift,check-docs,plan-lint,validate-authz-coverage, the evil-corpus / route-role / coverage-matrix gates over the household and binding routes, the battery. -
Close-out: the partition test green at 57 + 67 + 18 = 142 with placement at
B2U5or later; both element tests green;plan-lint --doneand each grep EMPTY:cargo xtask plan-lint --done docs/modules/ROOT/pages/plans/afcars-placement-facts.adoc --allow-open 949,1963,1073,2000,1965,1966,2026,2027,2052 rg -n -g '!**/migrations/**' -g '!CHANGELOG.adoc' -g '!docs/**' \ 'trial_home_visit|PlacementType::(FosterCare|Kinship|Therapeutic|PreAdoptive|GroupHome|Residential|TrialHomeVisit)\b' \ services crates tools tests/e2e rg -n -g '!**/migrations/**' -g '!CHANGELOG.adoc' -g '!docs/**' \ 'err_qualifying_placement_types|PortalUnitKind::Placement|Unit::Placement|ARRANGEMENT_HAS_BINDINGS|at_u4_every_owned_key|kinship_unit' \ services crates tools xtask
Rollout + risks
| Unit | Roll first → then |
|---|---|
U1, U7, U8 |
no service order |
U2 |
craig-web, craig-cli → placement (floor bump, every replica replaced) |
U3 |
craig-security → craig-web → financial → placement (guard, floor bump, every replica replaced; devstack wipe + reseed) |
U4 |
financial → placement |
U5 |
craig-portal, financial → placement (guard, floor bump) → craig-web |
U6 |
placement (serves |
Risks: U3 moves every money key at once (the property test pins D5’s table); U5 re-keys the portal and portal payments; a
household’s admin_unit is fixed at mint (a household that moves is a follow-up); U0 waits on #2025.
Rulings requested (recommendation first; U0 records each and D1–D6, D11, D12 are then binding)
| # | Recommendation | Alternative |
|---|---|---|
R-B22 |
applied: D7–D10 move verbatim to a gated P-B3 page and issue |
one page |
R-B23 |
|
a fleet vocabulary + crosswalks |
R-B24 |
the rate class is bundle data returning today’s payment types, licensed before relative / kin ⁂; ERR on the relative / kin flags, not licensed ⁂ |
re-price by setting now; a licensed relative stays |
R-B25 |
six non-caregiving settings activate with no placement-facts hop, no consult, no |
today’s hop and consult on every row |
R-B26 |
case-less |
case-scoped units (siblings of two cases apart); assignment-scoped bindings |
R-B27 |
the residence run is derived at read time (date-adjacent, one setting identity, caregiving at both ends, non-caregiving rows between); the witness and the floor read it; nothing moves; P-B1 D4 / ADR-079 D4 amended ⁂ |
continuation events moving anchors (ordering, staleness); WARN only |
R-B28 |
provider facts through bindings; distinct persons fill the slots; no overlapping bindings |
captured provider tokens |
R-B32 |
(b)(20) / (b)(21) placement-owned, derived by P-D: |
a placement → cases sibling read; episode-only (b)(20) |
R-B34 |
(h)(14) is P-E’s ( |
a placement capture beside P-E’s agreement |
R-B35 |
amend ADR-079, ADR-076 and ADR-056; no new ADR; nothing governed; group (i) captured now |
a new ADR |
R-B36 |
congregate providers are |
a separate facility registry (a new resource type; per-diem re-keyed) |
Errata requested on the program page: D12’s. R-B29–R-B31 and R-B33 are requested on P-B3.
Review log
| Round | Vendor | Resolved model | Verdict |
|---|---|---|---|
1 |
Anthropic — four fresh contextless lenses (implementer, adversarial domain, Q3/Q4 reader, anchor verifier) |
Claude Opus 5.5 |
no-ship — 20 blockers folded (merge order; routes; U4’s readers; the no-home CHECK into the re-cut; the (e)(3) body, rate seam
and payloads; the |
verify |
Anthropic — one fresh contextless verifier over the folds |
Claude Opus 5.5 |
no-ship — 1 blocker (the grep’s word boundary) fixed, 7 advisories adopted; R-B32 / R-B34 moved to this gate |
gate |
maintainer (plan mode; rev 1) |
— |
no-ship — 14 findings + 1 pre-existing gap folded into rev 2 (the residence run derived at read time; case-less households; congregate providers; seed households, twins and binding dates; the explicit household choice; the pending-edit order; payment history; (b)(20)'s setting and blank rule; distinct slots and the binding EXCLUDE; the hop skip; the race filed) |
verify |
Anthropic — one fresh contextless verifier over rev 2 against the 15 gate items |
Claude Opus 5.5 |
no-ship — 11
fixed, 4 partial, 6 blockers; all fixed (ADR-079 D4 amended with the P-B1 tests named; the run bounded by caregiving members;
|
gate |
maintainer (plan mode; rev 2) |
— |
ship — approved 2026-09-26 (rulings as recommended) |
2 |
open — run by the maintainer through another vendor’s model |
open |
open |