Plan: AFCARS 2020 Program — Federal Ruleset, Capture-First Facts, CFR-Cardinality Records, §1355.46 Validation, the ACF File (#949)
- Status
- Context
- Architecture (decided here; binding on every child plan)
- A1 — The federal ruleset class and the dictionary as decision rows
- A2 — Citations and the tether
- A3 — Crosswalks and the shared verifier
- A4 — The consumer:
AfcarsSurfaceClient, runtime compatibility, immutable identity - A5 — Capture-first, effective-dated, with immutable entry timestamps
- A6 — Sources take resolved boundaries and each element’s anchor
- A7 — The record model and the snapshot
- A8 — Validation is §1355.46, computed in this order
- A9 — The file, the record number, readiness bound to the artifact
- A10 — Isolation and determinism in tests
- Child plans — each
Relates to #949; each gated in plan mode before its first MR; P-E’s close-outCloses #949 - Program-level tests and verification (each child page names its own)
- Rollout + risks
- Rulings (approved 2026-09-20, rev 4)
- Review log
Status
In progress
- Anchors
-
#949 (the anchor; epic &99; the child plans P-A #1962, P-C #1964, P-B #1963, P-D #1965, P-E #1966 — P-E’s close-out closes the anchor; the ACF-delivery program #1967 filed at U0 under R12), ADR-040 § Amendment — #949 (the AFCARS file un-deferred; D4 / D5 restated: federal codes come from the federal ruleset, never guessed,
adr-040:100-110,:133-134), ADR-070 § Amendment — #949 (cfr+acf_technical_bulletin; federal manifests; the_descriptiontether), ADR-072 § Amendment — #949 (a federal tier-1 class,adr-072:34-66), ADR-074 (the verified surface,adr-074:96-108,:134-148), ADR-037 (new governed fields,adr-037:45), ADR-020 / ADR-048 § Amendment — #949 (R11), ADR-058 (an AFCARS retention class), ADR-068 § Amendment — #1571 (theafcars/generaterow becomes a job), the archived background-jobs plan (R2 / R5 / R7 / R9 / R10), ADR-006 / #1188 (snapshots by(rule_set_id, revision),services/craig-rules/src/store.rs:414-425), #583 (open), #1073 (the ⁂ ledger), #762.
Context
Federal text (45 CFR §§ 1355.42–1355.46 read 2026-09-20 from law.cornell.edu; 85 FR 28410 / FR Doc. 2020-09817 on govinfo; both pinned by hash in P-A). §1355.42(a): the out-of-home care population is every child in the title IV-E agency’s placement and care responsibility for MORE than 24 hours, retained through the END of the report period in which that responsibility ends; (b) the assistance population. §1355.43: two periods (Oct 1 – Mar 31, Apr 1 – Sep 30), due May 15 / Nov 14 (a weekend rolls to Monday); (b)(1) most-recent information for §1355.44(a)–(c); (b)(2) most-recent AND ALL HISTORICAL for (d)–(i); (b)(3) the ICWA straddling cohort ("(b)(3) through (6) and (i)"); (d) missing is blank, never defaulted; (e) ACF’s format. §1355.44 as currently codified: 4 general (incl. (a)(4) the encrypted record number, "the same encryption routine or method … across all report periods"), 21 child (incl. (b)(7) yes / no for EACH of eight race categories), 5 parent, 6 removal PER REMOVAL, 18 living-arrangement PER ARRANGEMENT, 6 permanency-planning with repeating dates, 4 exit, 15 exit-to-adoption / guardianship; conditional "if … otherwise leave blank" rules throughout. The 2024 amendment (89 FR 96588, Dec 5 2024 — a SECOND FR source, pinned in P-A) revises the ICWA elements and adds group (i), effective 2028-10-01 and not yet integrated into the Cornell text — the 2028 rows transcribe from the amendment, not from the current section. §1355.45: the assistance file. §1355.46: error classes — missing, invalid, internally inconsistent, recurrence of response patterns beyond an ACF threshold within EITHER file ((b)(4); no two-file comparison exists in the rule), tardy > 30 days; (a) exempts exactly two record classes from compliance determination — a child whose 18th birthday occurred in a prior report period, and an assistance-file child in a title IV-E guardianship; (c)(2) 100 % clean for §1355.44(a), (b)(1)–(2) and §1355.45(a), (b)(1)–(2); (d)(1) ≤ 10 % per data element "of applicable records"; (d)(2) recurrence thresholds; resubmission by the next deadline. OUTSIDE-TREE and not fetchable by automation: the ACF technical bulletins (403) — numbers, versions, XML structure, the encryption standard, the consistency and recurrence checks and their thresholds are R1 inputs the maintainer supplies; nothing here states their content.
The tree (anchors from two fact sheets and the rev-3 review). Rulesets: three jurisdiction dirs, a
hardcoded RULESET_DIRS (xtask/src/cmd/rules.rs:60), name-unique sets, metadata.* blocks + shared parsers as the
non-decision precedent (rules.rs:271-320; rules_authority.rs:26-52), check_token_enums a SUBSET lint
(rules.rs:805-818), promotion compiles candidates only (services/craig-rules/src/api/lifecycle/preview.rs:73-76),
snapshots resolve by the (rule_set_id, revision) pair — never name + revision (store.rs:414-425); the verified
surface shape (services/craig-financial/src/subsidy/authority/mod.rs:3-140); ADR-070 Authority (citation.rs:73-87),
Citation deny_unknown_fields (:104-170), whole-rule keys resolve the row’s _description (ruleset_ref.rs:385-395),
a blocking dir without a manifest is a finding (audit.rs:253-260), policy drift knows pamms-git | manual only and
the scheduled job selects georgia (.gitlab-ci.yml:747). Federal vocabularies are compiled constants
(crates/craig-reference/src/afcars.rs:68-160); reporting has no rules or crypto dependency. Reporting: the zero-record
stub (api/afcars.rs:63-124), the documented delivery stub at transmit (:421), one export pointer set per submission
row (store/models.rs:30-45), the export finalizer’s FOR UPDATE transaction (upload_finalizers.rs:137-160), the
validated_with_errors SQL invariant (crates/craig-test-lib/sql/invariants/craig-reporting/validated_with_errors.sql:11),
the NCANDS job template (jobs.rs:194-259). Placement: per-row removal fields, no episode, no activated_at,
cancellation = ending (transitions.rs:23-31; placements.rs:1238-1250); placements.permanency_goal is governed and
consumed by financial’s guardianship-activation check (services/craig-financial/src/api/subsidy_activate.rs:113-118).
Cases: single-valued race, court_orders without parties, case_plans.permanency_goal, the over-disclosing
persons/federal-export (persons_federal_export.rs:80, :130). Financial: no adoption-assistance program. Settings:
placement_base_url lives on FinancialSettings (settings.rs:494, :524-525); BusinessClock::for_jurisdiction
falls to UTC for an unknown code (clock.rs:55-63).
Architecture (decided here; binding on every child plan)
A1 — The federal ruleset class and the dictionary as decision rows
rulesets/federal/ is the fourth ruleset dir and the first jurisdiction-invariant one (RULESET_DIRS, the seed
bootstrap, the policy defaults, BLOCKING_JURISDICTIONS learn it; NO scenario pack — the registry ↔ scenarios/
set-equality is untouched). federal-afcars-2020 is a JDM document whose citable content is DECISION-TABLE ROWS (ADR-070’s
key grammar reaches #nodes[id=…].content.rules[i] and resolves the row’s description): node elements (one row per
element of §1355.44 and §1355.45: id, token, name verbatim, file, group, cardinality most_recent |
per_removal | per_living_arrangement | repeating_dates, value_set, requiredness, clean_class hundred_percent |
ten_percent, temporal_anchor period_end | exit_date | removal_date | arrangement_date | most_recent_at_report,
aggregation per_record by default or a bulletin-cited override, effective_from, effective_until — group (i)
rows from the 2024 amendment included, effective 2028-10-01); node periods; node applicability (every "if …
otherwise blank" as a first-hit row, incl. the §1355.43(b)(3) straddling cohort); node exemptions (exactly the two
classes §1355.46(a) names: a child whose 18th birthday occurred in a prior report period; an assistance-file child in a
title IV-E guardianship — transcribed, not extended); node consistency and node recurrence (ACF’s internal-consistency
checks and the within-either-file recurrence thresholds — bulletin content, bulletin-cited); metadata.afcars carries
only the PINS (dictionary_version, file_layout { kind: xml, bulletin, bulletin_version, schema_path, schema_sha256 },
record_number { bulletin, bulletin_version, standard_sha256 }). _Erratum (2026-09-21, P-A #1962): dictionary_version IS
the document’s top-level version — no second pin. Every row is effective-dated; the surface selects the
VIEW for a period by the period’s end date; a period the view cannot serve is refused. The earliest half a deployment
can report (supported_from) is deployment-specific and therefore lives on the JURISDICTION crosswalk’s metadata, not
in the federal document. The schema artefacts are
COMMITTED under rulesets/federal/schemas/afcars-2020/<bulletin-version>/ (public federal files, hash-pinned, historical
versions retained); the gitignored rulesets/federal/.policy-cache/ holds only the fetched prose sources. The shared
parser craig-reporting-contracts::afcars_dictionary serves rules check and the runtime surface alike.
A2 — Citations and the tether
rulesets/federal/citations.toml ([meta] jurisdiction = "federal", BLOCKING — a valid initial manifest with the
document-header #description citation ships WITH the class in P-A’s first unit, audit.rs:253): one row per rule row;
authority = "cfr" (NEW: federal_citation 45 CFR 1355.44(b)(7), source_ref the govinfo section URL, source_sha256),
"federal_register" (85 FR 28410) for preamble readings, "acf_technical_bulletin" (NEW: required bulletin,
bulletin_version, source_sha256 of the supplied file); both need Citation fields + validate_authority_fields arms
(citation.rs:104-170, :500-536). The tether: each row’s description IS the canonical scalar, built by ONE documented
function over every governed property (id|token|name|file|group|cardinality|requiredness|clean_class|temporal_anchor|
aggregation|effective|value_set — _Erratum (2026-09-21, P-A #1962): aggregation is governed and joins the grammar after
temporal_anchor; the row key is <file>.<paragraph>.<effective_from>`), rebuilt from the parsed row by the bijection test; a cell citation where a single cell needs its
own source; the pins cited on the `#description — Erratum (2026-09-21, P-A2 #1973 D6): the pins are cited on the LEAF paths
#metadata.afcars.file_layout.schema_sha256 / #metadata.afcars.record_number.standard_sha256; a manifest entry carries one
source, so two bulletins cannot share #description`. `policy drift’s source kind is per DIRECTORY today
(`xtask/src/cmd/policy.rs:229, :333); P-A makes dispatch per AUTHORITY within the federal dir — a url kind (re-fetch
hash) for cfr / federal_register rows, manual for acf_technical_bulletin rows; the scheduled policy-drift job
runs --jurisdiction georgia AND federal with aggregated reports (.gitlab-ci.yml:747).
A3 — Crosswalks and the shared verifier
{j}-afcars-crosswalk: one first-hit table per state vocabulary (node metadata vocabulary = the fleet enum, element =
the dictionary id), outputs federal codes. Erratum (2026-09-21, P-A2 #1973 D5): one table per (vocabulary, element SERIES) —
id <vocabulary>--<file><paragraph>, element = <file>.<paragraph> — so one vocabulary binds many elements; a collapse =
true row may output the cited unmapped arm, which P-D treats as a data gap, never a value._ Guarantees live in the SHARED VERIFIER (craig-reporting-contracts::
afcars_crosswalk::verify(crosswalk, dictionary, enum_variants)) run by BOTH rules check and the runtime surface — so a
promotion cannot bypass them (lifecycle/preview.rs:73-76 compiles only): (a) domain totality by EQUALITY with the enum’s
strum::VariantNames; (b) every output code inside the element’s cited value set; (c) a many-to-one row carries
collapse = true AND an embedded citation cell naming the federal label it maps into (the manifest row and the embedded
cell are cross-checked by rules check); otherwise the document fails verification (typed 503 at runtime, a blocking
lint in the repo). There is ONE dictionary: every crosswalk — georgia, texas, the testonia fixture crosswalk alike —
is verified against rulesets/federal/federal-afcars-2020.json by the lint and against the promoted
federal-afcars-2020 by the surface; no fixture dictionary exists. Georgia is authored in P-A for today’s vocabularies
and extended by P-B / P-C; Texas gets its crosswalk when its bundle leaves stub status. Adding a jurisdiction is a CODE
change, not configuration alone: RULESET_DIRS (rules.rs:60), BLOCKING_JURISDICTIONS (policy.rs:87), the clock
match (clock.rs:55-63) and a compiled bundle — listed in the deployment guide.
A4 — The consumer: AfcarsSurfaceClient, runtime compatibility, immutable identity
The ADR-074 shape in craig-reporting (by-name reads of the federal document and the jurisdiction’s crosswalk inside one
4 s budget, parsed + verified (A3) behind an atomic gate — Erratum (2026-09-21, P-A #1962): parse + verify + retain, no zen
compile; nothing evaluates the dictionary or a crosswalk before P-D — re-verified on the 2 s → 60 s ladder, gauge
afcars_surface_verified{jurisdiction}, typed 503 afcars-surface-not-ready with a closed reason token). Two more
verifications: compatibility — the binary compiles a RecordSchemaContract (the tokens × cardinalities × types the
record tables can store, the layout versions the renderer supports); a promoted dictionary outside it fails with
afcars-dictionary-unsupported-by-binary naming the deltas, so a promotion that needs storage or emitter support rolls
code first; jurisdiction — an unregistered clock refuses (afcars-jurisdiction-unregistered; the deployment guide
lists what a new jurisdiction registers). The surface exposes the IMMUTABLE identity of what it verified — (rule_set_id,
revision, content_sha256) for both documents — and every submission RETAINS those pairs, the hashes and the canonical
policy content (afcars_submission_policy), so audit never depends on a name (store.rs:414-425) or on a snapshot’s
retention (craig-rules exposes no snapshot read to callers; none is needed). Two verbs, never conflated: replay =
a deterministic re-render of an existing submission under ITS retained policy content and layout (audit and download
only; it can never change readiness); regenerate = a new submission on the CURRENT surface (a fresh snapshot, the
supersede chain of A7); only regenerate clears a stale artifact (A9). GET /v1/reporting/afcars/metadata → {
current_period, deadline, supported_from, surface: verified | not_ready(reason) } for the web pre-fill and the CLI.
Deploy order: bootstrap both documents before the reporting image.
Erratum (2026-10-01, P-D2 U0, R-D10): the compiled RecordSchemaContract names the data files the build generates, and
compatibility checks only their elements — a build that generates oohc alone is not held unsupported by the assist rows,
which join with P-E (P-D2 D3).
A5 — Capture-first, effective-dated, with immutable entry timestamps
No fact the file needs is inferred; every fact the file needs is captured on the surface that owns it, governed under
ADR-037, effective-dated where its meaning changes over time, and stamped with an immutable, DB-generated recorded_at
where the rule reports a transaction date. P-B (placement): removal_episodes (removal instant, manner,
circumstances, environment, sex-trafficking flags + dates, exit date / reason / transfer, exit-to-adoption / guardianship
group) with removal_recorded_at and exit_recorded_at set by DB default at the moment the RESPONSE is entered,
UPDATE-refused by trigger, corrections as superseding response rows — the transaction date reported for a corrected
response is the FIRST recording’s (R14: the rule dates "each response"; reporting the first entry is the fail-closed
reading, ruled here, ⁂ #1073 if DFCS reads it otherwise); placements become living arrangements (episode_id NOT
NULL, activated_at, arrangement_type over the state’s vocabulary incl. non-conventional periods as rows, location,
jurisdiction / country, provider facts per arrangement); cancelled distinct from ended; the 24-hour derivation
in_population_from on the episode; NO synthesized episodes — the migration refuses on data (pre-1.0; devstack
wipe-before-apply); P-B adds episode_id to P-C’s permanency_plans under that same migration; P-B adds
craig-placement’s first release-audit event (the cases publish_person_pii_exported pattern; the projection answers
no-store) because the placement hop carries PII; placements.permanency_goal is dropped LAST, after P-C’s cases home
exists and financial’s activation check reads it there. P-C (cases): per-category race responses over the eight
cited categories (yes / no), sex, the (b) child facts as EFFECTIVE-DATED rows (effective_from, effective_until,
recorded_at) so a value "at period end" or "at exit" is reconstructible, prior adoption / guardianship, assistance
flags b)(17, siblings, ICWA, parents' years of birth, per-parent TPR events with dates,
permanency_plans(person_id, case_id, plan, established_on, recorded_at) HISTORY rows ((f)(1)–(2) repeating; keyed by
person + case because episodes arrive with P-B), periodic reviews, permanency hearings, caseworker visits + locations;
financial’s guardianship-activation consumer (subsidy_activate.rs:113-118) re-pointed to the cases plan projection in
the same plan. P-E (financial): adoption assistance agreements + finalization.
Erratum (2026-09-24, P-B U0): P-B’s first page, AFCARS Placement Capture I (#1963),
refines the P-B clauses above and binds where they differ (R-B1–R-B21): the removal and exit answers are response EVENT ledgers
(removal_responses, exit_responses) whose first_recorded_at is the R14 transaction date, not episode columns; "manner" is the
removal response’s removal_manner, a CRAIG fact with no element; in_population_from is not stored — the 24-hour threshold is
federal text, added to the federal dictionary as a population table citing §1355.42(a) by the P-A2 follow-up #2027, and P-D
evaluates it over placement’s instants (R-B9); P-B does NOT add episode_id to permanency_plans — P-D assigns each plan to the
episode whose closed date interval contains its established_on, a date inside two or more episodes going to the latest (R-B8, ⁂
#1073); P-B lands only the release-audit key placement.afcars_released, which P-D’s afcars-export emits (R-B11); the caregiver
portal’s goal label needs no placement-side projection — it is never rendered, and its governed token is retired with the column
(R-B10).
Erratum (2026-09-26, P-B2 U0): P-B’s second page, AFCARS Placement Capture II (#2026),
refines the arrangement clause of P-B above and binds where it differs (R-B23, R-B25, R-B28): arrangement_type over the
state’s vocabulary is not buildable as crosswalk data — the federal tokens are the vocabulary: placements.placement_type is
foster_family_home plus the 14 (e)(4) tokens verbatim, (e)(3) is six captured ffh_type<category> flags, and no crosswalk
maps a setting (P-A2 D4 stands: PlacementType is not a crosswalk); non-conventional periods are rows with their own (e)(4)
setting; "provider facts per arrangement" are not stored — (e)(9)–(e)(18) are the cases facts of the persons bound to the
arrangement’s setting identity (a foster home or a kinship household) on its (e)(1) date. Location and jurisdiction / country
are P-B3’s (#2052) per-arrangement columns._
A6 — Sources take resolved boundaries and each element’s anchor
Three service-only, allowlisted projections, each called with RESOLVED instants (from, to, as_of) computed by
reporting from the surface — upstream services never interpret a period string — and each answering per element at the
anchor the dictionary names (period end, exit date, removal date, arrangement date, or most recent at report):
placement afcars-export (episodes + arrangements, ALL historical rows, paged by child, release-audited — trafficking
flags and provider race are PII), cases persons/afcars-export (demographic + parent + permanency facts effective at the
anchors, ≤ 5 000 ids per call over the distinct cohort, audited with purpose afcars-2020 federal reporting, never names
or SSN fields), financial afcars-facts (IV-E maintenance during the period, (b)(18); the assistance cohort for P-E).
Settings: placement_base_url lifted onto ServiceSettings, financial_base_url added, reporting’s CASES_URL moved
onto cases_base_url — in P-D’s first unit.
Erratum (2026-09-26, P-B2 U0): placement’s afcars-export carries no provider race. For each family arrangement it answers
the two caregiver slot person ids ((e)(9)–(e)(18), P-B2 (#2026) D6, R-B28), and cases'
persons/afcars-export admits those caregiver ids and answers their year of birth, sex, tribal membership, race and ethnicity
at the arrangement date; the PII class A6 names for provider race is enforced at the cases export. Trafficking flags stay
placement’s PII (P-B3, #2052).
Erratum (2026-09-28, P-B3 U0): for each adoption or guardianship exit, placement’s afcars-export also answers the two adoptive
parent person ids h)(3)–(h)(12), P-B3 (#2052) D3, R-B30), not their race; cases' persons/afcars-export admits those adults and answers their full date of birth ((h)(3) / (h)(8, sex, tribal membership, race
and ethnicity at the exit date.
Erratum (2026-09-30, P-D1 U0): as designed on P-D1 D3–D6 — the three routes answer
rows and typed cells, never elements, in row-bounded pages (at most 1 000 rows, a keyset cursor) over local-midnight instants
and an as_of at least the longest request ceiling in the past. Ledgers read as of as_of, stamped tables are fenced on their
stamps, and in-place edits read current: a mixed-time export for those edits (#2131). Placement’s cohort is every child with an
episode in the window, closed at from, before the population rule. The cases request carries typed keys — (person, case)
children and (person, role) adults, each with its anchors — at most 500 keys per call, not 5 000, and a window ledger answers
only the rows in force at the anchors. Financial answers (b)(18) (R-D3, R-D4). financial_base_url lands with its first
reader, P-D2.
Erratum (2026-10-05, #2131 close-out): AFCARS Source History gives each
in-place column an outcome, so reads at one as_of agree on every source column but persons, which stays current-state (a
correction, never a dated change; ⁂ on #1073). A fresh generate still answers edits made after its predecessor’s as_of.
A7 — The record model and the snapshot
afcars_child_records (a)–(c) + afcars_record_removals (d)/(g)/(h) + afcars_record_living_arrangements (e)
afcars_record_events (f: plan, review, hearing, visit — typed kinds with dates) + afcars_record_icwa (group (i),
shaped by the amendment’s rows when the 2028 view is served) + afcars_submission_coverage(element_id, sourcing)
afcars_submission_policy (the two documents' identity pairs, hashes and canonical content — public text, integrity by
hash, OUTSIDE the field registry) — the PII columns under the R11 posture (craig-reporting-fields + FieldEncryptor).
Every generate creates a NEW submission row; rows form a SUPERSEDE CHAIN per (period, file) (supersedes_id; the latest
is current, prior rows are retained with their artifacts and snapshots) — so §1355.46’s resubmission is a regenerate
even though validated_with_errors stays terminal per row (transitions.rs:16); the existing export pointer set per
row serves both files. Columns pinned against the dictionary by record_schemas_match_the_dictionary_elements_in_order
and by the compiled RecordSchemaContract (A4).
Erratum (2026-10-01, P-D2 U0, R-D10): as designed on P-D2 D3 — the record tables
follow the dictionary’s cardinality, not the group: afcars_child_records (most_recent), afcars_record_parents
(per_parent, one row per parent), afcars_record_removals (per_removal and per_exit), afcars_record_living_arrangements
and afcars_record_events; the 2028 (i) cells live in the table of their cardinality, so there is no afcars_record_icwa.
afcars_record_gaps records why a sourced cell is blank. The policy content is stored once per document, keyed by its hash
(afcars_policy_documents), and each submission’s afcars_submission_policy row references it.
A8 — Validation is §1355.46, computed in this order
Per submission: (1) select the dictionary view for the period; (2) apply exemptions — the two record classes
§1355.46(a) names leave the compliance universe (they stay in the file where the text says so); (3) per record and
element evaluate applicability (blank-by-rule is ok regardless of sourcing); (4) for applicable cells classify ok |
missing | invalid | inconsistent | tardy (missing includes unsourced elements — coverage is honesty, not exemption);
(5) evaluate the recurrence rows over THIS file (§1355.46(b)(4) is recurrence within either file against ACF’s
thresholds; there is no two-file comparison — P-E evaluates the assistance file’s own rows); (6) aggregate per element as
its dictionary aggregation says — per_record by default (one observation per applicable record, §1355.46(d)(1) "of
applicable records"), a bulletin-cited override where ACF counts row instances of a repeating group; the denominator is
the count of APPLICABLE observations; (7) finalize validated iff every hundred_percent element is ok on every
applicable observation AND every other element’s error share ≤ 10 % AND no recurrence threshold is exceeded; otherwise
validated_with_errors with per-element numerators / denominators stored and shown. The SQL invariant
validated_with_errors.sql is rewritten to these semantics in the SAME MR as finalize.
Erratum (2026-10-03, P-D3 U0, R-D13 / R-D15): as designed on P-D3 D5 — the stored
validation_errors counts the standards not met: the elements failing their clean_class standard plus the A8 steps that
fail or cannot be evaluated; validated iff that count is 0 and record_count > 0. Until P-D5 (#2129) evaluates
consistency (inconsistent, (4)) and recurrence 5, both steps are recorded unevaluated and fail, so every submission
is validated_with_errors, an all-exempt one included. The per-element numerators / denominators are stored in
afcars_element_results.
A9 — The file, the record number, readiness bound to the artifact
afcars_xml renders the record groups under the pinned layout and validates against the COMMITTED schema in tests (the
validator researched per judgment-protocols at the file unit); the TSV emitter stays until that unit REPLACES it (export
/ download / replay tests always have an artifact). The record number is a keyed scheme CONFORMING TO the pinned ACF
standard (HKDF over a per-jurisdiction domain only if the standard admits it — decided at the file unit, after R1), PINNED
— never rotated; a re-baseline is an ACF conversation — and the same across periods, episodes and both files; its key is
a dedicated reporting key with a NAMED production channel (ADR-048 leaves production delivery out of scope, adr-048:268
— the amendment names it: the orchestrator store, the devstack sops store), a KCV lineage row verified at boot, and a
compromise procedure in the deployment guide (a compromised pseudonym key is an ACF re-baseline, an incident, never a
silent rotation). Readiness is a DERIVATION over the winning export attempt: the export finalizer records, in its FOR
UPDATE transaction (upload_finalizers.rs:137-160), the attempt id, generation, artifact hash, layout revision,
record-number revision and the two policy pairs; the transmit act re-verifies inside its own transaction that the
submission’s current attempt / generation / hash match that record, that record_count > 0, and that the recorded
revisions equal the surface’s CURRENT pins — a later layout or dictionary promotion makes the artifact
afcars-artifact-stale, cleared only by a REGENERATE (A4), never a replay. The count / error arm of
refuse_untransmittable is REPLACED for AFCARS by this predicate. Boundary (R12): the post-readiness state is
ready_for_transmission (the file, its hash and its pins recorded); transmitted / transmitted_at /
acf_acknowledgment are written ONLY by the delivery program (today’s transmit route "marks the submission as
transmitted" without delivering, afcars.rs:415-421 — that route is retired here, not kept as a stub), filed at U0.
Erratum (2026-10-04, P-D4 U0, R-D27 / R-D30): as designed on P-D4 D3–D4 — the anchors are
upload_finalizers.rs:137-208 (the finalizer) and api/afcars.rs:485-587 (the transmit route). The layout and record-number
revisions are carried by the recorded dictionary identity (rule-set id, revision, content hash), since both pins live inside the
dictionary document; P-D5 adds explicit pin columns if its XML needs them. The readiness record is an append-only table keyed
per submission and export generation, and the act compares both documents' full identities with the surface’s.
Erratum (2026-10-05, P-D4 U6): as built, the finalizer is upload_finalizers.rs:256-348 (the readiness row :195-217), the act
is PUT /v1/reporting/afcars/{id}/ready-for-transmission (api/afcars_readiness.rs:65-324), and the transmit route is retired
(#2180); readiness bound to the winning export is re-verified by the act, and a ready submission’s artifact is frozen.
A10 — Isolation and determinism in tests
Hermetic legs run the in-src job runtime over the reporting scratch base with stub upstreams (the NCANDS shape); the
battery’s live legs run on the devstack over halves RESERVED through a test-plane sequence — NEW P-D work
(craig_test_lib::reporting::reserve_period() over a _test_period_reservations table on the test plane; today’s suites
salt with unique_year() only) — and assert by identity; the lifecycle e2e builds ITS OWN cohort (episodes, arrangements,
facts created through the APIs, dated inside a reserved far-past half) — never the shared seeded cohort; a seed test runs
the COMPLETE classifier (all groups) over the seeded cohort and requires validated. Salted periods are never a
substitute for reservation.
Child plans — each Relates to #949; each gated in plan mode before its first MR; P-E’s close-out Closes #949
| Plan | Fixed scope (its page decides the how) | W |
|---|---|---|
U0 |
This page (Active nav), ADR-040 / ADR-070 / ADR-072 / ADR-020-048 amendments Proposed, the ADR-068 row, epic &99 |
2 |
P-A |
Federal ruleset & dictionary: the class (A1), the initial blocking manifest, the two authorities + |
13 |
P-B |
Placement capture (A5): episodes, arrangements, activation, cancelled, provider facts, immutable response
timestamps (R14), the 24-hour derivation, |
8 |
P-C |
Cases capture (A5): eight-category race, sex, effective-dated child facts, parents, per-parent TPR, permanency-plan
history keyed by person + case, reviews, hearings, visits; the cases plan projection + financial’s activation consumer
re-pointed; followers (intake / web / CLI / seed / NCANDS / SHINES / SDKs); ADR-037 governance Erratum (2026-09-22, P-C U0): P-C
weighs 24 (ten MRs on its page: AFCARS Cases Capture (#1964)); (b)(17) is a P-C capture of all
eight sources, not a financial derivation (R-C3); A5’s |
8 |
P-D |
Pipeline, validation, file, readiness: the three projections + settings lifts (A6), the record model under R11 |
21 |
P-E |
The assistance file (§1355.45): adoption assistance agreements (financial capture), the assistance cohort and its
submission rows, records, validation incl. its own recurrence rows and the guardianship exemption, XML, the shared record
number, lifecycle; the program close-out (ADRs Accepted, docs, |
8 |
Weight ≈ 60. Order: U0 → P-A → P-C → P-B → P-D → P-E (P-C before P-B so the plan home and financial’s consumer exist
before the placement column is dropped; P-D after both so a real half validates on landing — until then nothing in
P-D exists, so no half is ever "validated_with_errors by design"). Every MR green alone; each carries its CHANGELOG entry
(pre-1.0 Changed / Removed).
Erratum (2026-09-30, P-D1 U0, R-D1 / R-D2): P-D1–P-D4 proceed before the ACF bulletins; P-D5 waits on #1987; #2027 (landed) precedes P-D2’s population unit. Until #1987 no deployed surface verifies, so no half is validated in a real environment before then.
Erratum (2026-10-26, #2705): the order paragraph above no longer requires a // @axis: tag on every new test; the tags and
their axis-coverage gate are retired, and route coverage is judged by the coverage-signature gate (Quality Gates § Coverage-signature gate).
Program-level tests and verification (each child page names its own)
-
Binding across plans:
every_dictionary_row_is_effective_dated_and_cited;a_promoted_dictionary_outside_the_binary_ contract_is_refused;a_crosswalk_collapse_without_an_embedded_citation_fails_verification_at_runtime;a_projection_never_receives_a_period_string_only_resolved_instants;transaction_dates_are_first_recording_timestamps_ never_row_creation;exempt_records_leave_the_compliance_universe_but_stay_in_the_file_where_the_text_says;denominators_count_applicable_observations_per_element;blank_by_rule_is_ok_even_when_unsourced;a_layout_promotion_after_export_makes_transmit_refuse_artifact_stale;re_export_renders_under_the_retained_policy_ content_not_the_current_name;record_number_routine_is_pinned_a_second_routine_is_refused;the_seeded_cohort_validates_under_the_complete_classifier;the_lifecycle_e2e_builds_its_own_cohort_in_a_reserved_half. -
Verification per MR: fmt, clippy, budgets,
rules check(the new validators and lints),policy drift(federal included),contested-census,check-docs,plan-lint, the battery. Close-out greps:rg -n 'fn .to_afcars\b' crates/craig-referenceEMPTY;rg -n 'build_afcars_tsv|afcars_tsv' services cratesEMPTY;rg -n 'Marks the submission as transmitted' services/craig-reportingEMPTY;rg -n '2025-Q|2026-export-Q' services/craig-reporting tests/e2e/specs/reportingEMPTY (scoped). _Erratum (2026-10-04, P-D4 U0, R-D7): the transmit grep is scoped toservices/craig-reporting/src/api/afcars.rsuntil #2130 retires NCANDS’s twin route. -
Erratum (2026-11-01, #2878):
check-docsis retired (#2880) and.claude/CLAUDE.mddeleted (#2879); per-MR verification dropscheck-docs, and P-E’s close-out touchesAGENTS.mdonly if a pointer it holds moves.
Rollout + risks
Deploy order per environment: bootstrap federal-afcars-2020 + {j}-afcars-crosswalk → roll cases (P-C) → placement
(P-B; refuse-on-data migration — the devstack wipes + reseeds once) → financial (P-E capture) → reporting (P-D / P-E) →
verify afcars_surface_verified{j} = 1 before the first generate. Risks, named: P-A’s transcription is the long pole and
the only place memory could enter (fetch → hash → tether → exact-list review; the bulletins depend on the maintainer);
P-B is a hard-to-reverse data model (its own ADR); an XML validator may become an ADR; the record count of a half is
unknown in tree; a jurisdiction beyond Georgia needs its clock, dir, crosswalk and bundle registered (listed in the guide).
Rulings (approved 2026-09-20, rev 4)
-
R0 — the federal ruleset class:
rulesets/federal/— tier 1, jurisdiction-invariant, promotable, citable, drift-checked (ADR-072 § Amendment — #949); not a compiled crate. -
R1 — sources: govinfo FR + CFR text fetched by the implementer; the ACF technical bulletins supplied and named by the maintainer (acf.gov refuses automation); every source hash-pinned; the authorities
cfrandacf_technical_bulletin; the schema artefacts COMMITTED underrulesets/federal/schemas/. -
R2 — the population and episode model in craig-placement (A5): episodes as the parent of living arrangements,
activated_at,cancelleddistinct fromended, immutablerecorded_aton removal / exit responses, no synthesized episodes (refuse-on-data; devstackwipe-before-apply). -
R3 — the record model (A7) with the CFR’s cardinality and per-submission snapshots of coverage, policy identity (pairs + hashes) AND policy content.
-
R4 — validation = §1355.46 (A8): the two exemptions, applicable-record denominators, repeating-row aggregation, within-file recurrence, applicability before sourcing.
-
R5 — the file: XML per the pinned bulletin, schema-validated against the committed artefacts; the validator researched at the file unit.
-
R6 — the record number: keyed, PINNED (never rotated), delivered on ADR-048’s channel, designed after the standard is pinned.
-
R7 — crosswalks:
{j}-afcars-crosswalktables whose guarantees the SHARED runtime verifier enforces (totality, value set, embedded collapse citations) as well asrules check. Erratum (2026-09-21, P-A2 #1973 D5): totality admits the citedunmappedarm on acollapse = truerow; a table binds an element series, not a vocabulary. -
R8 — decomposition: this program page + five gated child plans (P-A … P-E), weight ≈ 60.
-
R9 — the assistance file in scope as P-E, with its own submission rows and lifecycle.
-
R10 — transmit: readiness bound to the winning export attempt and re-verified in the act’s transaction; the count / error arm replaced, not stacked.
-
R11 — PII at rest in craig_reporting: the craig-cases-fields pattern (
craig-reporting-fieldsunderFieldEncryptorover the record tables' PII columns, boot verify); the rendered file ENVELOPE-ENCRYPTED client-side under the reporting key before upload; an ADR-058 AFCARS retention class;afcars_submission_policyintegrity-hashed outside the registry (ADR-020 / ADR-048 § Amendment — #949). Erratum (2026-10-05, P-D4 R-D31): the ADR-058 AFCARS retention class is a follow-up, #2175; the retained policy is also immutable (#2174). -
R12 — the delivery boundary: this program produces, validates and readies the file — terminal state
ready_for_transmissionwith the artifact hash and pins recorded;transmitted/acf_acknowledgmentare written only by the separate ACF-delivery program (#1967); today’s marking-only transmit route is RETIRED, not kept. -
R13 — runtime compatibility: the compiled
RecordSchemaContractevery promoted dictionary is verified against; a dictionary the binary cannot store or render is a typed 503 until code rolls. -
R14 — transaction dates: a corrected removal / exit response reports its FIRST recording’s immutable timestamp (the rule dates "each response"; ⁂ #1073 if DFCS reads it otherwise).
Review log
Round |
Vendor |
Resolved model |
Verdict |
1 |
Anthropic — three fresh contextless lens subagents + an anchor verifier over rev 1 |
Claude Fable 5.1 |
no-ship — 18 blockers + 22 observations, folded into rev 2 |
gate |
maintainer (plan mode; rev 2, rev 3, each against the checkout and the primary federal sources) |
— |
rev 2 no-ship (21 findings + the ruling "no fig leafs, no shortcuts, no backwards compat pre 1.0; any jurisdiction, configurable; federal standards in the federal ruleset"); rev 3 no-ship (22 findings: compliance exemptions and denominators, within-file recurrence checks, immutable transaction timestamps, effective-dated facts, permanency-plan history, effective-dated dictionary selection, the assistance-file artifact model, runtime compatibility, immutable policy identity, readiness binding, the goal handoff, runtime crosswalk guarantees, applicability before sourcing, the tether resolver, committed schemas, invariant timing, export staging, e2e determinism, period ownership, the metadata contract, the initial manifest, the drift job, the delivery boundary) → rev 4: this program page + five gated child plans; then a fresh two-lens read-only pass over rev 4 (coherence against source; federal honesty against the CFR re-fetched) — eight defects folded (the plan key off episodes; replay vs regenerate; the supersede chain; one dictionary; the two exact exemptions; no two-file checks; 89 FR 96588 + group (i); the transmit stub retired); rev 4 APPROVED 2026-09-20 with R0–R14 as recommended |
2 |
open — run by the maintainer through another vendor’s model |
open |
open |