ADR-055: ERR (UAS 542) Kinship-Subsidy Flow — One-Shot Enrollment, Month Judgment, Per-Diem Handoff

Status

Accepted (2026-07-24). The #1069 program (epic &70) landed as five MRs, each independently green: M0 acting-worker proofs + action-bound approvals (#1102, MR !1027), M1 generator month judgment + transactional reconcile claim/settle (MR !1028, closes #1098), M2 one-shot ERR creation (MR !1029), M3 sweep leg 3 per-diem handoff (MR !1032), M4 the operator surface + this record. Program plan: ERR subsidy flow. An external stop-ship review (2026-07-22, ~47 findings) reshaped the program; its dispositions are recorded in the plan and below.

Amends (named): ADR-053 (the "enforcement business dates are always business today" rule gains the leg-3 truth-dating exception; the whole-month per-diem exclusivity void arm is STANDING policy, not knob-gated) and ADR-054 (the enforcement-leg set grows from two to three; the execute contract gains the acknowledgement handshake; the completion event is best-effort after the run row finalizes). Matching amendment sections live in both ADRs.

Context

GA 22.8: ERR (Enhanced Relative Rate, UAS 542) pays a relative caregiver from the FIRST day of an eligible kinship placement while the caregiver awaits foster-home approval (a 120-day clock), and ends when the caregiver’s foster per diem begins — the same child must never be double-covered. ADR-052 deliberately shipped no public creation path; ERR is the first eligibility-bearing flow to need one. The binding user principles carry over from ADR-054: one automation path, per-write consent knobs (default off), fully idempotent APIs, no fig leafs, pre-1.0 no backward compat, and CRAIG never decides for a jurisdiction what is acceptable to automate. Unrecorded 22.8 details (rates, proration, the kinship set, clock arithmetic) ship as best readings on the ⁂ #1073 confirmation list — production write policy until DFCS confirms, every one gated behind the F4 consent knob.

Decision

One-shot CREATE-ACTIVE enrollment (M2)

