Plan: AFCARS Pipeline I — The Sources: Three Service-Only Projections (#1965, P-D1 of #949)
Archive record
Merge requests: !1764 (U0 plan page + D7’s errata + the unit, page and follow-up issues, Relates #1965) + !1765 (U1, Closes #2118) + !1766 (U2, Closes #2119) + !1767 (U3, Closes #2120) + !1768 (U4, Closes #2121) + !1769 (U5, Closes #2122) + !1773 (U6, Closes #2123) + !1775 (U7, Closes #2124)
2026-10-01 — approved in plan mode 2026-09-30 (rulings R-D1–R-D7 as recommended) after a contextless round 1 (no-ship, 3
blockers fixed, 10 findings folded), the maintainer’s round 2 (no-ship, 12 findings and the mixed-time limitation folded) and
a fold check (every finding fixed); what landed — settings (U1: placement_base_url onto ServiceSettings; craig-reporting
reads settings.cases_base_url, its env renamed CRAIG_REPORTING__CASES_BASE_URL, no alias); the placement export (U2:
GET /v1/placement/afcars-export, the craig-reporting-only caller gate, D3’s window through the new shared
craig_common::export_window, craig_validation::bounded_page_limit, the cohort closed at from, the kind-tagged row
stream and keyset cursor, the episode and arrangement rows, one placement.afcars_released per non-empty page — the
event’s first producer); the placement facts (U3: the caregiver slots, the trafficking_statement and
law_enforcement_report rows, the health and education windows, the (b)(9) health_assessment_visit rows); the cases export
(U4: POST /v1/cases/persons/afcars-export, child keys (person, case) and adult keys (person, role), at most 500 keys
and 10 000 anchors per call, the key-digest cursor, the narrow types, membership not_found, the DOB-only decrypt, the
person and demographic_window rows, case.person_pii_exported through publish_person_pii_released_for_afcars, the
release requestor and purpose types moved to craig_reporting_contracts::afcars_release, ADR-041, ADR-051 and ADR-078
amended (R-D5) plus an ADR-003 wrapper row, the ledger-lift golden re-blessed); the cases ledgers (U5: parent_cells over
ledger rows normalized to as_of, the child window ledgers with ICWA also at each anchor, permanency plans, reviews, sibling
links and visits); financial (U6: GET /v1/financial/afcars-facts, the R-D4 predicate, child-id keyset pages, no-store,
no audit and no transaction; OWNED_ELSEWHERE’s `oohc.b18 row moved to #1965). No unit adds a migration; nothing consumes
the routes until P-D2. Full-page timings on #1965, each at limit = 1000 against 4 s (half the 8 s S2S_HOP_BUDGET):
placement 75.5 ms median (U3), cases 58.95 ms median (U5); the 1 000-row ceiling stands. Errata (2026-10-01): U4’s store
reads sit in services/craig-cases/src/store/afcars_export.rs and services/craig-cases/src/store/person_demographics.rs,
and D3’s window check is the one shared craig_common::export_window; U5’s ledger reads sit in
services/craig-cases/src/store/afcars_ledgers.rs, its visit row answers occurred_at, and its icwa_window carries the
two tribe orders. Follow-ups: the later P-D pages #2125 (P-D2), #2126 (P-D3), #2127 (P-D4) and #2129 (P-D5, after #1987);
#2128 (the tardy transcription, before P-D3’s classes unit); #2130 (NCANDS’s marking-only transmit route); #2131 (the
history of D3’s class-3 edits). P-D2’s inputs — the routes and contracts, the bounds, the refusal split, the audit keys,
the timings, financial_base_url with its client, (a)(3)'s case selection and the #2027 population node — go to #2125.
#1965 stays open: P-D5’s close-out resolves it.
Status
Done (2026-10-01) — !1775
| Anchor | What binds here |
|---|---|
#1965; AFCARS 2020 Program (#949) |
A6 (resolved instants; facts at each element’s anchor; the three projections) with its 2026-09-26 and 2026-09-28 errata, R11 (PII posture), R12 (no delivery) — errata requested (D7); A7–A10 belong to P-D2–P-D5 (D1) |
The P-D inputs on #1965 (P-C, P-B1, P-B2 D3 / D6 / D11, P-B3 D2–D4, P-B3 U3) |
binding: the release-audit key, the caregiver slot rule, the adoptive-parent ids, the trafficking anchor, the Tribe’s order at arrangement and exit dates, the parent year rule, the (c)(5) arms |
P-C (#1964) D5 and its (a)(1)–(a)(4) erratum ( |
|
|
every anchor, value set and clean class cited here |
ADR-041 § Amendment #1990 and its |
amended (R-D5): the child’s and the adoptive parents' date of birth |
ADR-003 (the multi-wrapper rule), ADR-022 (the outbox), ADR-068 D1a (the ceilings) |
a new |
|
the precedent: a service-only export to craig-reporting, its allowlist of one,
its |
⁂ = a reading DFCS (Georgia’s Division of Family and Children Services) may rule otherwise, logged on #1073. ACF: the Administration
for Children and Families. "Local" is craig_common::clock::BusinessClock on the service’s jurisdiction clock (date_of,
instant_of_local).
Context (census 2026-09-30, on main)
-
No projection exists. No
afcars-exportroute in any service; financial has no service-only route at all. The casespersons/federal-export(cap 5 000) was deleted as over-disclosing (#1990); A6’s 5 000 is its cap. -
The audits are half built.
placement.afcars_releasedis catalogued with a strict payload and a craig-security arm (crates/craig-placement-contracts/src/events.rs:120-165,services/craig-security/src/event_parsing.rs:518) but has no producer. Cases audits a purpose-tagged release throughcase.person_pii_exportedwrappers (services/craig-cases/src/events.rs:413-431,:706-731); craig-security audits the key on its generic order. -
The rows are captured and complete. The placement map is at
LAST_UNIT(67 keys), the cases map at its last unit (57); the partition is 57 + 67 + 18OWNED_ELSEWHERE= 142 (xtask/src/cmd/afcars_partition.rs). Every cases-owned child element is anchored atperiod_end; placement’s atremoval_date,arrangement_date,exit_date,period_endor, for (b)(11),period_end_or_exit(dictionaryo_temporal_anchor). §1355.44(f) bounds no event history to the period ("each permanency plan", "each periodic review", "each date"). -
Two approved texts disagree.
OWNED_ELSEWHEREgives (b)(18) to #1966 (crates/craig-reporting-contracts/src/afcars_capture.rs:139), A6 and #1965 to P-D (R-D3). (b)(1) isdate + indicator, clean classhundred_percent, and (h)(3) / (h)(8) are dates, yet ADR-041, ADR-051 and ADR-078 say the file reports a year (R-D5). -
The bulletins gate the surface. The dictionary has no
metadatapins, so a deployed surface stops atlayout-unpinned(services/craig-reporting/src/afcars_surface/verify.rs:164-182) until #1987; §1355.46(b)(5)'s tardy rule ("more than 30 days after the event") is pinned federal text that no dictionary table carries.
Scope
In: D2’s settings; the three routes with their contracts, audits, test-lib clients and API pages (D3–D6); P-D’s decomposition and the errata, issues and ⁂ entries it implies (D1, D7).
Out: reporting’s clients and everything that consumes the answers — element derivation, applicability, the population rule
(#2027), records, validation, the artifact, readiness (P-D2–P-D5, D1); the assistance cohort (P-E extends afcars-facts); any
NCANDS change.
Design
D1 — P-D in five gated pages (R-D1, R-D2)
| Page | Scope | W | Starts |
|---|---|---|---|
P-D1 |
this page |
25 |
now |
P-D2 |
records and generate: the reporting field key, |
≈ 30 |
after P-D1; its population unit after #2027 |
P-D3 |
validation (A8) without the bulletin rows: the predicate evaluator, exemptions, applicability, |
≈ 25 |
after P-D2; its classes unit after the tardy transcription (R-D6) |
P-D4 |
readiness (A9 without the bulletins): the encrypted artifact, readiness in the export finalizer, |
≈ 19 |
after P-D3 |
P-D5 |
the bulletin half: consistency, recurrence, aggregation overrides; the XML replacing the TSV; the record number and its
key custody; the A10 reservation and the lifecycle e2e; the seed test; |
≈ 30 |
after #1987 |
-
Each page runs census → design → round 1 → the maintainer’s gate, and gets a plan issue at U0 (P-D2 … P-D5,
Plan::NEEDED). -
Until #1987 no deployed surface verifies, so from P-D2’s generate unit a real AFCARS generate answers the typed 503
afcars-surface-not-ready. Nothing working is lost: today’s generate returns a zero-record draft that can never advance (services/craig-reporting/src/api/afcars.rs:63-145). -
Forks their own pages decide: the seed test’s reachable outcome ((h)(14) is P-E’s; (a)(4) waits on #1987); the lifecycle e2e under R14 (an API-created far-past removal is honestly tardy); the reservable pool (2023A is the only seed-free half); `review-afcars’s surfaces.
D2 — Settings (A6)
-
placement_base_urlMOVES fromFinancialSettingstoServiceSettings, besidecases_base_url, with its default. craig-financial readssettings.placement_base_url(services/craig-financial/src/main.rs:249); its env name is unchanged (CRAIG_FINANCIAL__PLACEMENT_BASE_URL). Never a twin: flatten hands a leaf two structs declare to the first (settings.rs:297-304). -
Reporting reads
settings.cases_base_url, not the raw env:CRAIG_REPORTINGCASES_URLbecomesCRAIG_REPORTINGCASES_BASE_URLindocker-compose.yml,.env.example(:177),configuration-reference.adocanddeployment-guide.adoc, andshared-crates.adoc’s settings list names the moved leaf. Pre-1.0 there is no alias; the CHANGELOG `Changedentry carries the Ops line. -
financial_base_urllands with its first reader, P-D2’s client (erratum on A6’s "in P-D’s first unit"): no unread leaf ships. -
Pins, on the
settings.rs:2490-2500precedent: a non-default value under the financial and the reporting prefixes reaches the oneplacement_base_url/cases_base_urlleaf through the production loader.
D3 — The contract the three routes share
-
Caller.
claims.require_service_caller()?, thenclaims.service_id() == Some(AFCARS_EXPORT_CONSUMER)("craig-reporting") andclaims.channel().is_none()(no honouredX-Craig-Actorrelay,crates/craig-auth/src/claims.rs:243; the middleware honours one on any service caller), else 403 before any read. The// authz: skip — …line sits directly above theutoipaattribute (services/craig-cases/src/api/ncands.rs:46-55): a consumer identity is not jurisdiction policy. -
Window.
from,to(exclusive) andas_of: RFC 3339 instants, all required.fromandtomust each be a local midnight (instant_of_local(dat 00:00`)` equals the instant) withfrom < to, so the date and instant views agree: an instanttis in the period ifffrom ⇐ t < to, a datedifffrom_d ⇐ d < to_d(from_d = date_of(from),to_d = date_of(to)), andperiod_end = to_d − 1 day.as_oflies at leastEXTENDED_REQUEST_CEILING(5 min, the longest request ceiling,crates/craig-common/src/ceiling.rs:58) in the past, so every request transaction that stamped a row at or before it has ended before page 1 is read. No period string and no local date on the wire; every request struct isdeny_unknown_fields. -
Refusals. GET (D4, D6): an unknown or malformed parameter is the
Queryextractor’s 400; a window,as_of,limitor cursor check is 400bad-requestnaming the parameter (the NCANDS 400s,ncands.rs:60-63). POST (D5): a JSON data error (unknown field, wrong type, missing key) is the extractor’s 422 (crates/craig-common/src/extract.rs:3-18); a window,as_of, cap, key or cursor check is 422validation-failednaming the field. -
As of — three classes. (1) A ledger row (
recorded_atandretired_at) is read as it stood atas_of: visible iffrecorded_at ⇐ as_ofand (retired_at IS NULL OR retired_at > as_of), and normalized to that snapshot before any use — a retirement afteras_ofreads as live; a close afteras_ofreads open (effective_untilandclosed_atNULL; one statement sets both,crates/craig-ledger/src/store/window.rs:124). (2) A stamped table is fenced on its stamps: an arrangement is effective iffactivated_at ⇐ as_of AND (status <> 'retracted' OR retracted_at > as_of)(bothnow(),store/placements.rs:381,:494); a contact or health record exists iffcreated_at ⇐ as_of AND (deleted_at IS NULL OR deleted_at > as_of)(soft deletes stampdeleted_at,store/contacts.rs:209,store/health.rs:278); a caregiver binding iffcreated_at ⇐ as_of; a payment iffissued_at ⇐ as_of. (3) In-place edits keep no history and read as they stand when the page is read:placements.ended_atand fact columns,caregiver_bindings.ended_on,health_recordsvalues,contacts.occurred_at,visited_child_idandlocation(store/contacts.rs:178-185),persons,cases,case_household,payments.statusandnet_amount. Only class (3) makes the export mixed-time; the OpenAPI text says so; the history issue owns it (D7). -
Anchors. A window ledger answers only the rows in force at the anchors its elements name (A6: "facts effective at the anchors"), each distinct row once however many anchors it covers — reporting matches each anchor to the window holding it; an event ledger answers its rows dated on or before
period_end, since §1355.44 asks for "each". -
Answer. 200,
Cache-Control: no-store, a typed body from the producer’s contracts crate. Every row is a narrow export struct naming its fields: element columns, ids and dates only. Its only free text is a text columnAFCARS_ELEMENT_COLUMNSmaps ((b)(4)(ii)tribal_affiliation, (b)(5)(ii)tribes_notified, (b)(6)(iii)determination_tribe, (e)(6)arrangement_jurisdiction) and the case’sadmin_unit— never a note, a narrative, an actor id or name. An audit (D4, D5) is staged in the handler’s own transaction throughexecute_within_tx(crates/craig-api/src/lib.rs:258) before the body is built, so a failed stage releases nothing (persons_ssn_release.rs:213-231). -
Pages bound rows, not children. An answer is a flat stream of typed rows (a
kind-tagged enum), each naming its child or key, ordered by (child id or key index, kind, row id). A page holds at mostlimitrows (1..=1000), so one history-heavy child spans pages;nextis an opaque cursor over the last row (the cases cursor also carries a digest of the key list, a mismatch refused), null at the end. U3 and U5, once every row kind exists, time a full page on the devstack and record it on #1965; the ceiling onlimitkeeps a page under half the 8 sS2S_HOP_BUDGET(ceiling.rs:112; a lower ceiling is an erratum). A6’s "≤ 5 000 ids per call" becomes 500 keys per cases call (erratum). -
Rows, not elements. A route answers rows and typed cells, never a dictionary token or an applicability outcome; reporting derives every element (P-D2). The only producer-side rules are those this program gave a producer: the caregiver slots (P-B2 D6), the (c) cells (P-C D5) and (b)(18)'s payment predicate (R-D4). "The (x) columns" means the columns
AFCARS_ELEMENT_COLUMNSmaps for those keys (crates/craig-placement-contracts/src/afcars.rs:613,crates/craig-cases-fields/src/afcars.rs:171). -
Surfaces per route, in its own MR. A test-lib
TypedClient(crates/craig-test-lib/src/harness.rs:353-362precedent), anxtask/route-to-client-method.tomlrow, the regenerated API page (cargo xtask api-docs), aservices.adocrow.
D4 — Placement: GET /v1/placement/afcars-export
-
Query. D3’s window,
afterandlimit. -
Cohort. The children with an episode live at
as_ofwhose removal is beforetoand whose exit is absent or at or afterfrom— closed atfrom: an exit at the period’s first instant ends responsibility inside this period, which the population rule retains (§1355.42(a)(2), pinned with #2027) — the instants taken from the removal and exit responses live atas_of(the episode row’s current instants follow later corrections). Every page evaluates the same cohort. It is the cohort BEFORE the population rule (reporting’s, #2027): a sibling in care at an anchor has an episode in the window, so (b)(20) / (b)(21) need no second mode. -
Rows per cohort child, in kind order.
-
episode: every episode live atas_ofwith removal beforeto— its id andcase_id; its live removal response (removal_at,first_recorded_at, the (d)(3), (d)(4), (i)(1), (i)(4) columns); its live exit response only whenexit_at < to(exit_at,exit_reason,transfer_agency_type,first_recorded_at, the (h) and (i)(10)–(i)(13) columns with both adoptive parent ids). -
arrangement: each arrangement of those episodes effective atas_of(D3 class 2) withstarted_at < to—started_at,ended_at,placement_type, the setting identity, the (e) and (i)(5)–(i)(8) columns. A family arrangement (placement_type = 'foster_family_home'; a congregate row’sfoster_home_idis not a family) carries its first and second caregiver person ids at its (e)(1) dated, by P-B2 D6: covering iseffective_from ⇐ d AND (ended_on IS NULL OR ended_on > d) AND ended_on IS DISTINCT FROM effective_from, each person’s first covering binding by role (primary,co),effective_from,created_at,id. The store’s closedCOVERING_SQL(src/store/caregivers.rs:142-144) is not reused. -
trafficking_statement: per episode, the latest live statement withstated_on < to_d(the statement in force at the anchor, P-B3 D2);law_enforcement_report: every live report withreported_on < to_d. Raw: the (d)(6)(i) gate is reporting’s. -
health_window(child_health_facts): the live window in force atperiod_end;education_window(child_education_facts): the live window in force atperiod_endand, for (b)(11)'speriod_end_or_exit, at the local date of each answered exit withexit_at >= from. -
health_assessment_visit: thevisit_dateof everyhealth_recordsrow existing atas_of(D3 class 2) and flaggedhealth_assessment, inside an answered episode’s window and beforeto_d.
-
-
Audit. One
placement.afcars_releasedper non-empty page — requestor, purpose, the distinct children with rows on the page aschild_idsandchild_count,from,to,as_of— through a newdomain_event!wrapper inservices/craig-placement/src/events.rs. -
Files.
crates/craig-placement-contracts/src/afcars_export.rs;services/craig-placement/src/api/afcars_export.rswith its store reads insrc/store/afcars_export.rs;services/craig-placement/tests/api/afcars_export.rs.
D5 — Cases: POST /v1/cases/persons/afcars-export (R-D5)
-
Body. D3’s window,
children: [{person_id, case_id, anchors}],adults: [{person_id, role, anchors}](rolecaregiveroradoptive_parent),afterandlimit. A child key is its(person_id, case_id)and an adult key its(person_id, role): one person may be a child key and hold both adult roles (a foster parent who adopts); a repeated key is refused. At most 500 keys and 10 000 anchors in all (reporting splits keys across requests; pages bound the rows);anchorsare distinct local dates on or beforeperiod_end— a child’s are its arrangement (e)(1) dates and its exit dates in the period ((i)(5)(v) / (i)(10)(iv), P-B3 D4), a caregiver’s the (e)(1) dates of the arrangements it fills a slot in, an adoptive parent’s the exit date.case_idis an episode’s: reporting sends one child key per distinct (child, case). -
Rows per key, in kind order. A child key whose person is not a child member of the case (
case_household,store/cases.rs:303) and an unknown person answer onenot_foundrow and nothing else; anot_foundrow releases nothing (it is in no audit’sperson_ids, and a page of onlynot_foundrows stages no audit).-
person:sex. A child adds the key’s caseadmin_unit((a)(3); the record takes the unit of the case of the child’s latest episode with removal beforeto, P-D2), the (b)(1) date of birth anddob_estimated_abandoned, decrypted through a DOB-only registry slice (ncands.rs:81-90; the SSN family never decrypts here). An adult addsbirth_year, elseyear_of_birth_declared, and, foradoptive_parentonly, the full date of birth ((h)(3) / (h)(8); a declared year alone answers none). -
demographic_window(person_demographic_facts): the live window in force atperiod_end(child) or at the key’s anchors (adult: race, ethnicity andtribal_memberonly, nevertribal_affiliation). -
parent_cells(child keys): the (c) cells atperiod_endfromafcars_parentsover rows normalized per D3 (the helpers drop any row withretired_ator a passedeffective_until,afcars_parents.rs:139-145) —c1_c2(the parent YEAR, never a date),c3_c4,parent_setandc5, each parent carrying its rights row’s (c)(5) and (i)(2) / (i)(3) columns. -
One kind per child window ledger —
child_parenting_facts,child_prior_permanency_facts,child_assistance_facts,child_sibling_facts,child_icwa_facts— the live row in force atperiod_end, and forchild_icwa_factsalso at each anchor; one kind per event ledger —permanency_plans,child_review_events— every live row dated on or beforeperiod_end. -
sibling_link: theperson_siblingslinks in force atperiod_end. -
visit: eachcontactsrow existing atas_of(D3 class 2) with the key’scase_id,visited_child_id= the child and a localoccurred_atdate< to_d— its date andlocationonly.
-
-
Never answered. Names, the SSN family, every hmac,
ssn_verified*, and D3’s excluded free text: a test walks the persons registry (crates/craig-cases-fields/src/persons.rs:108-280) and plants name and SSN sentinels in every other free-text column read. -
Audit. One
case.person_pii_exportedper non-empty page through a new wrapper,publish_person_pii_released_for_afcars:requestorcraig-reporting,purposeafcars-2020 federal reporting,person_ids(every person with a row on the page, each parent behind aparent_cellsrow included) withperson_count,date_of_birth_person_ids(every child and adoptive parent whose date the page released),include_full_ssn: false,from,to,as_of; an ADR-003 wrapper row and theimplementation-guide.adoccatalog row. The requestor and purpose types move from placement’s contracts tocrates/craig-reporting-contracts/src/afcars_release.rs, wire bytes unchanged, and both producers use them (craig-cases takes a directcraig-reporting-contractsdependency; no cycle). -
The ADRs are amended (R-D5): ADR-041 (the #1990 amendment and the
personstable row), ADR-051 (its #1990 amendment) and ADR-078 (P-C’s DOB line) say this route releases the child’s and the adoptive parents' dates, DOB-narrowed and audited, and that parents and caregivers stay year-only; theadoptive_parentrole is caller-asserted, bounded by the allowlist and the audit. -
Files.
crates/craig-cases-contracts/src/afcars_export.rs;services/craig-cases/src/api/afcars_export.rs(store reads beside it);services/craig-cases/tests/api/afcars_export.rs.
D6 — Financial: GET /v1/financial/afcars-facts (R-D3, R-D4)
-
Query. D3’s window,
afterandlimit(1..=1000 child ids), paged by child id. -
Answer. The children for whom a title IV-E foster care maintenance payment was paid in the window with Federal reimbursement claimed or intended (§1355.44(b)(18)): a
paymentsrow withagreement_id IS NULL AND status IN ('issued', 'cleared') AND ffp_amount > 0 AND issued_at >= from AND issued_at < to AND issued_at ⇐ as_of.ffp_amountis the generated IV-E federal share —net_amount × ffp_ratewhenive_eligible, else 0 (migrations/20260703130000_financial_domain_constraints.sql:30-35). A zero payment never counts; disbursed money is corrected by an adjustment, never a void (src/store/payments.rs:269-282), and net never goes below zero (payments_net_non_negative), so an approved recovery that takesnet_amountto zero un-pays it and a partial one does not ⁂ (class 3: current). A child reporting holds that is absent answers (b)(18)no; a failed call fails the generate (P-D2), never a default. No audit key: ids only. -
(b)(18) moves to P-D. The
oohc.b18row inOWNED_ELSEWHEREnames#1965, not#1966(afcars_capture.rs:139); the partition count is unchanged. -
Files.
crates/craig-financial-contracts/src/afcars.rs;services/craig-financial/src/api/afcars_facts.rs;services/craig-financial/tests/api/afcars_facts.rs— financial’s first service-only route.
D7 — Errata, issues and docs
-
U0 records: the program errata — the P-D row (five pages, weight ≈ 129) and its Order line (P-D1–P-D4 before the bulletins, P-D5 after #1987); on A6, the cases keys with anchors and the 500 cap, the row-bounded pages, the pre-population cohort closed at
from, rows not elements, the threeas_ofclasses,financial_base_urlwith its reader, (b)(18) in P-D. On #1965: AC1 read as R-D2; AC3’s transmit grep scoped toservices/craig-reporting/src/api/afcars.rs(R-D7). Issues: the units U1 #2118 … U7 #2124; P-D2 #2125, P-D3 #2126, P-D4 #2127, P-D5 #2129; the tardy transcription #2128 (R-D6); NCANDS’s marking-only transmit route #2130 (services/craig-reporting/src/api/ncands.rs:278); the history of D3’s class-3 edits #2131. ⁂ R-D4 on #1073. -
U7 records: the three data-model pages, the P-D2 inputs on its issue, the archive row.
Units
Each MR Relates to #1965 and #949 and closes its own unit issue; no MR closes #1965 (P-D5 does).
| MR | Scope | W |
|---|---|---|
U0 |
this page (Active nav); the unit issues under epic &99 ( |
1 |
U1 |
SETTINGS (D2) |
2 |
U2 |
PLACEMENT EXPORT: the route, cohort, row stream and cursor; the |
5 |
U3 |
PLACEMENT FACTS: the caregiver slots, the trafficking, window and visit rows; the full-page timing (D4) |
3 |
U4 |
CASES EXPORT: the route, keys, anchors, cap, row stream and digest cursor; the narrow types; membership; the DOB-only decrypt;
the |
5 |
U5 |
CASES LEDGERS: the normalized |
5 |
U6 |
FINANCIAL: |
3 |
U7 |
CLOSE-OUT (D7) |
1 |
Weight 25. U0 first; then U1, U2 → U3, U4 → U5 and U6 in any order; U7 last. Every MR is green alone and carries its CHANGELOG entry;
every new test carries // @axis:.
Erratum (2026-10-01): U4’s store reads sit in src/store/afcars_export.rs and src/store/person_demographics.rs (the B1 route-file cap), and D3’s window check is one shared craig_common::export_window (B8).
Erratum (2026-10-01): U5’s ledger reads sit in src/store/afcars_ledgers.rs (as U4’s, the B1 cap); its visit row answers occurred_at, the mapped column (the jurisdiction-clock date is P-D’s projection), and its icwa_window carries P-B3 D4’s tribe_order_foster_care / tribe_order_adoptive.
Test matrix (by risk)
| Test | Axis | Asserts |
|---|---|---|
|
evil |
403 and no audit staged, for a caseworker, a relayed craig-reporting token and craig-financial’s principal |
|
sad |
GET: an unknown parameter, |
|
sad |
a noon |
|
sad |
a statement, report, visit or event dated |
|
replay |
a correction after |
|
replay |
the exported (c) cells, not the helper alone |
|
happy |
before, straddling, inside, open and retracted episodes |
|
evil |
|
|
happy |
> 2 × |
|
happy |
limit 2 over 5 children: 3 pages, |
|
happy |
the outbox row exists when the 200 arrives; an empty page stages none |
|
happy |
|
|
evil |
earlier and later windows are absent; the ICWA row at each anchor and the (b)(11) row at an in-period exit are present; a row covering three anchors appears once |
|
evil |
the half-open rule, not |
|
sad |
a group home with a |
|
happy |
P-B2 D6’s tie order |
|
evil |
sentinels in every free-text column read outside the
mapped element text and |
|
happy |
a declared-year-only adoptive parent answers no date |
|
happy |
a foster parent who adopts answers under each role and as a child key; a repeated key is refused |
|
evil |
no |
|
evil |
a child with ledger rows and contacts in two cases answers the requested case’s only, once |
|
sad |
422 |
|
happy |
|
|
sad |
a zero net, an approved recovery to zero, not IV-E
eligible, a subsidy, issued before |
|
happy |
D2’s pins |
Verification
-
Per MR: the gate list (fmt, clippy, the budgets at their locks,
validate-authz-coverage,coverage-matrix-mapping, the evil-corpus and route-role gates as the NCANDS export meets them,api-docs --check,check-docs,plan-lint), then the battery (baregit push), where each producer’s devstack API tests first run; U3 and U5 record the full-page timing on #1965. -
Close-out:
cargo xtask plan-lint --done docs/modules/ROOT/pages/plans/archive/afcars-pipeline-sources.adoc --allow-open 949,1073,1965,1966,1973,1987,2125,2126,2127,2128,2129,2130,2131(the program, the later pages and D7’s follow-ups).
Rollout + risks
| Unit | Roll first → then |
|---|---|
U0, U7 |
docs only |
U1 |
set |
U2–U6 |
additive routes in any order: no consumer until P-D2, no migration, no floor bump; craig-security already parses both audit keys |
Risks: PII on three new paths (cases names are plaintext at rest, so the narrow structs are the only guard; the DOB decrypt widens to
AFCARS; the adoptive_parent role is caller-asserted); class-3 edits read current until the history issue lands (D3); the page
ceiling is measured, not yet proven at scale (U3 / U5); the bulletins stay the program’s long pole (D1).
Rulings requested (recommendation first; U0 records each and D1–D7 are then binding)
| # | Recommendation | Alternative |
|---|---|---|
R-D1 |
P-D as five gated pages (D1, ≈ 129); P-D1–P-D4 proceed before the ACF bulletins, P-D5 waits on #1987 |
P-D1 only, then hold; hold all of P-D until the bulletins |
R-D2 |
#1965 AC1 ("P-A merged first") is met by P-A1 plus #2027 before P-D2’s population unit; #1987, which closes P-A2 (#1973), gates P-D5 only |
the literal reading: P-D waits for P-A2 Done |
R-D3 |
(b)(18) is P-D’s (A6, #1965): financial |
leave it
to P-E: every P-D record |
R-D4 |
(b)(18) = an issued or cleared per-diem payment issued in the window whose generated federal share |
gross paid regardless of recoveries; the payment’s service period overlaps the window |
R-D5 |
ADR-041, ADR-051 and ADR-078 amended: the AFCARS export releases the child’s date b)(1), clean class 100 %) and the adoptive parents' ((h)(3) / (h)(8, DOB-only decrypt, audited; parents and caregivers year-only |
none that files (b)(1) |
R-D6 |
§1355.46(b)(5)'s 30-day tardy rule is transcribed as cited dictionary data by a P-A2 follow-up (the #2027 shape) before P-D3’s classes unit |
fold it into #2027; a classifier constant (federal text in Rust) |
R-D7 |
AC3’s transmit grep is scoped to |
P-D retires NCANDS’s route too (beyond R12) |
Review log
| Round | Vendor | Resolved model | Verdict |
|---|---|---|---|
1 |
Anthropic — one fresh contextless reviewer (the page, the rules, the four questions; 25 tree spot-checks) |
Claude Opus 5.5 |
no-ship — 3 blockers fixed (the trafficking date bound, the relayed-token refusal through |
2 |
maintainer-run (2026-09-30) |
as reported |
no-ship — 12 findings and the mixed-time limitation folded: (a)(3)'s
|
fold check |
Anthropic — a per-finding checklist auditor, then an adversarial gap hunt (≈ 45 tree citations) |
Claude Opus 5.5 |
13 findings: 11 addressed, 2 partial (the close normalization, the rollout wording) and 4 fold defects, fixed; gap hunt: 1 P1 (adult
key identity), 8 P2 (the element text exemption, non-member keys, timing units, D3’s producer rules, upper bounds on arrangements and
exits, the stamped-table fences, ADR-051 / ADR-078, anchors instead of history) and 5 P3, fixed; a final residue verifier over
the combined list: 3 partial (contacts' in-place columns, no-store on every route, the demographic table name) and 6 fold defects
(each row once across anchors, a request-wide anchor bound, |