Plan: AFCARS Validation — the §1355.46 Classifier Without the Bulletin Rows (#2126, P-D3 of #1965)
- Archive record
- Status
- Context (census 2026-10-02, on
mainafter P-D2) - Scope
- Design
- D1 — The read path and the exemption (U1)
- D2 — The applicability evaluator (U2, after U1 and the dictionary corrections #2157)
- D3 — Value-set admission (U3, after the dictionary corrections #2157)
- D4 — The classes (U4, after #2128)
- D5 — Aggregation, results, finalize, the invariant (U5, one MR per A8)
- D6 — The findings (U6)
- D7 — review-afcars (U7, R-D22)
- D8 — Code layout
- Units
- Test matrix (by risk)
- Verification
- Rollout and risks
- Rulings (approved 2026-10-03 as recommended; D1–D8 are binding)
- Review log
Archive record
Merge requests: !1788 (U0 plan page + the A8 errata + the unit and follow-up issues, Relates #2126) + !1789 (U1, Closes #2158) + !1790 (the dictionary corrections, Closes #2157) + !1791 (the complement arms, Closes #2167) + !1792 (U3, Closes #2160) + !1793 (the reporting docs drift, Closes #2166) + !1794 (U2, Closes #2159) + !1795 (U4, Closes #2161) + !1796 (U5, Closes #2162) + !1797 (U6, Closes #2163) + !1798 (U7, Closes #2164) + !1799 (U8, Closes #2165 and #2126); the tardy rows landed first as a P-A2 follow-up (!1787, #2128)
2026-10-04 — approved in plan mode 2026-10-03 (rulings R-D12–R-D24 as recommended) after a contextless round 1 (no-ship, 3
blockers fixed, 17 findings folded), the maintainer’s round 2 (no-ship, 10 findings folded) and a three-pass fold check. What
landed:
the read path and the exemption (U1: the sealed rows opened in place under their AAD, grouped per child; turned_18_prior_period
from the decrypted (b)(1), strictly before the half’s from, its effects read from the exemption row, fail closed);
the dictionary corrections (#2157: a qualifier atom for (b)(1)'s estimated_abandoned, the (e)(15) / (h)(9) arms on
e7_not_a_couple / h1_not_a_couple, a seventh table min_rows of 27 rows; #2167: every blank-gate complement arm in the
2022 oohc rows re-transcribed, 29 tokens over 159 arms);
the evaluator (U2: DictionaryView::arms, event-kind ownership, 29 of 48 predicates bound from the stored cells, each cell read
through its own decision, a memoized walk with the self-edge read raw; predicate_unbound, arms_exhausted,
applicability_cycle);
admission (U3: Admitted \| Incomplete \| Invalid, Incomplete outranking Invalid);
the classes (U4: NotApplicable \| Exempt \| Missing \| Invalid \| Tardy \| Ok in D4’s order; tardy from #2128’s rows, strictly more
than more_than_days on the same row, no period limit; tardy_rows_missing);
the fold and finalize (U5: per element the records by worst class, the min_rows zero-row rule, CleanClass standards, the two
A8 steps written unevaluated and failing; three immutable tables; the CAS out of draft inside the generate’s one transaction
to validated or validated_with_errors, the graph’s new draft → validated_with_errors edge; cited_aggregation,
finalize_conflict; the invariant’s five AFCARS legs; measured at 20 000 children: +14.4 s inside the commit, 805 000 error rows,
peak RSS 417 MiB, on #2154);
the findings (U6: runaway_exit_mismatch on a real exit only, sibling_counts_out_of_order, plan_outside_every_episode,
written after finalize to the immutable afcars_findings, never changing the status);
review-afcars (U7: the bounded GET …/validation report and keyset pages of errors and findings, closed wire token enums,
craig reporting review-afcars, the craig-web detail page linked from the list).
Every submission is validated_with_errors until P-D5 evaluates the two steps. Follow-ups: #2168 (the 2028 (i)(2) / (i)(3)
arms, with #2148), #2169 (the fold delays the job heartbeat; before P-D5), #2154 (the generate’s memory); P-D5’s inputs are on
#1965, P-D4’s on #2127.
Status
Done (2026-10-04) — !1799
| Anchor | What binds here |
|---|---|
#2126; AFCARS 2020 Program (#949) |
A8 (validation in that order; the invariant rewritten in the SAME MR as finalize), R4, ADR-040 (leave-unpopulated; consistency rows are federal-ruleset data) |
P-D1 (#1965) D1 and R-D6 |
the fixed scope; federal rules are dictionary data, never classifier constants; `review-afcars’s surfaces are this page’s fork |
P-D2 (#2125) as built and its inputs on #2126 |
the immutable record tables, coverage, gaps, the retained policy; the one-transaction commit; raw history; the test-only read path |
#2128 (the tardy transcription) |
the |
The P-D-owned findings on #1965 (P-B2 D3, D11; P-B3; P-C; #1999) |
the findings this page implements or routes |
⁂ = a reading DFCS may rule otherwise, logged on #1073. "Local" is the jurisdiction clock (craig_common::clock::BusinessClock).
Context (census 2026-10-02, on main after P-D2)
-
No AFCARS submission leaves
draft.insert_generatedwritesdraftwith a literal 0 errors (services/craig-reporting/src/store/afcars.rs:111-129); the graph has nodraft → validated_with_errorsedge andvalidated_with_errorsis terminal (src/transitions.rs:39-58). NCANDS finalizes inside its generate transaction from SQL counts, without a CAS (src/store/ncands.rs:153-191,src/jobs.rs:248-260). -
The records are immutable and carry no results (
migrations/20261002120100_afcars_record_tables.sql:189-220). Their read path is test-only:Cell::from_stored/blank, twoCellError`s, `RecordRow::restore/cell,SealedRow::into_row,row::open,store::read_records(records/cell.rs:83-148,records/row.rs:208-435,records/store.rs:371-438). -
The generate holds one snapshot to its commit (
afcars/job/mod.rs:197-232); the commit order is head lock, lineage, submission, records / coverage / gaps / policy,complete_in_tx(afcars/job/commit.rs:104-179). Validation there reads the retained policy by construction. -
No evaluator. The contracts parse and never evaluate (
afcars_dictionary/mod.rs:3-11);DictionaryView::applicabilityanswers one(key, predicate)pair and has no production caller; there is no ordered-arm accessor (view.rs:72-84). The 2022 oohc rows carry 174 arms (101 required, 73 blank) over 92 keys, each key ending inalways, no category rows, and use 36 predicate tokens;state_agencyhas no fact source. (b)(20) requiresb19_positive, (b)(21)b20_positive. (e)(15) and (h)(9) alone among the second-parent rows use complement arms that fall through tostate_agency → required. -
No admission check.
value_set.rsparses only; writes check slot count and kind (records/row.rs:297-346). Assembly emits an enabling gate without its list and aneachwithout its unanswered categories (assembly/encode.rs:58-100). -
Repeating elements. (f)(1)–(f)(6) live on
afcars_record_events; (f)(3), (f)(4), (f)(5) shareRepeatingDates(records/schema.rs:232-237); each kind leaves the others' columns blank. (f)(1)'s value set carriespermanency_plan_not_established; (f)(3)–(f)(5) are bare dates. -
Thresholds. Each element carries
clean_class(CleanClass: 11hundred_percent, 131ten_percent,afcars_dictionary/mod.rs:315-323) andaggregation(allper_record). No recurrence or consistency node exists. -
The invariant has two legs,
validated ⇒ validation_errors = 0 ∧ record_count > 0, NCANDS and AFCARS (crates/craig-test-lib/sql/invariants/craig-reporting/validated_with_errors.sql), blocking;refuse_untransmittablerefuses any nonzerovalidation_errors(src/api/mod.rs:79-100). -
review-afcarsis the missing CLI verb besideapprove-afcars/transmit-afcars(services/craig-cli/src/cmd/reporting.rs:26-54); the web list shows the count and a Review button onvalidated(services/craig-web/templates/reporting/afcars.html:76-100).
Scope
In: D1–D8. Out (P-D5, after #1987): inconsistent and the recurrence step (their dictionary nodes; until then the
steps are recorded unevaluable, D5), aggregation overrides, the record number, (e)(6)'s rendering, the seeded cohort test.
Out elsewhere: the 2028 series (#2148), readiness and the transmit gate’s count arm (P-D4 #2127), the assistance file and
its exemption (P-E #1966), the class-3 history (#2131).
Design
D1 — The read path and the exemption (U1)
-
Un-gated:
Cell::from_stored,Cell::blank,CellError::{SlotCount, NonCanonicalBlank},RecordRow::cell,SealedRow::into_row,row::open. After the records are inserted, the commit consumes itsVec<SealedRow>withinto_rowand opens each row in place under the same AAD (R-D12): no read-back, no copy.RecordRow::restoreandstore::read_recordsstay test-only. -
validate::observegroups the opened rows per child (ChildObservations: the child row, parents, removals, arrangements, events). -
validate::exempt:turned_18_prior_periodholds iff the decrypted (b)(1) date plus 216 months (chrono month arithmetic, so a 29 February birth turns 18 on 28 February ⁂) falls before the period’sfrom(local date); a blank or invalid (b)(1) never exempts. Its effects are read fromDictionaryView::exemption: complianceexemptleaves every denominator, membershipretainedkeeps the record inrecord_countand the records. A missing row, a membership ofexcluded(the record is already sealed and inserted) and anassistrecord (P-E) are refused (R-D20). -
Erratum (2026-10-03): records carry no file and the generate builds only out-of-home care records, so
assist_recordrefuses theFilethe commit passesTurned18::from_view; U1 asserts it there, and U5 asserts it at that seam rather than through the generate.
D2 — The applicability evaluator (U2, after U1 and the dictionary corrections #2157)
-
Contracts.
DictionaryView::arms(&ElementKey)returns a key’s element-level applicability rows in document order. Category rows exist only on 2028 keys (#2148), which assembly already refuses. -
Ownership.
RecordColumngains the owningEventKindof each events element: (f)(1), (f)(2) plan; (f)(3) periodic_review; (f)(4) permanency_hearing; (f)(5), (f)(6) visit. An element is evaluated only on rows of its table and, on events, of its kind. -
Bindings (
services/craig-reporting/src/afcars/validate/applicability.rs). Every token on the committed 2022 oohc rows (29 after the corrections below) binds to the fact its doc states (Predicateincrates/craig-reporting-contracts/src/afcars_dictionary/mod.rs), read from the STORED cells (R-D16). A row reads itself, then the rows it belongs to: an arrangement reads its removal row, then the child row; a removal row (its exit cells included) and a parent row read the child row. Each binding declares the elements it reads. A token reads a cell only through that cell’s own decision: a cell whose arm saysblankreads as blank to every token (R-D17). Decisions are memoized per (row, element) and evaluated prerequisites first, with an in-progress set. A token that reads the element being decided reads its raw cell, since that self-edge is not a dependency, so only a cycle through other elements is refused. Self-gating, accepted because the producer’s projection is the authority (R-D16):-
c5i_petition_filed_or_parent_deceasedholds iff (c)(5) ≠not_applicableand (c)(5)(i) is filled;c5_terminated_or_parent_deceasediff (c)(5) ≠not_applicableand (c)(5)(ii) is filled (cases leaves (ii) blank while a termination is pending,services/craig-cases/src/afcars_parents.rs:242-268, R-C11); neither is evermissing(#1999). -
exit_recordedholds iff (g)(1) is filled, so (g)(1) is nevermissing. -
state_agencyis a constanttrue: every CRAIG jurisdiction is a State title IV-E agency, and (a)(1) is its FIPS (P-D2 D5).
-
-
The walk. The first arm whose token holds decides
requiredorblank. Refused by name, never defaulted, value-free: an unbound token, a list with no true arm, a dependency cycle (D5 lists the wire tokens). -
The evaluator never patches an arm. The dictionary corrects (e)(15) and (h)(9) first (R-D24): their complement arms (
e7_separated,e7_single_adult;h1_separated,h1_single_adult,h1_married_but_individually_…) become one blank-first arm on a new token that holds when the marital status is NOTmarried_coupleorunmarried_couple(blank included):e7_not_a_couple,h1_not_a_couple. (e)(15) ise2_no → blank,e7_not_a_couple → blank,state_agency → required,always → blank; (h)(9) isg3_not_adoption_or_guardianship → blank,h1_not_a_couple → blank,state_agency → required,always → blank(#2167, which also folds (e)(10)'se2_noand (h)(4)'s seveng3_*arms intoe2_not_yes/g3_not_adoption_or_guardianship). Thirty-six tokens become 29. -
Erratum (2026-10-03, #2167): D2’s (h)(9) arms and token count, and the U2 (h)(4) test row, corrected to as-built (R-D24).
D3 — Value-set admission (U3, after the dictionary corrections #2157)
-
validate::value_set::admits(&ValueSet, &Cell) → Admission, withAdmission=Admitted | Incomplete | Invalid, judges a FILLED cell against its element’s committed value set.-
Invalid: an enum or indicator outside its set (crosswalked enums arrive as ACF codes, P-D2 D5); an integer out of range; text past its maximum; a decimal past its scale; two alternatives of one union filled; aneachcategory or response outside the set; agatedlist under a non-enabling parent (afcars_dictionary/mod.rs:1035-1039). -
Incomplete: aneachthat does not answer every category; an enablinggatedparent whose list is absent or does not answer every category; agatedlist with its parent blank; a qualifier atom without the value it qualifies.
-
-
A cell both
IncompleteandInvalidisIncomplete(it mirrors missing > invalid). -
Qualifiers come from the dictionary (R-D24): after the follow-up, (b)(1)'s
estimated_abandonedis a qualifier of its date; the other unions on the 2022 oohc rows — (c)(1), (c)(2), (c)(5)(i), (h)(15) — are alternatives. -
Erratum (2026-10-03, #2160): as built, a blank cell (or one whose every answer is an empty string, list or map) is
Incomplete, so U4 may calladmitson anyrequiredcell;CellValue::Gated.parentis a mandatory token, so "agatedlist with its parent blank" is the empty parent with a list; "past its scale" means more fractional digits than the scale once trailing zeros drop; ayearoutside 0..=9999 (the atom’s four digits) and a slot of another count or kind areInvalid.
D4 — The classes (U4, after #2128)
-
Per (row, element) observation:
NotApplicable | Exempt | Missing | Invalid | Tardy | Ok, one class each, decided in that order: not applicable first, then exempt (an exempt record’s observations are allExempt: no error row, in no summary count), then missing > invalid > tardy, andOkwhen none holds. A refusal is structural and fails the generate even on an exempt record. -
An arm that says
blankmakes the observation not applicable andok, regardless of sourcing (A8 (3)); a FILLED cell there is not applicable too, and reads as blank to dependents (R-D17). -
A
requiredblank ismissing, unsourced and gapped included (A8 (4)); anIncompletecell ismissing; anInvalidcell isinvalid. -
Tardy (§1355.46(b)(5), R-D6): through
DictionaryView::tardy()— per row atransactionelement d)(2), (g)(2, itseventelement d)(1), (g)(1 andmore_than_days(30):tardyiff the transaction’s local date is MORE thanmore_than_daysafter the event date. Observed on every removal and exit row of the submission (the text has no period limit; which rows the file carries is P-D5’s, R-D19). A blank or invalid event or transaction date yields no tardy observation; that cell’s own class reports it. A view without tardy rows is refused (fail closed).
D5 — Aggregation, results, finalize, the invariant (U5, one MR per A8)
-
Fold (
per_record, R-D18). Per element, a record is applicable iff at least one of its rows is (or it carries a zero-row observation, below); its class is its worst applicable row’s. The counts are RECORDS by worst class:missing + invalid= the element’s errors, never more than
tardyapplicable. Zero rows: each repeating element carries a dictionarymin_rows(0 or 1) and the record level it counts under (child or removal), added by the dictionary-corrections follow-up #2157 from the pinned text (R-D24). Fewer rows thanmin_rowsis onemissingobservation for that child or removal; otherwise zero rows is no observation. The transcriptions as built (#2157; corrected to as-built, see the erratum at the end of D5): (f)(1), (f)(2)min_rows1 per child (§1355.44(f)(1) answers "plan not established"); (e)(1), (e)(2), (e)(5) 1 per removal; (e)(3), (e)(4), (e)(6)–(e)(18) 0 (each conditioned on another paragraph of its own arrangement) ⁂; (c)(5)–(c)(5)(ii) 0 (a child without a parent row answers through (c)(1) / (c)(2)) ⁂; (f)(3)–(f)(6) 0 per child. ACitedaggregation is refused until P-D5. -
Standards (R-D15). An element meets its standard from
CleanClass, checked arithmetic:hundred_percentiff zero errors,ten_percentifferrors × 10 ≤ applicable. The two A8 steps P-D3 cannot evaluate — consistency (inconsistent) and recurrence — are written unconditionally asevaluated = false,meets_standard = false; P-D5 evaluates them. -
Results (R-D14), migration
…_afcars_validation_results.sql, all immutable (the records' trigger shape), eachsubmission_ida FKON DELETE RESTRICT:-
afcars_element_results(submission_id, element_key, clean_class, applicable, missing, invalid, tardy, meets_standard; PRIMARY KEY (submission_id, element_key)), one row per oohc element of the view (the coverage keys); -
afcars_validation_steps(submission_id, step CHECK IN ('consistency', 'recurrence'), evaluated, meets_standard; PRIMARY KEY (submission_id, step)); -
afcars_observation_errors(id UUID v7 PK, submission_id, child_id, source_id NULL, element_key, class CHECK IN ('missing', 'invalid', 'tardy')), non-ok observations only, no cell value, indexed on(submission_id, id)for D7’s keyset pages.source_id: the parent row’sparent_person_id, the removal row’sepisode_id, the arrangement row’sarrangement_id, the event row’ssource_id; a removal-level zero-row observation carries its removal’sepisode_id; NULL on a child-row or child-level zero-row observation.
-
-
Refusals are closed
engine_failedtokens (the job’sRefusal), each listed indeployment-guide.adocby the unit that adds it:predicate_unbound,arms_exhausted,applicability_cycle(U2);exemption_row_missing,exemption_excluded,assist_record(U1);tardy_rows_missing(U4);cited_aggregation,finalize_conflict(the CAS miss) (U5). -
Finalize (R-D12, R-D13):
store::afcars::finalize_afcars_submission, inside the generate transaction after the records and beforecomplete_in_tx, writes the results, then CASesWHERE id = $1 AND status = 'draft':validation_errors= the failing element rows plus the failing step rows,validated_at = now(), statusvalidatediffrecord_count > 0andvalidation_errors = 0, elsevalidated_with_errors, throughvalidate_transition. The shared graph gains(Draft, ValidatedWithErrors). The job’s result is the finalized row. Until P-D5 every submission isvalidated_with_errors(the two steps), an all-exempt one included. -
The invariant (R-D23) keeps its stem and name and the NCANDS leg. "A submission with records" has at least one
afcars_child_recordsrow. AFCARS legs: (1) as today; (2) a submission with records has one element-results row peroohc.%coverage row and both step rows; (3) itsvalidation_errors= its failing element and step rows; (4)meets_standardagrees with the counts and the class, and a step meets only when evaluated; (5) no submission with records isdraft; (6) a submission with records isvalidated_with_errorsiffvalidation_errors > 0, andvalidated,reviewed,approved,transmittedrequirevalidation_errors = 0(a record-less submission is checked only by leg 1). -
The two tests pinning
draftafter a generate (afcars/job/mod.rs:1368,api/afcars_regenerate_tests.rs:82) move to the finalized status; the comments that a generate writesdraftor that P-D3 is pending go (tests/api/afcars.rs:124,:172,:191,:193,:270;tests/api/afcars_plant.rs:3-9,:33-34;tests/api/afcars_export.rs:14;tests/api/upload_attempts_reporting.rs:33;tools/craig-seed/src/datagen.rs:3076-3078); the commit says why. -
Docs in U5:
data-model-reporting.adoc(three tables),state-machines.adoc(the edge), the generate route’s utoipa text and the regenerated API page ("`result` is the finalized submission"),cli.adoc, the CHANGELOG. -
Erratum (2026-10-03, #2157): the zero-row expectations are corrected as transcribed — a missing group row is owed only the elements the text requires on every row of its group: (e)(1), (e)(2), (e)(5)
min_rows1 per removal and (f)(1), (f)(2) 1 per child; (e)(3), (e)(4), (e)(6)–(e)(18) (each conditioned on another paragraph of its own arrangement), (c)(5)–(c)(5)(ii) and (f)(3)–(f)(6) 0 ⁂; (f)(3)–(f)(6) count underchild(an undated event has no removal); D3’s qualifier is the atomqualifier(token). -
Erratum (2026-10-03, #2162): a repeating element no
min_rowsrow governs, or whose level its table cannot count, is refusedassemblywhen the fold is built from the view (fail closed). oohc.i5–i8 from 2028-10-01 have no row yet (follow-up #2148). The e2e comment attests/e2e/specs/reporting-actions.spec.ts:140-142moves with the D5 list.
D6 — The findings (U6)
-
Migration
…_afcars_findings.sql, immutable:afcars_findings(id UUID v7 PK, submission_id FK ON DELETE RESTRICT, child_id, source_id NULL, kind), closedkindCHECK, indexed on(submission_id, id), written in the same transaction, review-only — never changing finalize (inconsistentis P-D5’s, R-D21);data-model-reporting.adocgains it in U6:-
runaway_exit_mismatch— (g)(3) isrunaway_or_whereabouts_unknownwhile the episode’s latest arrangement by (e)(1) is neitherrunawaynorwhereabouts_unknown, or the reverse (P-B2 D3); -
sibling_counts_out_of_order— (b)(21) > (b)(20) or (b)(20) > (b)(19), only when all three are applicable and filled; -
plan_outside_every_episode— a dated plan with no episode link (an undated plan already has its gap).
-
-
Routed: the (b)(20) sibling gap is the existing gap pair; (e)(8) vs (e)(3) is a P-D5 consistency candidate (noted on #2129); the (i) blanks on
b6i_yes_icwa_appliesare 2028 rows (#2148); (e)(6)'s rendering is P-D5’s; (d)(6)(ii), (b)(6), (b)(4)(ii) and (c)(5) are applicability; a reported episode under 24 h is correct by P-D2 D6. -
Erratum (2026-10-03, #2163):
runaway_exit_mismatchneeds a real exit, as P-B2 D3 says: a (g)(3) ofnot_applicable(an open episode) is no finding either way; (e)(4) is the arrangement’s signal, read through its decision (blank when (e)(2) is yes, and a blank or not-applicable (e)(4) is no run).
D7 — review-afcars (U7, R-D22)
-
GET /v1/reporting/afcars/{id}/validation(authz Read) answers a boundedAfcarsValidationReport(craig-reporting-contracts::afcars):elements(per elementclean_class,applicable,missing,invalid,tardy,meets_standard),steps,gaps(count per reason),error_rows(total) andfindings_by_kind(count per kind). Its size is bounded by the view’s elements, never the children. -
GET …/validation/errors?element_key=&class=&cursor=&limit=andGET …/validation/findings?kind=&cursor=&limit=page by keyset onidascending (UUID v7, time-ordered), thecursor/next_cursorshape ofservices/craig-cases/src/api/outbound_stages.rs;limitdefaults to 100, and outside 1..=500 is 422 naminglimit; filters are predicates over the(submission_id, id)index. 404 for an unknown submission; a submission without results answers empty lists. utoipa, the route-to-client map,ReportingClientmethods, the regenerated API page. -
craig-cli
reporting review-afcars <id>prints the summary;--errors [--element KEY] [--class CLASS]pages the errors;--mark-reviewedperforms the existingPUT …/review(the server still refuses unlessvalidated). -
craig-web
/reporting/afcars/{id}: the summary and a paginated error list, linked from the list, under the list’s own authz (AFCARS submission Read) with en locale keys for every label; the list row and Review button are unchanged. Docs:cli.adoc, the API page, the supervisor guide.
D8 — Code layout
-
services/craig-reporting/src/afcars/validate/:observe.rs,exempt.rs,applicability.rs,value_set.rs,classify.rs,aggregate.rs,findings.rs;store/afcars.rsgainsfinalize_afcars_submission;job/commit.rscalls validation betweenwrite_rowsandcomplete_in_tx. -
Code landed before its production caller carries
cfg_attr(not(test), expect(dead_code, reason = …))naming U5 (the P-A precedent); U5 removes every one.
Units
Each MR Relates to #2126, #1965 and #949 and closes its own unit issue; U8 closes #2126.
| MR | Scope | W |
|---|---|---|
U0 |
this page (Active nav); the unit issues under &99 (U1 #2158 … U8 #2165); program A8 errata (R-D13, R-D15); the
dictionary-corrections P-A2 follow-up #2157 (R-D24: the (b)(1) qualifier atom, the (e)(15) and (h)(9) arms, |
1 |
U1 |
READ PATH AND EXEMPTION: the un-gating, |
3 |
U2 |
EVALUATOR: the arm accessor, event-kind ownership, the bindings, dependency-ordered reads, the walk (D2) |
5 |
U3 |
ADMISSION with completeness (D3) |
2 |
U4 |
CLASSES incl. tardy (D4) |
3 |
U5 |
AGGREGATION, STEPS, RESULTS, FINALIZE, THE INVARIANT, with their docs (D5) |
5 |
U6 |
FINDINGS, with their data-model row (D6) |
3 |
U7 |
REVIEW-AFCARS: the bounded summary, the paginated errors and findings, the CLI verb, the web page, with their docs (D7) |
5 |
U8 |
CLOSE-OUT: |
1 |
Weight 28. U0 first; U1; the dictionary corrections #2157; then U2 (after U1) and U3 in parallel; U4 after U2, U3 and #2128; then
U5, U6 (both touch commit.rs), U7, U8. Every MR is green alone with its CHANGELOG entry; every new test carries
// @axis:. Tests are hermetic: the in-src job runtime over the reporting scratch base with VerifiedGeorgiaSurface; a
deployed generate answers 503 until #1987.
Test matrix (by risk)
| Test | Axis | Unit | Asserts |
|---|---|---|---|
|
happy |
U1 |
|
|
sad |
U1 |
the boundary day, local |
|
evil |
U1 |
in the universe;
|
|
happy |
U2 |
(b)(3)'s |
|
happy |
U2 |
every token on the committed 2022 oohc rows is bound |
|
sad |
U2 |
a filled (g)(1), (c)(5)(i) and (c)(5)(ii) each decide
|
|
evil |
U2 |
|
|
evil |
U2 |
(b)(19) = 0 with (b)(20) = 2: (b)(20) and (b)(21) not applicable |
|
sad |
U2 |
a plan, two reviews, a hearing and visits: no structural blank is an observation |
|
sad |
U2 |
(e)(15) on a blank (e)(7); (h)(9) on a blank (h)(1) |
|
sad |
U2 |
deceased with no termination; a pending termination |
|
evil |
U2 |
proptest: a decision or a typed refusal |
|
happy |
U3 |
proptest over each committed value set |
|
evil |
U3 |
proptest: a mutated token, an out-of-range integer, an over-length text |
|
evil |
U3 |
c5i date + |
|
evil |
U3 |
race with 7 of 8 categories; (b)(17) enabling with no list; (b)(1) indicator, no date; (b)(1) date + indicator admitted |
|
happy |
U4 |
(h)(14) without an adoption or guardianship exit is not
applicable; with one, the same blank is |
|
happy |
U4 |
one class per observation; |
|
happy |
U4 |
threshold → |
|
sad |
U4 |
Sep 15 removal first recorded Oct 31 is tardy in the Oct–Mar submission |
|
evil |
U4 |
a synthetic row with another day count moves the outcome |
|
fault |
U4 |
fail closed ( |
|
sad |
U4 |
the date’s own class reports it |
|
sad |
U4 |
(b)(6) filled with ICWA ≠ yes (R-D17) |
|
happy |
U5 |
applicable, non-exempt records;
(b)(4)(ii) only on |
|
happy |
U5 |
in
|
|
evil |
U5 |
every element meets; both steps
fail; |
|
sad |
U5 |
no plan row → (f)(1) |
|
happy |
U5 |
synthetic results and steps → |
|
evil |
U5 |
proptest over arbitrary counts, no overflow; 1 / 10 meets, 2 / 19 fails |
|
happy |
U5 |
two arrangements, one invalid → one error, denominator 1 |
|
fault |
U5 |
no submission, results or job success |
|
conc |
U5 |
a CAS miss is a typed refusal, nothing written |
|
replay |
U5 |
the stored result’s status equals the row’s |
|
replay |
U5 |
the head is retained whole, results included |
|
evil |
U5 |
UPDATE, DELETE, TRUNCATE refused on the three tables |
|
evil |
U5 |
on the scratch base: planted violations of legs 2–6
(incl. a clean |
|
evil |
U5 |
|
|
happy |
U6 |
(g)(3) runaway beside a family arrangement, and the reverse |
|
sad |
U6 |
(b)(21) > (b)(20); an inapplicable or blank count → none |
|
sad |
U6 |
an undated plan → none |
|
happy |
U6 |
same status and count with or without findings |
|
evil |
U6 |
schema and log capture |
|
evil |
U6 |
UPDATE, DELETE, TRUNCATE refused |
|
happy |
U7 |
20 000 errors: the summary’s size is independent of them; pages of at
most |
|
sad |
U7 |
typed 404 on all three routes |
|
evil |
U7 |
out-of-scope 403 / 404; a service principal denied |
|
happy |
U7 |
prints; |
|
sad |
U7 |
"no validation results"; the list Review button unchanged |
Verification
-
Per MR: the gate list (fmt, clippy, the budgets at their locks,
validate-authz-coverage,api-docs --check,check-docs,plan-lint), the hermetic scratch-DB legs locally, then the battery (baregit push). -
Close-out:
cargo xtask plan-lint --done docs/modules/ROOT/pages/plans/archive/afcars-validation.adoc --allow-open 949,1073,1965,1966,1987,2126,2127,2129,2131,2148,2154,2165(plus #2166 while open).
Rollout and risks
-
U5 is pre-1.0
Changed: a generate yieldsvalidatedorvalidated_with_errors, neverdraft; one additive migration (three tables). U6: one migration. U7: three routes, one CLI verb, one page. No floor bump; no seed data change (one seed comment). -
Risks: a mis-bound token mis-scores (the golden binding test and the refusals bound it); a large half’s validation cost inside the one transaction (measured at U5 against the volume measure on #2125, follow-up #2154); every submission is
validated_with_errorsuntil P-D5 evaluates the two steps (intended, pinned by tests).
Rulings (approved 2026-10-03 as recommended; D1–D8 are binding)
| # | Recommendation | Alternative |
|---|---|---|
R-D12 |
Validate and finalize INSIDE the generate transaction over the sealed rows as inserted; add |
a separate validate act from a visible |
R-D13 |
|
records or observations in error |
R-D14 |
|
per-element counts only; or JSONB on the submission |
R-D15 |
Element standards from |
validate without the steps (an all-exempt half would pass) |
R-D16 |
Bind tokens from the stored cells only, through each cell’s own decision; the self-gating of (c)(5)(i), (c)(5)(ii) and
(g)(1) accepted; |
bind from producer facts during the walk |
R-D17 |
A value where the arm says blank is not applicable, |
|
R-D18 |
Zero rows: the dictionary’s |
zero rows always none; or always |
R-D19 |
Validate every stored row; tardy on every removal and exit row, no period limit |
tardy only for events in the period |
R-D20 |
|
the effects as Rust constants |
R-D21 |
Three review-only finding kinds (D6); (e)(8) vs (e)(3) to P-D5; findings never change finalize |
findings as errors |
R-D22 |
|
API and CLI only (web a follow-up) |
R-D23 |
Keep the invariant’s stem and name and the NCANDS leg; add the AFCARS legs, the reverse leg included |
a new invariant file |
R-D24 |
Federal text is dictionary data: a P-A2 follow-up (#2157, filed at U0) adds a qualifier atom for (b)(1) (with its knock-on:
every exhaustive |
U2 / U3 / U5 patch these in Rust |
Review log
| Round | Vendor | Resolved model | Verdict |
|---|---|---|---|
1 |
Anthropic — one fresh contextless reviewer (the page, the rules incl. |
Claude Opus 5.5 |
no-ship — 3 blockers fixed (a union’s qualifier atom;
the in-place read path needs |
2 |
OpenAI — maintainer-run (2026-10-03) |
GPT Astra |
no-ship — 10 findings folded: an all-exempt submission (unevaluable A8 steps
fail their standard); compound-cell completeness ( |
fold check |
Anthropic — three contextless read-only passes over the folded round-2 text |
Claude Opus 5.5 |
(1) a per-finding auditor: 8 addressed, 2 partial (the self-gating cycle; no data marker for required groups) — fixed; (2) an adversarial gap hunt: 6 blockers and 15 minor (incl. the fold’s count arithmetic, the arm language for the (e)(15) / (h)(9) correction, a leftover close-out phrase, refusal tokens, report fields, tests) — all fixed; (3) a residue verifier: every item fixed, 7 residues (the (b)(1) knock-on order, R-D13’s record-count clause, wording, class order, zero-row source ids) — fixed |