Plan: Subsidy Eligibility Hard Checks + the eligibility.evaluated Producer (#1114, #1313)
Archive record
10 units over 2026-08-31 → 2026-09-02 after a 44-finding external review (v3 passed round 2 on 2026-08-31): U-FMAP effective-dated FMAP bundle data; U1 the fact-source record + honest attestation text (!1540); U2 the age hard check at ERR create + SG/NRSG activate through the <j>-subsidy-eligibility ruleset under actor relay (!1538); U3 caregiver linkage RULED C — rejected until the provider model (#634 named criterion, #1643 existence check; !1559); U4 the strict per-child contract; U5 ordering revision + persisted per-child verdict state + the invalidation set; U5b the claim-boundary content-compare gate + exclusion evidence (!1544); G-C RULED OPEN 2026-09-02 (the #1054 money fence); U6 per-child determinations + the LIVE eligibility.evaluated wire (!1562); U6b the craig-web determination tab (!1563). As-built: ADR-072 (Accepted) + ADR-055/056 amendments. Sibling: the backpay plan’s U-LE landed the same day (!1561).
Status
Done (2026-09-02) — every unit landed (U-FMAP · U1 · U2 · U3 [ruled C] · U4 · U5 · U5b ·
G-C [ruled open] · U6 · U6b); #1114 and #1313 closed; archived under
plans/archive/ by the plan-completion pass. History follows.
v3, 2026-08-31 — G-A fork rulings recorded (F0/F1, ADR-072); the v3 rework folds the
44-finding external review of 2026-08-31 (stop-ship classes: placeholder FMAP at G-C,
unreconstructable fan-out, per-child semantics, the nonexistent rules mechanism, deadline
budget, recency non-ordering, lost events, unenforced money boundary). External review
PASSED (round 2, 2026-08-31) — implementation unblocked in the recorded sequence.
v3.1, 2026-09-02: the maintainer RULED G-C OPEN and U3 = option C (reject until the
provider model); U6/U6b are unblocked and #1114 closes with the U3 record in v3.1.
v3.2, 2026-09-02: U6 landed — the wire is LIVE (per-child determinations, one
eligibility.evaluated per child staged inside the act tx by construction; the
battery proves the per-child count and the landing in financial’s verdict state).
U6b (the craig-web surface) landed the same day — the program’s units are all Done.
| Unit | Description | Status |
|---|---|---|
U0 |
This plan (v3) |
Done (2026-08-31) — external review passed (round 2) |
F0 |
RULED (2026-08-31, ADR-072): |
Done (2026-08-31) — maintainer-ruled |
F1 |
RULED (2026-08-31): age is measured at COVERAGE START at every boundary —
|
Done (2026-08-31) — maintainer-ruled |
G-A |
Gate: F0 + F1 + the ADR-072 placement directive (the age predicate is jurisdiction policy → rules engine). Fork rulings recorded; the v3 rework passed the round-2 external review |
Done (2026-08-31) — passed |
U-FMAP |
NEW (finding 1 — G-C precondition): an authoritative, effective-dated FMAP
source. |
Done (2026-08-31) — MR |
U1 |
Per-precondition design record (#1114 AC-1): the fact-source table folded into ADR-055/ADR-056 amendments; the four DFCS-blocked preconditions filed as named #1073 items; attestation FORM TEXT updated to say which facts are machine-checked vs county-attested (text only — F8-hash-safe) |
Done (2026-08-31) — MR feature/1114-u1-fact-source-record; the four preconditions are the #1114-U1 ⁂ note on #1073 (per that ledger’s dated-note convention — items, not description edits); form text updated on all four attestation surfaces (ERR submit hint, SG attestation card, activation hint, SS6 interstitial) |
U2 |
The age hard check at TWO write boundaries — ERR create (basis: the placement’s
|
Done (2026-08-31) — MR |
U3 |
Caregiver-identity linkage (#1114 AC-2): design-or-reject, unchanged from v2 —
the comparison (placement-owned caregiver party vs reject-until-a-provider-model) |
Done (2026-09-02) — RULED C (maintainer): the linkage is REJECTED until the provider model exists — recorded in ADR-055/ADR-056 § Amendment (2026-09-02); the caregiver↔placement binding is a NAMED criterion on #634; the party-person existence-check hardening is its own fix, #1643. The attestation posture (U1 form text + fact-source tables) stands. #1114 closes with this record |
U4 |
1313 wiring, part 1 (no live wire): the producer contract moves to
|
Done (2026-09-01) — MR feature/1313-u4-producer-contract; the contract lives at
|
U5 |
Ordering + persisted verdict state, BEFORE the wire carries money. Cases:
|
Done (2026-09-01) — MR feature/1313-u5-verdict-state; as designed, plus:
|
U5b |
NEW (finding 13): money-boundary enforcement at CLAIMING (per-diem GROSS never
depended on eligibility; FFP is a claiming concern). The gate compares CONTENT, not
revision (internal-pass stop-ship: issued rows never reprice, so a revision-compare
would livelock every re-determined child’s FFP forever — including outcome-identical
re-determinations). Claim BUILD: (1) a restamp-on-equal pass — issued/cleared rows
whose stamped |
Done (2026-09-01) — MR feature/1313-u5b-claim-boundary; as designed, plus:
the gate SCOPES to per-diem rows ( |
G-C |
Money-consent ruling: OPENING the #1054 fence. PRECONDITIONS: U-FMAP + U5 + U5b
landed. Blast radius restated: the #1089 UPDATE touches ONLY
|
Done (2026-09-02) — RULED OPEN by the maintainer (#1313 note 3777811483, cross-posted on #1114); U6 → U6b proceed in the recorded sequence |
U6 |
#1313 producer, part 2 (post-G-C): per-child determinations end-to-end. Cases
schema: |
Done (2026-09-02) — MR |
U6b |
NEW: the craig-web determination surface follows U6 — the form gains per-child input sections (from the case household), verbatim-4xx refusal rendering unchanged; the detail view lists per-child verdicts |
Done (2026-09-02) — MR |
Anchors: #1114 (checks), #1313 (producer)
Branches: feature/1114-<unit>-<slug> / feature/1313-<unit>-<slug>; U1+U4 may share
(docs + contracts, no live behavior)
Sequencing: U-FMAP · U1 · U2 · U3 independent after G-A; U4 → U5 → U5b → G-C → U6 → U6b
Scale: U-FMAP S, U1 S, U2 L, U3 S, U4 M, U5 M, U5b M, U6 L, U6b M
Context
ERR/SG enrollment (ADR-055/ADR-056) deliberately shipped five preconditions as RECORDED
UNVERIFIED attestations. The fact-source mapping (unchanged from v2): child age is
hard-checkable NOW (DOB via the existing cases S2S; the school FACT stays attested —
honestly split); caregiver identity is designable (U3); citizenship, child income,
funding availability, and TANF status are DFCS-blocked (⁂ #1073). #1313 is folded in
because financial’s handle_eligibility_evaluated consumer and reporting’s validator
are DEAD WIRE until a producer exists — which is also why the contract can be born
per-child with zero migration (finding: no producers, no consumers to transition).
The as-built facts the v3 design is anchored to (explorer-verified 2026-08-31):
ive_determinations is a case-scoped HISTORY table (no child column, no uniqueness,
latest = query-side); attested_inputs carries child_age VERBATIM from the worker
with no linkage to a child; the cohort hash covers (person_id, ssn_digest, as_of) —
no roles; the act persists evaluation_id + rule_set_revision already; NO event is
staged at act create; rules evaluation runs as raw POST /v1/rules/evaluate under
actor-relay headers with per-request hop_budget timeouts; the rule_evaluation authz
ruleset allows workers (supervisor/caseworker/admin rows) and only craig-cases as a
bare service.
Design
The F8 hash landmine (unchanged constraint)
canonical_hash serializes the WHOLE create body; persisted hashes are byte-stable.
Hard checks are server-side derivations — no create-body field is added or removed.
The ERR check runs after the F8 hash-replay short-circuit (which sits BEFORE every
volatile dependency — an exact replay returns 200 with zero S2S calls, zero rules
consults). SG activate replay is STATE-based (finding 10): recognition itself re-fetches
the placement to derive transfer_on, so the honest promise is "a recognized replay
performs no additional WRITE and returns 200 with the original outcome" — a replayed
retry with craig-placement down gets a 503, and that is recorded, not papered over.
§U2 — the age check, mechanically
Ruleset: a new per-jurisdiction DOMAIN ruleset <j>-subsidy-eligibility.json
(rulesets/georgia/…; a JDM decision-table ruleset registered/versioned/promotable like
the program rulesets — NOT the authz family). ONE evaluation per enrollment request
covers BOTH decisions (a single graph with two decision tables — one budget slot, one
evaluation_id): inputs { age_years: int, education_terms_valid: bool, program,
months_before_floor: int /* 0 when on-time */ }; outputs { age_eligible: bool,
refusal_reason: "over_age" | null, late_accept: bool }. The late table’s first arm is
the universal on-time row (months_before_floor == 0 → late_accept: true); a
jurisdiction without late-acceptance arms falls to its default-refuse row — on-time
enrollment can never be refused by an absent late arm. GA age_eligibility arms (each _description-cited; its
citations.toml rows ride THIS unit, never A5): age_years < 18 → eligible;
age_years == 18 && education_terms_valid → eligible; else refuse over_age.
education_terms_valid is derived server-side: the education-extension terms trio is
present AND education_expires_on (when present) ≥ the basis date (finding 21 — the
fact must be as-of-valid at coverage start; the school fact itself stays attested).
Consult: financial POSTs /v1/rules/evaluate (EvaluateRequest { rule_set:
"<j>-subsidy-eligibility", input, context_type: "subsidy-age-eligibility", context_id:
agreement/create context }) forwarding the inbound Authorization + X-Craig-Actor
headers verbatim — the cases actor-relay pattern (relay_auth.rs), so evaluation is
attributed to the ACTING WORKER and the existing worker rows of the rule_evaluation
authz ruleset authorize it; NO new bare-service grant (both enrollment boundaries are
worker-driven; nothing system-initiated consults this decision). The typed client is
craig-rules-client gaining an evaluate method (reusing
craig-rules-contracts::evaluation DTOs; per-request timeout parameter) — financial
promotes its existing dev-dependency to a runtime dependency; migrating cases' three
raw call sites onto it is a FILED follow-up, not a fold-in.
Budget (finding 9; the house doctrine is fixed per-hop margins, NOT deadline
propagation — ceiling.rs:89–94 says so explicitly): the enrollment routes partition the
Standard 20 s ceiling: placement S2S 5 s (existing) + DOB S2S 4 s (route-local wrap
under the 8 s CASES_S2S_DEADLINE const) + the ONE combined rules consult 4 s
2 s margin, const-
asserted 5 + 4 + 4 + 2 + statement work < 20 next to the existing ceiling asserts.
Each leg’s elapse maps to ITS typed 503 — the route’s typed refusal always beats the
generic ceiling 504. An exhaustion test pins the assertion.
DOB outcomes (FIVE — finding 21 adds the fifth): Found+valid → the predicate;
Found+future/invalid (age computes None) → typed 400 SUBSIDY_CHILD_DOB_INVALID;
MissingDob → typed 400 SUBSIDY_CHILD_DOB_MISSING (fail-closed — no enrollment on
attestation); PersonNotFound → typed 400; transport → typed 503.
Consult failure map (finding 23): timeout/connect → 503 SUBSIDY_RULES_UNAVAILABLE;
403 (authz refusal for the acting worker) → 403 relayed verbatim; 404 (ruleset absent
for the jurisdiction) → 500 invariant (a deployment with the program knob ON must carry
the ruleset — fail-closed, config error, named in the message); malformed/missing
output keys → 500 refusal (the cases parse_ive_outcome posture: never a defaulted
verdict); oversize response → 500. Every non-eligible consult refuses with 400
SUBSIDY_CHILD_OVER_AGE naming the computed age and basis date.
Provenance (finding 22): the agreement act persists age_evaluation_id,
age_rule_set_revision, dob_used, age_basis_date (new NOT NULL columns; pre-1.0:
expand + reseed, no backfill). Dispute reconstruction = agreement row → evaluation_id →
the rules-side rule_evaluations audit row.
Consent: enabling CRAIG_FINANCIALSUBSIDY_ERRENABLED /
…SUBSIDY_SG__ENABLED now consents to the check; consent text amended in the same MR.
§U5b — why claiming is the money boundary, and no sibling barrier exists
Per-diem GROSS never depends on eligibility; ffp_amount is a GENERATED column that
only matters when a CLAIM aggregates it. Events are asynchronous by design, so the
enforcement point is where federal money is asserted: claim build. The gate compares
CONTENT: a stamped row whose (ive_eligible, ffp_rate) equal the current verdict is
correct money regardless of how many outcome-identical re-determinations happened
since — the restamp-on-equal pass records that fact and the row claims; a row whose
stamped content DIFFERS is genuinely mispriced federal money and is excluded to
claim_exclusions pending the #1073 amendment vehicle (issued money is immutable —
exclusion-and-report is the only honest disposition). Convergence is therefore
guaranteed for every path that can converge, and permanent-exclusion is visible, never
silent. No sibling barrier exists because claims as-built aggregate per TYPE over a
window (one row of four sums — there are no per-child claim lines) while exclusions
act per-PAYMENT, and every payment row is child-scoped: sibling A’s staleness excludes
only A’s rows, and the totals recompute over the survivors.
Verification
-
U-FMAP: rate-resolution as-of tests (FY boundary, pre-first-FY refusal); the ruleset no longer emits a rate (fixture pin); citations rows resolve.
-
U2 (as-built composition): per-boundary legs — under-18/18-with-terms/over-age pinned OFFLINE against the committed ruleset (zen, the baselines-harness shape) AND over the live stack (over-age 400 with the typed problem + bound; the 18-education arm with a provenance-quartet probe + the rules-side audit-row attribution probe); expired-terms covered by the
education_terms_validunit legs + the offline arms; DOB outcomes — ALL FIVE live-pinned with no-state-mutation probes (incl. Found+invalid: cases does NOT validate DOBs at person create, so a future DOB persists freely and the typedSUBSIDY_CHILD_DOB_INVALIDarm is the SOLE defense — live-pinned, and the refusal body carries the basis date only, never the DOB); the consult failure map unit-pinned per variant (403 relay / 404-as-500 / 5xx-as-503 / 4xx-relay-invariant / malformed; timeout via the client’s wiremock legs); budget-partition const-assert
the named exhaustion pin; F8 replay-without-a-second-consult (the rules-audit COUNT probe); SG activate refuses over-age leaving the row pending (no activation columns) and stamps the quartet on success (basis = the derived transfer); the ERR coverage-start-not-business-date basis pin (a child who crossed the bound after placement start still enrolls). DEFERRED (recorded): the age-specific county-form e2e leg rides B2’s given-builders (the verbatim-4xx flash rendering through the subsidy surface is already e2e-pinned —subsidies-worker.spec.ts); leap-day/ month-boundary DOB arithmetic stays unit territory (calc). -
U4: strict-consumer drift test (misnamed field → DLX, never silent false/0.50); reporting flags each missing field individually; contract-crate compile-against.
-
U5: revision strictly increases under concurrent determinations (same case, same day); the UPSERT-CAS inserts on first event, no-ops on equal + lower revisions; INSERT-path stamping (a per-diem row born after the event carries the verdict WITHOUT any event replay; born before any verdict carries the explicit never-determined triple); out-of-order redelivery leaves rows byte-stable; invalidation-BEFORE-verdict lands the verdict pre-flagged (the set-table leg); sibling-partial invalidation (child A applied, child B in flight) flags both.
-
U5b: an outcome-identical re-determination CONVERGES (issued rows restamp and claim — the livelock pin); a content-differing verdict excludes the child’s issued rows into
claim_exclusions(row + claim-detail rendering asserted) and totals recompute over survivors; an invalidated verdict excludes until a fresh determination with equal content restamps or differing content holds; NULL-stamp rows claim and are counted; per-child independence (sibling A excluded does not touch sibling B’s rows). -
U6: per-child evaluation (two children, different ages → different verdicts in ONE act); snapshot immutability (household change after the act changes nothing until a new determination); child_inputs ⊄ cohort refused; one event per child same-tx; e2e determination → per-child FFP propagation on the seeded family.
-
Every unit: full battery + contextless J-review.
Out of scope (recorded)
-
The four DFCS-blocked preconditions (#1073 items).
-
Building the caregiver linkage (U3 is design + ruling).
-
Any change to
expected_month_row, the generator, or the F8 identity. -
Migrating cases' three raw rules-evaluate call sites onto the extended client (filed follow-up).
-
Post-claim correction of issued rows (the #1073 amendment vehicle).
-
Backpay (its own plan).