POST /v1/financial/subsidy-agreements births an agreement whose coverage is ACTIVE from placement_started_on — no pending prehistory (F1: the generic two-step create path REFUSES program = err (since #1070 the guard lives in create_guardianship_agreement — the generic create_agreement was deleted), so no path can mint a pending ERR). Ordering in the handler: F4 feature gate (CRAIG_FINANCIALSUBSIDY_ERRENABLED, default OFF, typed 403 naming the knob) → wire validation (parties ≤ 10, roles caregiver/co_caregiver, money scale ≤ 2 normalized to 2 dp BEFORE hashing) → canonical SHA-256 of the payload → authz → jurisdiction → idempotency (F8: client_request_id lookup — hash match replays the existing agreement as 200, mismatch is 409; checked BEFORE every volatile dependency so a replay can never flip to 400/503) → placement S2S verification → the CreateActive proof resolved from the administrative-authority family (authorize_resolved, ADR-074; before the transaction) → one transaction ( → the store create, which re-checks the proof and takes the history lock, then the pay-exclusion child lock, re-runs the per-diem gate against committed state, and inserts → event). An unauthorized caller never reaches the locks or the gate.

  • Authority (F3): ApprovalAction::CreateActive is its own proof kind at the county floor — a transition proof can never mint an agreement, and vice versa (M0’s action-bound proofs).

  • Derivations, never inputs: case_id and assigned_worker_sub come from the placement record; renewal_review_due = effective_from + 12 months; foster_home_approval_due = placement_started_on + policy.clock_days. Evidence keys are honestly named UNVERIFIED references.

  • Backdating floor (F2): coverage below current month − 12 is refused naming the floor — the generator’s reach ends there, and an approved but never-payable agreement is a lie.

  • Placement S2S: craig-placement’s minimal GET /v1/placement/placements/{id}/subsidy-eligibility returns the six fields creation needs; started_on is computed PLACEMENT-side via the Eastern business clock so financial never converts timestamps. Transport failure is a fail-closed 503; service-scoped narrowing is #1107. As-built note (#1888): "six fields" is the M2 shape. The projection has since grown additively (the assignment triple, guardianship, caregiver, episode-exit, residence and home-type facts). Its field list of record is PlacementSubsidyEligibility in crates/craig-placement-contracts/src/subsidy.rs, not a count here.

  • Policy seam (U1): the fail-closed policy lookup (None → 400); Georgia carries calendar-day proration, the 120-day clock, and the kinship-only qualifying set. As-built after the #1072 lift: the constants live in the GeorgiaBundle’s subsidy_policy() (craig-state-bundle SubsidyPolicySpec), boot-resolved by craig_financial::subsidy::bundle and consulted through SubsidyJurisdictionReference::policy_for — same fail-closed contract, now also refusing on a bundle↔jurisdiction mismatch. uas_code is service-derived at the only write boundaries and never accepted on the wire BECAUSE a wire field would enter the F8 client-keyed canonical hash (M2) and break the replay of every persisted hash (#1072). As-built note (#2056, plan afcars-placement-facts U3): the kinship-only qualifying set is retired — ERR qualifies a foster_family_home anchor flagged relative or kin and not licensed (SubsidyPolicySpec.err_qualifying_home_types / err_disqualifying_home_types; ADR-079 § Amendment (2026-09-26, #2026) D5).

The 120-day clock is report-only (U2)

approval_clock_overdue is computed backend-side for ACTIVE ERR only. An overdue clock never auto-terminates: termination is a human act with reason foster_home_approval_lapsed, witness-checked in the store (a recorded clock that has actually run out; an agreement without a clock fails CLOSED). The reason/program matrix scopes per_diem_begins and foster_home_approval_lapsed to ERR at the store for every caller, imports included.

Per-diem handoff — sweep leg 3 (M3)

A mutable billing row is not a "per diem began" fact, so the handoff is recorded in the durable subsidy_perdiem_handoffs ledger: detection inserts once per (agreement, payment) on EVERY scheduled scan (observe posture included — detection is knowledge, not enforcement), the enforcing run stamps enforced_run_id, and a state-office reinstatement out of a per_diem_begins termination stamps corrected_at + the transition note. Rows are never deleted.

  • Scan shape: ERR agreements with an ACTIVE or SUSPENDED open head that began before as_of, joined to the child’s EARLIEST live placement-origin payment with period_start ∈ [head start, as_of] — deterministic (period_start, id) evidence, pinned (payment + head interval) in the candidate, served by the idx_payments_perdiem_by_child partial index (EXPLAIN-pinned: the index order IS the earliest contract).

  • Same-placement witness (F7): only a per diem on the agreement’s OWN anchor placement is a handoff. A different placement (or a missing anchor) is a MOVED-CHILD report — counted, previewed, never auto-terminated (the operator acts via child_no_longer_in_home).

  • Truth-dating (F6): the termination’s business_date = max(perdiem_started_on, head start + 1 day) — the money and status ledgers agree, and the transition primitive enqueues the overlap months for reconciliation naturally. This is the ONE exception to ADR-053’s enforcement-dates-are-today rule, and it is an exception because the date is a recorded FACT, not a policy choice.

  • Precedence: handoff candidates are excluded from legs 1/2 unconditionally — suspending an agreement whose coverage already ended at the truth date would write a wrong interval on top of it. With the knob off, the backlog waits visibly for the operator.

  • Enforcement: per-agreement transaction under the pay-exclusion child lock (every per-diem writer takes it, including the placement.ended void handler — a void serializes to drift-before or correction-after, never mid-flight), with an in-tx re-verify of the pinned evidence (void, backdated earlier row, or re-point → drift skip, never force). Authority is the third enforcement leg (auto_per_diem_handoff, default OFF), bound to exactly the per_diem_begins termination shape — reason-disjoint from leg 2.

  • Known scan limit (recorded): the window is [head start, as_of], so a per diem that began BEFORE a later manual suspension head is invisible to the sweep — the store’s manual per_diem_begins witness shares the same window. The manual path (operator terminates with the evidence in view) remains; widening the window would let a prior placement’s trailing billing masquerade as a handoff.

The execute acknowledgement handshake (M3)

POST …/sweep/{run_id}/execute carries per-leg acknowledged counts that must EQUAL the preview’s pinned set sizes, else 409 sweep-preview-stale WITHOUT burning the preview. A client that predates a leg serializes no field → 0 → refused whenever that leg has pinned candidates: an old UI can never execute work it never rendered. Checked after the token digest (counts never leak to a token-less probe) and before the CAS flip. craig-web sends the counts it rendered as hidden fields on the preview form.

As-built note (#1939, plan background-jobs U7): the handshake now runs INSIDE the execute ENQUEUE’s ADR-062 claim transaction — after the token digest, before the flip, which is previewed → consented (the enforcement is the sweep_execute job’s attempt, consented → executing under the lease). A mismatch aborts the claim: the run stays previewed and the SAME client_request_id may retry with corrected counts (the counts never enter the intent hash). craig-web sends the counts from the execute form the token POST renders exactly once.

Completion-event finalize fix (M3)

The sweep’s completion event is staged best-effort AFTER the run row is finalized: a staging failure is WARN + the subsidy_sweep_completion_stage_failures_total counter, never a rewrite of committed counters to a defaulted failed row. The durable run row is the record; the event mirrors it.

Operator surface (M4)

The craig-web enrollment form mints client_request_id once per RENDER (hidden field) — a double-submit of the same rendered form replays to the same agreement. Refusals follow the U5 contract: 4xx ProblemDetails flash VERBATIM (gate, jurisdiction, placement shape, per-diem conflict, office), 5xx/503 flash the generic message. The agreement list and detail surface the approval clock (badge + panel, active-ERR-only semantics); the sweep pages render the leg-3 and moved-children sets and acknowledge exactly the counts they rendered.

Consequences

  • Enabling ERR is ONE knob, and that knob is the jurisdiction’s recorded consent to the ⁂ #1073 best readings (renewal anchor +12 months, the kinship set, calendar-day proration at 2 dp half-away-from-zero, the 120-day clock, whole-month exclusivity, truth-dated handoff, same-placement-only automation, superseded-month arbitration, reinstatement floors, zero-pay mid-month reinstatement months, age-out = age_limit_reached, unverified evidence references, Eastern placement dating, the −12 creation floor). Nothing is silently defaulted into production money policy.

  • Creation only ENQUEUES birth months — the generator tick (or a manual run) pays them; payment visibility follows the generator cadence (runbook: developer-guide § ERR enrollment).

  • The accepted verify→commit TOCTOU on placement state (financial verifies, placement later ends) has detection (the placement.ended subsidy arm
    the ended-anchor invariant) and correction (state-office reinstatement, fact-ledger stamping) rather than prevention — financial holds no placement authority (deliberate; the alternative is a distributed lock across services).

  • The security parser’s ("create", "subsidy_agreement") arm deploys BEFORE or WITH the emitter (parser-first ordering) — noted in the event catalog.

  • Deferred, tracked: #1107 service-scoped placement authz; #1106 legacy payment-index drop (landed 2026-08-07 — the F9 contract step, with a compat-floor bump recording M1 as the compatibility boundary); #1022 api-docs regeneration.

Review record

Every substantive commit shipped behind a fresh-context J1–J8 review with findings remediated pre-commit; the per-MR J-records live as MR notes (!1027–!1032). The M1 fault-abort test satisfies the plan’s kill-based crash test for the reconcile queue (recorded here per the plan’s close-out note). The external review’s disposition index is preserved verbatim in the archived program plan.

Amendment (#1070, 2026-07-24) — the tagged create wire + the created-event payload

POST /v1/financial/subsidy-agreements is now the program-TAGGED request (ADR-056 U1): the ERR arm’s body — and therefore every persisted F8 canonical hash — is byte-stable (the ERR hash stays tag-free by design; new arms bind the tag into their hashes). The pinned subsidy_agreement_created payload gains the ADDITIVE initial_status key (active for this record’s one-shot arm, pending for the guardianship two-step) and its effective_from is arm-specific (ERR: the coverage start, unchanged in value; guardianship: the signing date). The F1 guard’s home moved with the generic create’s deletion; its property is unchanged and test-pinned.

Amendment (#1114, 2026-08-31) — hard-check fact sources; the age attestation retired

Hard-checks U1 (the per-precondition design record, plan subsidy-eligibility-hard-checks). Since U2 (!1538) the child’s age is MACHINE-CHECKED at ERR create — basis = the placement’s first day (the coverage start the create derives), evaluated through the georgia-subsidy-eligibility ruleset’s age_eligibility decision (ADR-072 tier 1) under actor-relay attribution, with the evaluation-provenance quartet persisted on the agreement. Age is no longer among the unverified facts the consent knob recorded. The fact-source record for the remaining ERR enrollment preconditions:

Fact Source today Posture

Child age at coverage start

cases DOB (S2S) + the jurisdiction eligibility ruleset; provenance persisted

Machine-checked since #1114 U2 (!1538); refusals typed + verbatim in the form.

Education-extension validity (the exactly-18 arm)

The create body’s terms trio; as-of validity (expiry ≥ basis) machine-derived

Honestly split: the terms' presence/expiry are machine-derived; the school-enrollment FACT itself stays county-attested (no state fact source).

Custody-order + kinship-relationship evidence

Object-store keys on the create body

Recorded UNVERIFIED references — unchanged, by design.

Caregiver identity ↔ placement caregiver linkage

None (no provider/party model binds the signer to the placement)

#1114 U3 design-or-reject (placement-owned caregiver party vs reject-until-a-provider-model). SUPERSEDED 2026-09-15 (#1852): machine-checked behind a knob — the amendment of that date below.

Citizenship/residency · child income · funding availability

No DFCS-sanctioned machine source for any subsidy program

DFCS-blocked — named items on the ⁂ #1073 ledger (the #1114-U1 note, 2026-08-31), including whether/how each binds ERR specifically; county-attested under the enrollment authority until confirmed.

The enrollment form text now states which facts are machine-checked vs county-attested (text only — the F8 canonical hash covers the create BODY, so no wire field changed).

Amendment (2026-09-02, #1114 U3) — caregiver-identity linkage rejected until the provider model

Ruling (maintainer, 2026-09-02, option C of the #1114-U3 comparison). The enrollment wire’s caregiver stays an ATTESTED party (person_id + role) — CRAIG does NOT verify that the signer is the placement’s caregiver. The three designs and why two were rejected:

  • A — placement-owned caregiver party: placement records no caregiver person today (free-text primary_contact / relative_name only), so the check would compare one worker-typed UUID against another — co-attestation, not verification — and it would pre-empt the Phase-11 provider registry’s identity design (#634; two homes for the same identity → drift).

  • B — cases-household check: buildable now, but the case household is family-of-origin-centric and a legitimate kinship caregiver (the ERR population) is routinely not a member — a money-blocking check that refuses correct enrollments fails the bar, and an advisory downgrade would be a fig leaf.

  • C — reject until the provider model (RULED): the caregiver↔placement binding becomes a NAMED criterion on #634 (the provider registry must bind caregiver persons to homes/placements such that enrollment can consult it). Until then the U1 attestation form text and fact-source tables (the 2026-08-31 amendment above) already say the relationship is county-attested.

Independent hardening (ruled in; built as #1643, 2026-09-03 — every party person_id is existence-checked through the cases person lookup at the create boundary, after the F8 short-circuit and inside the const-asserted budget partition; the caregiver relationship itself stays county-attested): party `person_id`s are resolved for EXISTENCE through the cases person-lookup path, so a mistyped UUID cannot enroll — an honest claim of existence, never of caregiver-ness.

Amendment (2026-09-02, #1115 U-LE) — late enrollment is ruleset-decided (backpay F0 applied)

Ruled 2026-08-31 (backpay F0, ADR-072), built 2026-09-02. The F2 floor refusal at ERR create ("coverage start predates the generator floor") was a SOURCE posture; the accept-or-refuse decision for a LATE enrollment is jurisdiction policy, so it moved into the rules engine: the <j>-subsidy-eligibility ruleset’s late_enrollment decision (the SAME single per-request evaluation that judges age — one budget slot, one evaluation id) answers late_accept for months_before_floor > 0. Georgia’s arm ACCEPTS (recorded best reading ⁂ #1073; Policy 22.8 states no late-enrollment refusal).

Mechanism. The handler consults pre-transaction; an accepted late start yields a typed LateEnrollmentWitness (constructible only from a real verdict — private fields, no public constructor) carrying the evaluation id, the ruleset revision and the judged month count. The store keeps its floor check as defense-in-depth: a below-floor start is admitted ONLY when the witness’s month count equals the store’s own recomputation at write time (a month boundary crossed between consult and tx makes the witness stale; stale refuses exactly like absent). The witness triple persists on the agreement (late_evaluation_id, late_rule_set_revision, late_months_before_floor; NULL = on-time), all-or-none with a strictly positive month count.

What does NOT change. The reconcile floor itself stays source (ADR-072 tier 3 — background generation never mints pre-floor months in any jurisdiction); TRUE coverage is recorded at the placement start, and the pre-floor months become payable only through the explicit backpay act (#1115 U1+). An absent arm, a refusing arm, or the default-refuse row leaves every existing refusal byte-identical. The same mechanism guards guardianship activation (ADR-056: a derived transfer below the floor).

Consent. CRAIG_FINANCIALSUBSIDY_ERRENABLED (and the SG knob) now also consent to ruleset-decided late acceptance — the knob text and the configuration reference say so. Pre-1.0 behaviour change recorded in the CHANGELOG (Changed).

Amendment (2026-09-15, #1852) — caregiver linkage machine-checked behind a knob

Supersedes the "Caregiver identity ↔ placement caregiver linkage — source: None" row of the 2026-08-31 fact-source table and option C’s "until the provider model" above. The #634 named criterion is met by the caregiver LEDGER (#1848, ADR-076 D8) rather than a provider registry: craig-placement binds caregiver persons to a caregiving UNIT — the foster home for a homed placement, the placement itself for a home-less kinship placement — as dated effective_from / ended_on intervals, and the subsidy-eligibility read ERR create already makes carries the unit’s caregivers CURRENT on ?as_of= (#1851). Plan portals U9.

As-built note (#2058, plan afcars-placement-facts U5): the home-less unit is no longer the placement (ADR-076 § Amendment (2026-09-26, #2026)). A caregiver binding keys a foster home XOR a kinship household — a case-less, immutable craig-placement row each home-less family arrangement names (placements.kinship_household_id) — so the unit whose caregivers the eligibility read carries is the anchor’s foster home or its kinship household. The check below is unchanged: every party must be a current caregiver of the anchor’s unit on the enrollment date.

What is checked. At the one-shot ERR create-active, every body party (parties[i], wire order) must be a current caregiver of the anchoring placement’s unit on the ENROLLMENT date — the act’s business date on the jurisdiction clock, which the handler sends explicitly as ?as_of= on the ONE eligibility read (no new call, no new budget leg; the age_check partition stands). Matching is by person_id ONLY — the ledger’s role vocabulary (primary / co) and the party vocabulary (caregiver / co_caregiver) are different axes. The consumer re-applies the ledger’s CURRENT predicate (effective_from ⇐ as_of < ended_on) rather than trusting the producer’s filter; a binding that ends ON the enrollment date does not cover it. The check runs AFTER the F8 replay short-circuit and BEFORE the transaction: the canonical hash is body-only and untouched, so a corrected body under the same client_request_id still enrolls, and a replay after success answers from the stored response with zero S2S calls. The #1643 existence check stays in front of it.

The knob. CRAIG_FINANCIALSUBSIDY_CAREGIVER_CHECKENABLED, default OFF — and OFF is REPORT-ONLY, not inert: a miss logs caregiver_check_would_refuse (boundary, party index, person, placement, date) and counts subsidy_caregiver_check_total{boundary="err_create",outcome="would_refuse"} while the write proceeds unchanged. ON: the miss is the typed 400 subsidy-party-not-caregiver (field = parties; the detail names parties[i], the person id and the date), ZERO rows written. A read whose caregivers is absent (a craig-placement that predates #1851) is facts_unavailable: counted and passed OFF, the fail-closed 503 portal-bindings-unavailable ON — the deploy order rolls placement first. Some([]) (no caregiver on the date) refuses every party. Rollout order and the cargo xtask caregiver-coverage data-gap report: deployment guide § "Caregiver ledger + portal enrollment rollout"; the knob text: the configuration reference.

What does NOT change. The guardianship_finalized termination witness and every existing-agreement lifecycle path never consult the knob; CRAIG_FINANCIALSUBSIDY_ERRENABLED stays the enrollment-consent gate. The SG / NRSG twin — activation, transfer-dated — is ADR-056’s amendment of the same date.

Edit this page · latest