SNAP intake completion — the #788 family (v8)
- Status
- The approved v8 plan
- U-FRAME — Family frame: scaffolding, conventions, sequencing, closure (#788) — weight 2
- Purpose + regulatory cites
- Data model
- Contracts — family auth contract per endpoint class (binding on every unit; finding 2)
- Endpoints + drains — drain production-safeguard checklist (finding 42)
- Events + cutover order (findings 7, 41)
- Notices (family conventions; ownership of mechanics)
- Params + citations
- BFF-UI slice (family conventions; finding 40 — binding per unit)
- Tests
- Deployment + index notes
- Docs obligations + epic/child-issue shapes (finding 44)
- SME-flag resolutions inventory (finding 46 — ALL resolved in-plan; none outstanding)
- Out of scope
- FINDINGS RESOLVED
- U-FOUND — Deadline model + legal filing date (weight 5)
- U-INT — Interview lifecycle: truthful appointments, On-Demand deadline-mode, transition guards
- Purpose + regulatory cites
- Data model (canopy-applications DB) —
application_interviews - Contracts
- Endpoints + drains (auth per finding 2)
- Events + cutover order (finding 7)
- Notices
- Params + citations (4 rulesets, ADR-011)
- BFF-UI slice (finding 40)
- Tests
- Deployment + index notes
- Out of scope
- FINDINGS RESOLVED
- U-NOMI — Notice of Missed Interview: fenced drain, dispatch-gated evidence, scheduler trigger, cure journey
- U-VER — Verification context package, written-request due dates, read/cancel surfaces
- Purpose + regulatory cites
- Data model (additive migration on
verifications; legacy rows NEVER backfilled — fabrication) - Contracts (canopy-contracts-verification)
- Endpoints + drains (auth per annex finding 2)
- Events + cutover order (finding 7)
- Notices
- Params + citations (4 rulesets each, ADR-011)
- BFF-UI slice (finding 40)
- Tests
- Deployment + index notes
- Out of scope
- FINDINGS RESOLVED
- U-PROV — Effective-date provenance (signed, claimed, two-step cutover)
- Purpose + regulatory cites
- Data model (all migrations additive-nullable; NULL = pre-provenance historical row — never backfilled, backfill fabricates facts)
- Contracts
- Endpoints + drains
- Derivation + claim flow (finding 6 chain: context → signature → event → CAS record-back)
- Derivation truth table (the spec — every dispatch path lands in exactly one arm)
- Events + cutover order (finding 7 — a required field changes: two-step, #1487→#1014 precedent)
- Notices
- Params + citations
- BFF-UI slice (finding 40)
- Tests
- Deployment + index notes
- Out of scope
- FINDINGS RESOLVED
- U-DENY — Administrative denial first-class (resolves annex findings 9, 10, 11, 12, 13)
- U-D30 — Day-30 procedural disposition drain + (h)(3) pend + reopen-rights pins (weight 10: U-D30-A classifier+drain IN SHADOW MODE w5 — ships the mode flag, shadow findings rows, report page; U-D30-B pend writes+letters+ENFORCE flip w5)
- Purpose + regulatory cites
- Data model
- The classifier — the DISJOINT truth table IS the spec (finding 17)
- Endpoints + drains
- Expedited-downgrade arm (U-D30-B; fires at the EXPEDITED deadline, not day 30)
- (h)(3) pend arm
- Notices
- Params + citations
- BFF/UI slice
- Shadow rollout (finding 43)
- Tests
- Deployment/index notes
- Out of scope
- FINDINGS RESOLVED
- U-REOPEN — 60-day reopen of a procedural SNAP denial
- U-CONT — General enrolled-household continuation primitive (split: a=5, b=3, c=3; total 11)
- 1. Purpose + regulatory cites
- 2. Data model
- 3. Contracts
- 4. Endpoints + drains (auth per finding 2)
- 5. Events + cutover order (finding 7)
- 6. Notices — one legal notice per effect (D6)
- 7. Params + citations
- 8. BFF-UI slice (finding 40)
- 9. Tests
- 10. Deployment + index notes
- 11. Out of scope
- FINDINGS RESOLVED
- U-EXP — Expedited postponed verification (weight 13: A5 B5 C3, strict activation order)
- U-REP — Program-scoped rep authority + SNAP rep disqualification (273.2(n)(4))
- 46-finding disposition (finding → resolving unit/section)
Status
| Unit | Issue | Status |
|---|---|---|
U-FRAME (w2) |
#1636 — #788 family frame: plan page, epic, re-fence, conventions |
Done (2026-08-31) — !1277, merge 1a28f158 |
U-FOUND (w5) |
#1637 — distinct immutable clocks + legal filing date |
Done (2026-08-31) — !1278, merge 5fc416cf |
U-INT-A (w5) |
#1638 — interview lifecycle, guards G1–G5, scheduled-mode notice |
Done (2026-08-31) — !1281, merge ab163ac3 |
U-INT-B (w3) |
#1639 — On-Demand interview notice + SMS text channel |
Done (2026-08-31) — !1283, merge 3ea34df5 |
U-INT-C (w3) |
#1640 — expedited-window completion fact + On-Demand flow-spec authoring |
Done (2026-08-31) — !1284, merge 15227649 |
U-NOMI-a (w5) |
#1641 — missed-interview drain, NOMI letter, scheduler trigger |
Done (2026-08-31) — !1282, merge d84532a1 |
U-NOMI-b (w3) |
#1642 — NOMI dispatch-gated evidence, BFF slice, cure journey |
Done (2026-08-31) — !1286, merge 80365ce9 |
U-VER-a (w5) |
#1643 — context columns, written-request due dates, checklist letter |
Done (2026-08-31) — !1280, merge cb43af5b |
U-VER-b (w2) |
#1644 — producer flips to batch requests + old-POST withdrawal |
Done (2026-08-31) — !1287, merge d5a48f27 |
U-VER-c (w3) |
#1645 — batch-context read, list widening, cancel surfaces, BFF |
Done (2026-08-31) — !1285, merge 60246ae8 |
U-PROV-A (w3) |
#1646 — EffectiveDateBasis + signed envelope fields (dormant) |
Done (2026-08-31) — !1279, merge 99bd6f6f |
U-PROV-B (w5) |
#1647 — determination-context read, claim/CAS record-back, tolerant consumers |
Done (2026-08-31) — !1288, merge d327c878 |
U-PROV-C (w2) |
#1648 — provenance tolerance withdrawal + replay rules |
Done (2026-09-01) — !1293, merge f7644990 |
U-DENY-a (w5) |
#1649 — administrative_denials table, op, event two-step, denial letter |
Done (2026-09-01) — !1289, merge 5fc99089 |
U-DENY-b (w2) |
#1650 — per-program SNAP deny retarget + BFF slice |
Done (2026-09-01) — !1290, merge 7428932a |
U-DENY-c (w2) |
#1651 — record_determination pure record-back (#1630 source shim removed) |
Done (2026-09-01) — !1291, merge 09deb5f7 |
U-DENY-d (w5) |
#1652 — three-arm contested union on filing + hearing view |
Done (2026-09-01) — !1292, merge 6a0cb81f |
U-D30-A (w5) |
#1653 — day-30 disposition classifier + drain in SHADOW mode |
Done (2026-09-01) — !1294, merge 301c93ae |
U-D30-B (w5) |
#1654 — (h)(3) pend writes, letters, expedited downgrade, ENFORCE flip |
Done (2026-09-02) — !1299 (enforce, merge f09d3c68) + !1300 (derivation arm, merge 8e535741) |
U-REOPEN-a (w3) |
#1655 — reopen episode substrate, recompute branch, queue predicates |
Done (2026-09-02) — !1301, merge 8147d439 |
U-REOPEN-b (w5) |
#1656 — reopen endpoint, saga, SNAP-scoped void |
Done (2026-09-02) — !1302, merge 90eee739; row 7 + the |
U-REOPEN-c (w2) |
#1657 — reopen BFF/UI slice |
Done (2026-09-02) — !1304, merge 35b1e14c; the reopen panel, its three actions, the saga resume |
U-CONT-b (w3) |
#1658 — continuation consumers: cert adjustments, letters, web (deploy FIRST) |
Done (2026-09-03) — !1308, merge cc38b102 |
U-CONT-a (w5) |
#1659 — continuation primitive: classify, CAS apply, adverse staging |
Done (2026-09-03) — !1311, merge 37044439 |
U-CONT-c (w3) |
#1660 — in-cert conversion derivation (first continuation consumer) |
Done (2026-09-04) — !1312, merge 69a8ed73 |
U-EXP-A (w5) |
#1661 — dormant expedited consumers: NOE, expiry sweep, combined allotment, proration |
Done (2026-09-02) — !1305, merge 33d14fe6; dormant consumers + the catalogue action flipped; event-path proration live |
U-EXP-B (w5) |
#1662 — postponement state machine, gates, approval letter, producer activation |
Done (2026-09-03) — !1307, merge 3ccdb131; postponement episodes + saga, expedited producer, exactly-one approval letter, process-page panel; rows 8/9/10 flipped |
U-EXP-C (w3) |
#1663 — post-lapse arc + lapse journey |
Done (2026-09-04) — !1314, merge f569dc35 |
U-REP-a (w5) |
#1664 — program-scoped rep authority + the ONE enforcement check |
Done (2026-09-01) — !1295 + !1296, merge cab37859 |
U-REP-b (w3) |
#1665 — recipient_kind consumer substrate + appeals third arm |
Done (2026-09-01) — !1297, merge 4867eac4 |
U-REP-c (w5) |
#1666 — rep disqualification lifecycle, fanout letters, BFF, row flip |
Done (2026-09-01) — !1298, merge 3101eba3 |
Epic: &81
Issues: #788 (family closure) · children #1636–#1666 · F1 #1634 · F2 #1635
Branches: feature/788-{unit}, one MR per sub-unit unless the unit section states a multi-MR shape
Follow-ups fenced out of family scope: F1 #1634 (rows 13–15 re-fence there), F2 #1635 (finding-31 narrowing). Status rows above are per child issue; a multi-MR sub-unit stays In progress until its final MR.
The approved v8 plan
The remainder of this page is the approved v8 plan text (the binding spec — living document: update Design/Scope here when implementation deviates). Child-issue descriptions embed their unit section; this page is the single canonical home.
Six unbound intake actions, FIFTEEN fenced scenario rows (13 engine + 2 Georgia conformance). 7 CFR 273.2 (e)/(h)/(i)(4)/(n)(4); PAMMS 3105/3110/3120 (+3710 for the re-fenced renewal row). This v8 is a ground-up redesign under the maintainer’s 46-finding rejection review — every finding is resolved in a named unit (disposition table at the end) — and the cumulative rulings: architecturally correct only — no shortcuts, no fig leaves, no pre-1.0 compat shims, jurisdiction-portable, policy codified in rules where applicable; (h)(3) bundled with day-30; the GENERAL enrolled-household continuation primitive built here (#1133 narrows to adopting it); PROGRAM-SCOPED rep authority.
Family roster (canonical weights; sub-units are the child issues)
| Unit | Delivers | Sub-units (wt) | Depends on | MR shape |
|---|---|---|---|---|
U-FRAME |
plan page, epic + children, 15-row disposition edits, family conventions |
2 |
— |
first MR |
U-FOUND |
distinct immutable clocks + legal filing date + provenance |
5 |
— |
single |
U-INT |
interview lifecycle: truthful appointments, On-Demand deadline-mode, guards |
A5 B3 C3 |
U-FOUND |
single per sub-unit |
U-NOMI |
miss-detection drain, dispatch-gated NOMI evidence, scheduler trigger, cure journey |
a5 b3 |
U-INT |
single each |
U-VER |
verification context: program/purpose/episode columns, written-request due dates, checklist letter, batch read, cancel |
a5 b2 c3 |
— (b after a) |
multi-MR producer/consumer |
U-PROV |
signed effective-date provenance: basis + benefit_effective_date + claimed operation id, two-step cutover |
A3 B5 C2 |
U-FOUND |
tolerant→require dormant-activation |
U-DENY |
administrative denial first-class + appeals contested union (3 arms) + per-program web action |
a+b+c+d = 14 |
U-PROV-A, U-VER-a |
a→b→c, d parallel |
U-D30 |
day-30 disposition drain (disjoint classifier, default agency), (h)(3) pend, reopen-rights notice, shadow rollout |
A5 B5 |
U-FOUND U-NOMI U-VER U-DENY |
shadow MR → enforce MR |
U-REOPEN |
60-day reopen: episode state, saga, evidence-derived cure, SNAP-scoped void |
a3 b5 c2 |
U-D30, U-VER-c |
saga; cancel endpoint first |
U-CONT |
GENERAL enrolled-household continuation primitive (reductions via the adverse-action pipeline) |
a5 b3 c3 |
U-PROV, U-EXP-A, U-EXP-B |
consumer-first |
U-EXP |
expedited postponed verification: consumers/money first (A), state machine + producer (B), post-lapse © |
A5 B5 C3 |
U-PROV, U-INT; C after U-CONT |
A dormant → B activates → C |
U-REP |
program-scoped rep authority, disqualification lifecycle, fanout letters |
a5 b3 c5 |
U-DENY (third arm), U-NOMI (trigger mech) |
scope migration first |
Family total ≈ 117 (the honest post-review scale). Follow-ups: F1 recert interview + prorated reinstatement + renewal On-Demand (273.14(b)(3)/(d), 3710) — rows 13-15 re-fence on it; F2 narrowed to event paths no flipped row depends on; v6’s finding 3 is DISSOLVED (finding 40: BFF/UI is in-scope per unit); #1133 narrows to adopting U-CONT.
Family cutover order (consumer-first; numbered)
1. U-FRAME → 2. U-FOUND → 3. U-INT-A ∥ U-VER-a ∥ U-PROV-A → 4. U-NOMI-a ∥ U-INT-B/C ∥ U-VER-c → 5. U-PROV-B (producer) + U-VER-b + U-NOMI-b (dispatch-stamp consumer) → 6. U-DENY a→b→c (d ∥) → 7. U-PROV-C (tolerance withdrawal, after drain window) → 8. U-D30-A (shadow) → observation → U-D30-B (enforce) → 9. U-REOPEN a→b→c → 10. U-EXP-A (dormant consumers) → 11. U-EXP-B (producer activation) → 12. U-CONT → 13. U-EXP-C → U-REP (parallel from step 6; its b before c). Final landing MR closes #788.
U-FRAME — Family frame: scaffolding, conventions, sequencing, closure (#788) — weight 2
Purpose + regulatory cites
-
Frame unit for the SNAP-intake completion family: 7 CFR 273.2 (e)/(h)/(i)(4)/(n)(4); PAMMS SNAP 3105/3110/3120 (+3710 for the re-fenced renewal On-Demand row). Ships the plan page, epic + child issues, the 15-row disposition (re-fence edits), and the binding family conventions (auth, drains, events, notices, params, BFF/a11y, docs). No runtime code.
-
The 15-row disposition table (13 engine rows in
compliance/scenario-inventory/snap.toml+ 2 Georgia rows inrulesets/georgia/scenarios/snap.toml; every row currentlyblocked_by = ["#788"]):
| # | Row id | Tier | Disposition | Unit | Binding at flip |
|---|---|---|---|---|---|
1 |
snap.intake.missed-interview-nomi-cure |
journey |
FLIP |
U-NOMI-b |
|
2 |
georgia.snap.intake.on-demand-interview |
flow |
FLIP |
U-D30-B (spec authored in U-INT-C; the downgrade arm completes it) |
|
3 |
snap.intake.missed-interview-day-30-denial |
flow |
FLIP |
U-D30 (flip at B’s enforce) |
|
4 |
snap.intake.verification-pending-day-30-denial |
flow |
FLIP |
U-D30 (flip at B’s enforce) |
same spec, household-fault-verification arm |
5 |
snap.intake.day-30-agency-fault-pending |
flow |
FLIP |
U-D30 (flip at B’s enforce) |
same spec, (h)(3) pend arm |
6 |
snap.certification.denial-notice-reopen-rights |
flow |
FLIP |
U-D30 (flip at B’s enforce) |
same spec, render-pinned reopen-rights arm (exact 60-day date both denial arms) |
7 |
snap.intake.reopen-within-60-days |
flow |
FLIP |
U-REOPEN |
|
8 |
snap.intake.expedited-postponed-verification-certification |
flow |
FLIP |
U-EXP-B |
|
9 |
snap.intake.expedited-identity-failure-reversion |
flow |
FLIP |
U-EXP-B |
same spec, reversion arm |
10 |
snap.intake.expedited-repeat-certification-gate |
unit |
FLIP |
U-EXP-B |
gate-fn unit binding (truth-table tests + proptest) |
11 |
snap.intake.expedited-postponed-verification-lapse |
journey |
FLIP |
U-EXP-C |
|
12 |
snap.intake.authorized-rep-disqualification |
flow |
FLIP |
U-REP |
|
13 |
snap.certification.recert-missed-interview-nomi |
flow |
RE-FENCE → F1 |
U-FRAME edit |
|
14 |
snap.certification.recert-household-delay-prorated-reinstatement |
flow |
RE-FENCE → F1 |
U-FRAME edit |
same swing (273.14(d) prorated reinstatement) |
15 |
georgia.snap.certification.on-demand-renewal-interview |
flow |
RE-FENCE → F1 |
U-FRAME edit |
same swing (renewal context; PAMMS 3710) |
-
#788 closure condition (gates run on the family’s final MR): (a) zero rows in either scenario file carry
blocked_by ["#788"]— 12 flipped with the tier-correct bindings above, journeys walkthrough-paired at flip (neverwalkthrough_blocked_by), 3 re-fenced on F1’s filed issue number; (b)cargo xtask policy action-coverage— all 6 family allowlist entries gone, 6 actions bound (interview-schedule, notice-of-missed-interview, deny-failure-to-complete, reopen-within-60-days, expedited-postponed-verification, authorized-rep-disqualify) — flip owners: interview-schedule (U-INT-A), notice-of-missed-interview (U-NOMI), deny-failure-to-complete (U-DENY), reopen-within-60-days (U-REOPEN), expedited-postponed-verification (U-EXP-B), authorized-rep-disqualify (U-REP) — PLUS the 7th co-bound action snap.issuance.combined-initial-allotment (its allowlist entry cites its own issue; flipped by U-EXP-A); (c)cargo xtask scenarios auditclean at +12 covered vs the pre-family baseline; (d)check-docsclean; PAMMS pin registry gains exactly the 3110 + 3120 page pins; (e) #788 closed with the standard closing comment (implementation SHA + bare merge SHA + files + criteria + deferred items). Earlier MRsRelates to #788, close only their child issues.
Data model
No schema. U-FRAME’s writes are TOML/AsciiDoc only:
| Artifact | Edit | Constraint |
|---|---|---|
compliance/scenario-inventory/snap.toml |
rows 13–14: |
id/tier/title untouched; audit stays green |
rulesets/georgia/scenarios/snap.toml |
row 15: same swing |
F1 issue filed BEFORE the MR merges |
docs/modules/ROOT/pages/plans/snap-intake-completion.adoc |
new plan page |
plan-lint canonical Status vocabulary; per-unit Status table |
docs/modules/ROOT/nav.adoc |
new nav entry |
see Docs obligations |
Contracts — family auth contract per endpoint class (binding on every unit; finding 2)
| Endpoint class | Guard | Actor | Precedent |
|---|---|---|---|
Worker write (schedule/reschedule, postpone/complete, reopen, administrative-denial, disqualify) |
|
claim-derived ( |
documents_scan.rs:31 |
Supervisor override (U-EXP-B revert, U-REOPEN reopen-attestations, U-REP disqualify) |
origin-enforced role arrays |
claim-derived |
SCAN_OVERRIDE_ROLES |
Service-to-service reads (determination-context, verification batch projection, list-authorized-reps) |
|
service identity |
finding 15 |
Drains |
in-process store fns under the fenced leg; no HTTP auth surface |
system |
run_daily_fenced |
Web/BFF |
WritePermission + CSRF + ProgramScope(snap) |
session |
ADR-044 |
Each unit’s Endpoints table MUST name its class per endpoint; the three supervisor-class ops above are frame-assigned and not downgradeable.
Endpoints + drains — drain production-safeguard checklist (finding 42)
U-FRAME ships no endpoints/drains. Every family drain leg (U-NOMI-a interview-nomi; U-D30 day-30-disposition + re-pend; U-EXP-B day-7 reversion; U-EXP-A enrollment expiry sweep (the at-cert NOE staging is tx-work, not a drain leg); U-REOPEN’s reopen-saga fenced driver; U-REP disqualification-effect + expiry) copies these EIGHT acceptance criteria verbatim into its issue:
-
Index: partial/keyset index shipped in the same migration for every new drain predicate; MR attaches EXPLAIN for the drain query.
-
Fence:
run_daily_fencedleg + send-once/stamp fence; double-run is a proven no-op (test). -
Continuation: keyset paging; a test forces a small page size and crosses ≥1 page boundary.
-
Budgets: per-tick row + time budgets; budget exhaustion resumes next tick without loss (test).
-
Concurrent triggers: advisory-lock aware; manual trigger during a run → 202-skipped (the #1109 scheduler-trigger precedent, mechanism owned by U-NOMI-a).
-
Retry/terminal failure: per-row failure isolates (WARN + skip, no batch abort); terminal failures durable; retry idempotent under the fence.
-
Query-plan regression: acceptance criterion names the index and asserts no seq-scan at representative volume.
-
Legal-clock tests: legal-tz day-rollover pins; 3105:334-336 (denials move FORWARD to next business day, approvals BACK to prior workday); clocks derive from
legal_filed_date(finding 8, WorkdayCalendar) where applicable.
Events + cutover order (findings 7, 41)
Roster + dependency graph: SUPERSEDED by the header roster (which reconciles all twelve units incl. U-FOUND/U-VER/U-NOMI); retained rows below are historical frame estimates ONLY where they add MR-shape notes not in the header — where they disagree, the header binds:
| Unit | Delivers (v6 lineage) | Wt | Depends on | MR shape |
|---|---|---|---|---|
U-FRAME |
this unit |
2 |
— |
single MR, first |
U-INT |
interview lifecycle + On-Demand mode (NOMI + trigger = U-NOMI) |
5 |
— |
single MR; restart order notices→applications |
U-PROV |
signed effective-date provenance: basis + benefit_effective_date + episode/generation ids (U-PROV; findings 4-6) |
5 |
— |
two MRs — finding 7 two-step: MR1 additive-tolerant (schema_gate parks; consumers tolerate; producer emits), MR2 tolerance withdrawal + dry-run snapshot version bump + #433 replay-fails-loud, after a stated drain window (#1487→#1014 precedent) |
U-DENY |
administrative denial + appeals filing/hearing-view contested union (U-DENY; findings 9-13) |
5 |
U-PROV MR1 |
single MR (API-only contested union; CB/overpayment events untouched per finding 13) |
U-D30 |
day-30 classifier + (h)(3) pend + reopen-rights notice (verification prerequisites = U-VER; clocks/filing = U-FOUND) |
8 |
U-INT, U-DENY |
multi-MR shadow rollout (finding 43): MR1 read-only shadow classifier + metrics + samples; MR2 enforcement behind flag/kill switch + canary + rollback runbook |
U-REOPEN |
60-day reopen + episode-aware recompute + verification cancel + later-app void (U-REOPEN; findings 21-23) |
5 |
U-D30 |
single MR with cross-service saga (finding 22, claim_or_resume shape); deploy order: verification cancel endpoint live before the applications saga |
U-EXP-A |
DOWNSTREAM consumers + money correctness, DORMANT: renewals cert arm + at-cert NOE + enrollment expiry sweep + combined allotment + proration (findings 24, 29, 31, 32) |
5 |
U-PROV |
dormant until U-EXP-B activates the producer |
U-EXP-B |
postponement state machine + gates + approval letter + producer activation (findings 26-28) |
5 |
U-EXP-A, U-INT |
postpone saga; notices basis discriminator before producer |
U-EXP-C |
post-lapse arc + row flips + lapse journey (finding 30) |
3 |
U-EXP-B, U-CONT |
single MR |
U-CONT |
general enrolled-household continuation primitive (continuation ruling): in-place adjust under lifecycle_revision fence; reductions via the existing adverse-action pipeline; first caller = expedited in-cert conversion; #1133 narrows to adoption |
5 |
U-PROV, U-EXP-A |
consumer-first within the cutover; new basis variants are additive kinds (no park — the b→a→c order is the guard) |
U-REP |
program-scoped rep authority + disqualification + fanout letters (findings 33-36) |
13 (a5 b3 c5) |
U-DENY (third arm), U-NOMI-a (scheduler trigger) |
deploy order: notices recipient_kind consumer → designation scope migration → endpoints |
Family cutover order: the HEADER’s numbered 13-step cutover binds (this section carries only the rules below). Any conflict between an older roster copy and the header resolves to the header. Rules: (i) U-PROV and U-DENY §5 are the two required-field changes on existing events — the tolerant→require two-step applies to both (and anywhere else a required field changes); (ii) new event types ship topology-allow + consumer routes with-or-before producers; (iii) rollback/historical-replay rule: schema_gate parks newer versions centrally; pre-basis #433 replays fail loud (#1613); every require-MR carries a drain-before-deploy note; (iv) params owned before consumed (see Params).
Notices (family conventions; ownership of mechanics)
-
Routes in BOTH manifests (#1101); templates in both rulesets; ADR-004 payloads (IDs/dates/vocabulary tokens, never free text).
-
Work-item uniqueness
(source_event_id, notice_type); fanout = one event PER recipient designation with per-recipient event ids (finding 36 — mechanics owned by U-REP). -
Routing discriminators stay flat strings; the fourth discriminator (
effective_date_basis.kind) is owned by U-EXP-B (finding 28); exactly-one-letter guarantees pinned by render tests. -
Enqueue ≠ dispatched: any legal effect keyed on a notice (NOMI denial, NOE, disqualification
noticed_on) consumesnotice.dispatchedcorrelation (finding 19 — dispatch-correlation mechanisms owned by U-NOMI-b, U-EXP-A, U-REP respectively; U-D30 consumes the NOMI predicate). -
Interview notices render truthful content (finding 37 — owned by U-INT): real agreed time, mode-specific instructions, DISTINCT On-Demand notice + text (3105:205, :216).
Params + citations
U-FRAME owns none. Family ownership rule: the owning unit ships each key in ALL FOUR rulesets + ADR-011 citations in the same MR, before (or with) its first consumer. Georgia cites pin PAMMS pages in rulesets/georgia/citations.toml; default/test fixtures cite the CFR. Ledger: snap.intake.verification_response_days (273.2(f); 3105) owned U-VER-a (U-D30 consumes); snap.intake.denial_reopen_window_days (273.2(h)(2); 3105) owned U-DENY (its denial letter is the first renderer; U-D30 + U-REOPEN consume); snap.intake.interview_nomi_headroom_days owned U-INT (G4; U-NOMI consumes); snap.expedited.postponed_* triple (273.2(i)(4); 3110) owned U-EXP-A; snap.authorized_representatives.disqualification_* pair (273.2(n)(4); 3120) owned U-REP. First 3110/3120 citations pin those pages; each pinning MR verifies only its pin moves.
BFF-UI slice (family conventions; finding 40 — binding per unit)
-
Every worker-facing op ships its BFF slice in the SAME unit (or the activation MR of a multi-MR shape): exchanged-token route on canopy-web, WritePermission + CSRF + ProgramScope(snap), per-program action with server-side evidence resolution (no cross-program loops, finding 12).
-
Validation + recovery UI: 409/422 map to actionable recovery affordances, never dead ends.
-
A11y line (every slice): full keyboard operability; focus managed on modal open/close and moved to the result on submit; every input has a programmatically-associated label and error text (
aria-describedby); async status changes announced via live region; notice previews accessible wherever a unit ships a letter. -
Test-lib endpoints never satisfy a BFF obligation — they are not production functionality.
Tests
U-FRAME’s own criteria (7 — no split needed): (1) plan page plan-lint clean, canonical Status vocabulary, per-unit Status table; (2) nav entry present per Docs obligations; (3) epic body shape correct (Summary / clickable markdown plan link / task list - [ ] #N title (weight: W)); (4) all child issues exist with weights + epic_id API links + self-contained descriptions embedding their plan section and (for drain units) the 8-point checklist verbatim; (5) the 3 re-fence swings land and cargo xtask scenarios audit stays green; (6) F1 issue is self-contained (carries rows 13-15 + prorated-reinstatement scope, 273.14(b)(3)/(d), 3710) and F2 filed narrowed (below); (7) check-docs clean.
Family test conventions (binding): proptest mandatory for reopen-window math, cert-month/month-end math, disqualification date math, business-day/legal-clock derivation (finding 8), classifier totality (every state exactly one arm — necessary but NOT sufficient: the truth TABLE is the spec, finding 17), and basis serde roundtrip; race + idempotency pins per unit — drain double-run no-op, event replay/out-of-order (finding 29), CAS/generation claim (finding 6 shape), concurrent-trigger 202.
Deployment + index notes
No runtime deploy. U-FRAME’s MR is the family’s first; F1’s issue number must exist before merge (file F1, then edit blocked_by). Index/query-plan obligations are delegated via checklist items 1 + 7. Devstack rollout notes per unit follow the cutover order above.
Docs obligations + epic/child-issue shapes (finding 44)
-
Per-service Antora pages updated in each implementing MR —
docs/modules/ROOT/pages/api/canopy-{applications,verification,appeals,notices,renewals,enrollment,web}.adocfor endpoints anddata-models/canopy-*.adocfor tables/columns — not just OpenAPI regen + a services.adoc pointer;services.adocstays a thin index. -
Actual nav group (verified in nav.adoc): the top-level
* Plansgroup with per-stream sub-groups — add** SNAP Intake Completion (#788, epic &81)containing*** xref:plans/snap-intake-completion.adoc[SNAP intake completion — the #788 family (#788, epic &81)]; on family completion the page moves toplans/archive/and the xref updates (the observed archive convention, e.g. nav.adoc:175). -
Explicit pin paths: PAMMS citation pins live in the COMMITTED
rulesets/georgia/citations.toml; the fetched PAMMS pages + any generated manifest live underrulesets/georgia/.policy-cache/**, which is GITIGNORED (.gitignore:51) — no deliverable references the generated policy-cache manifest. (.claude/sync-manifest.tomlis the docs-sync manifest, unrelated to PAMMS pins.) -
Epic in the epics group; children = one issue per LETTERED SUB-UNIT (U-INT-A/B/C, U-NOMI-a/b, U-VER-a/b/c, U-PROV-A/B/C, U-DENY-a/b/c/d, U-D30-A/B, U-REOPEN-a/b/c, U-CONT-a/b/c, U-EXP-A/B/C, U-REP-a/b/c) plus U-FRAME, U-FOUND, F1, F2; a multi-MR sub-unit closes its issue on its final MR, earlier MRs
Relates to.
SME-flag resolutions inventory (finding 46 — ALL resolved in-plan; none outstanding)
| Flag | Resolution | Owner |
|---|---|---|
Pre-date-reschedule NOMI |
DECIDED by PAMMS 3105:240/:705-707 (finding 39): reschedule before the date still sends the NOMI for the initially scheduled appointment (drain arm M2 — single sender); NOMI timing guarantees reschedule-before-day-30 |
U-NOMI (guard param owned by U-INT) |
Mixed-fault precedence at day 30 |
DECIDED per finding 17: disjoint truth table with stated precedence order; default AGENCY fault unless timely household noncompliance affirmatively proved |
U-D30 |
Rep hearing rights |
DECIDED per 3120:81-82 (finding 13): the AU holds the hearing right via the third contested arm; the rep personally may not appeal; both encoded in letter prose |
U-REP |
Drug/alcohol centers + group homes |
MODELED explicitly per finding 35 (never N/A-by-construction): org-backed representation stated; centers and group homes cannot be disqualified as reps |
U-REP |
Out of scope
F1 (recert interview + prorated reinstatement — rows 13-15 re-fence there); F2 narrowed by finding 31 to event paths NO flipped row depends on (proration/combined-allotment/missed-month issuance for flipped rows live in U-EXP-A and U-D30); v6’s finding 3 is DISSOLVED — finding 40 puts BFF/UI in scope per unit; #1133 (narrows to adopting U-CONT’s primitive); all family runtime behavior (owned by the other units).
FINDINGS RESOLVED
-
1: Disposition table names all 15 rows by exact id (13 engine + 2 Georgia); the closure condition disposes all 15 — 12 flips with tier-correct bindings + units, 3 renewal-context re-fences to F1; the Georgia intake On-Demand row: spec authored in U-INT-C, the row FLIPS at U-D30-B (the downgrade arm completes it).
-
2: Family auth contract fixed per endpoint class:
require_service_or_exchanged+ claim-derived actor for worker writes (body actor display-only), origin-enforced role arrays for the three frame-assigned supervisor ops,require_service_calleronly service-to-service, WritePermission+CSRF+ProgramScope web-side — binding on every unit’s Endpoints table. -
40: BFF-UI slice conventions make exchanged-token routes, validation/recovery UI, scope/CSRF, the four-point a11y line, and notice previews per-unit obligations; test-lib explicitly excluded.
-
41: Roster table states dependency graph, params-owned-before-consumed ledger, U-EXP-B consumer/topology-first activation, U-REP’s explicit dependency on U-NOMI-a’s scheduler trigger, consumer-first numbered cutover, and the multi-MR shape for every unit with saga/dormant-activation/two-step/shadow needs (U-PROV, U-D30, U-EXP-B; sagas in U-REOPEN/U-EXP-A).
-
42: The 8-point drain production-safeguard checklist (indexes, fence, continuation, budgets, concurrent triggers, retry/terminal, query-plan regression, legal-clock) is copied verbatim into every drain unit’s acceptance criteria.
-
44: Docs obligations name per-service Antora api/ + data-models/ pages, the ACTUAL nav group (
* Plans→ new** SNAP Intake Completion (#788, epic &81)sub-group, archive-move convention), and the explicit committed pin pathrulesets/georgia/citations.tomlvs the gitignoredrulesets/georgia/.policy-cache/**. -
46: SME inventory resolves all four flags in-plan with owners and cites; zero flags remain open in the family.
U-FOUND — Deadline model + legal filing date (weight 5)
Purpose + regulatory cites
One authoritative filing anchor and distinct immutable processing clocks, so no later unit conflates them (annex findings 3, 8). 7 CFR 273.2(g)(1) (30-day SOP), (i)(3) (7-day expedited); PAMMS 3105:484-485 (after-hours / weekend / holiday filings are received the NEXT business day), 3105:334-336 (SOP weekend/holiday shifts).
Data model
applications (one new column):
| column | type | constraint |
|---|---|---|
legal_filed_date |
DATE |
NOT NULL; the jurisdiction-legal filing day |
legal_filed_basis |
TEXT |
CHECK('business_hours','after_hours_shift','weekend_holiday_shift') — provenance of the shift; |
application_programs (replace the single conflated clock):
| column | type | constraint |
|---|---|---|
standard_processing_deadline |
DATE |
NOT NULL for programs with a statutory clock — NULL for wic/caps, whose pre-split compute had no deadline; |
expedited_participation_deadline |
DATE |
NULL; set once by a positive expedited screen = legal_filed_date + expedited days; NEVER overwrites the standard clock |
current_workflow_deadline |
DATE |
the mutable operational clock (starts = standard; extended by (h)(3) pends; reset by reopen episodes); NULL exactly when standard is (the pairing CHECK) |
processing_deadline |
— |
DROPPED (pre-1.0, no compat column): every reader migrates in this unit |
Migration: backfill legal_filed_date from received_at via
date_in(received_at, legal_tz) + WorkdayCalendar next-business-day shift
(basis recorded per row); standard clock recomputed from it;
expedited_participation_deadline backfilled for rows whose old
processing_deadline equals the 7-day value (provenance note in the
migration comment); current_workflow_deadline = GREATEST(old value,
recomputed standard) with a WARN-log census of divergent rows.
Contracts
ApplicationWithPrograms/ApplicationProgram expose all three clocks + legal_filed_date + basis (additive fields; api-docs regen). The determination-context endpoint (U-PROV) serves legal_filed_date from here.
Endpoints + drains
None new. compute_processing_deadline splits into
standard_deadline(legal_filed_date, program) and
expedited_deadline(legal_filed_date); update_snap_expedited_deadline
becomes set_expedited_participation_deadline (writes the NEW column only).
Reader migration (enumerated): intake create path, expedited screening,
U-INT guards (standard clock), NOMI reschedule-by (standard clock), day-30
drain (standard clock via current_workflow_deadline where pended), web
case-detail rendering, reporting cores if any (grep processing_deadline —
compile-verified after the DROP).
Events + cutover
None. Column drop is a single-unit cutover: all in-repo readers migrate in the same MR (pre-1.0; devstack single-deploy; the DROP makes a missed reader a compile/SQL error, not a silent misread).
Params + citations
No new keys (standard/expedited day counts exist). The next-business-day filing rule is CODE over the existing WorkdayCalendar (jurisdiction-supplied holidays = already rules-codified); PAMMS 3105:484-485 cited in the migration and rustdoc.
BFF/UI slice
Case-detail shows filing date + basis + the distinct clocks (read-only labels; a11y: plain-text date labels, no new interactions).
Tests
-
Proptest: filing-shift function (arbitrary timestamps × weekend/holiday calendars → legal_filed_date never on a non-business day unless received in-hours; basis matches the shift taken).
-
Migration census test: backfill idempotent; divergent-row WARN pin.
-
Immutability pin: standard clock cannot be updated post-insert.
-
Screen test: positive expedited screen sets ONLY the participation deadline; the standard clock is untouched (the finding-3 regression pin).
Deployment/index notes
Single MR; partial index (program, current_workflow_deadline) WHERE non-terminal — the day-30 drain predicate substrate (finding 42).
FINDINGS RESOLVED
-
3: three distinct clocks; expedited screen no longer overwrites; day-30 keys on standard/current_workflow; expedited miss cannot early-deny.
-
8: legal_filed_date + basis persisted once; all clocks derive from it.
-
45 (partial): baseline corrections absorbed into reader-migration list.
U-INT — Interview lifecycle: truthful appointments, On-Demand deadline-mode, transition guards
Purpose + regulatory cites
Replace the rejected noon-fabrication interview model with a lifecycle that stores the REAL agreed time, renders truthful mode-specific notices, makes On-Demand a first-class deadline-mode, and enforces transition guards. 7 CFR 273.2(e)(3) (interview + NOMI); PAMMS 3105:205 ("schedule as promptly as possible… within 30 calendar days"; scheduled notice "specifies a date and time"), :216 (On-Demand Interview Notice and text message (if applicable); call-in by the application SOP date), :240/:705-707 (pre-date reschedule still sends the NOMI for the initially scheduled appointment; NOMI "in sufficient time… prior to the 30th day"). Sub-units: U-INT-A (w5) lifecycle+guards+endpoints+scheduled-mode notice; U-INT-B (w3) On-Demand notice+text channel; U-INT-C (w3) expedited-window completion fact + the On-Demand flow-spec AUTHORING (the row itself flips at U-D30-B). Total w11.
Data model (canopy-applications DB) — application_interviews
| column | type | constraint |
|---|---|---|
id |
UUID v7 |
PK |
application_id |
UUID |
NOT NULL FK applications |
context |
TEXT |
CHECK ('intake') — recert re-fenced on F1 |
interview_mode |
TEXT |
CHECK (telephone | face_to_face | home_visit | on_demand) |
scheduled_at |
TIMESTAMPTZ |
real agreed instant, NO noon fabrication; NOT NULL for scheduled modes, NULL for on_demand (CHECK XOR with interview_by_date); legal-date comparisons via |
interview_by_date |
DATE |
on_demand call-in deadline; defaults to the standard SOP date; NOT NULL iff mode=on_demand |
dial_in_number / dial_in_extension |
TEXT |
dial_in_number NOT NULL for telephone + on_demand (CHECK) |
location_name, location_line1/2, city, state, zip |
TEXT |
NOT NULL set for face_to_face (CHECK); home_visit renders the household address via persons at render time |
contact_name, contact_phone |
TEXT |
NOT NULL — office contact printed on every notice |
status |
TEXT |
CHECK (scheduled | missed | completed | superseded | cancelled); open set = {scheduled, missed} |
closed_reason |
TEXT |
CHECK (waived | application_terminal), NULL unless cancelled |
is_initial |
BOOL |
NOT NULL; set in-tx = no prior row for (application_id, context); NOMI eligibility keys on it (3105: NOMI is for the initial appointment) |
superseded_by |
UUID |
self-FK; UNIQUE partial (WHERE NOT NULL) = non-branching chain |
completed_at, missed_detected_at |
TIMESTAMPTZ |
authoritative stamps (finding 17/20 consumers read these) |
(NOMI stamps) |
— |
OWNED BY U-NOMI’s migrations: nomi_staged_at + nomi_source_event_id (U-NOMI-a), nomi_dispatched_at (U-NOMI-b). Not created here — single-owner DDL |
created_at, actor_uuid |
— |
claim-derived actor persisted |
Indexes: UNIQUE partial (application_id, context) WHERE status IN ('scheduled','missed') — one open row, structurally linearizes the chain; NO drain index here — U-NOMI-a owns the scan index (single-owner DDL, finding 42). Scheduling columns are write-once: store exposes only status/stamp transitions (test-pinned); reschedule always inserts a new row. Completion mirrors applications.interview_completed_at in the same tx (stays authoritative for "satisfied").
Contracts
canopy-contracts-applications: ScheduleInterviewRequest (mode, scheduled_at RFC3339-with-offset XOR interview_by_date, location/dial-in/contact, display-only actor), RescheduleInterviewRequest (same + supersedes implicit = the open row), InterviewProjection (immutable row, minimal), typed errors (OpenRowExists, PastDate, BeyondSopDate, HeadroomViolated, ProgramTerminal, Conflict). Event payload structs in canopy-common per ADR-004: IDs, dates, mode token — no free text; notice content resolves from the immutable row projection.
Endpoints + drains (auth per finding 2)
| # | Endpoint | Auth | Behavior |
|---|---|---|---|
1 |
|
|
Guards G1–G5 below; insert row; stage |
2 |
|
same |
One tx, row-locked open row: scheduled|missed → superseded (+superseded_by); insert new row (mode may change, incl. to/from on_demand; same guards, headroom G4 exempt); stage NEW |
3 |
existing |
existing op auth |
closes the open row scheduled OR missed → completed (finding 38), stamps completed_at (server now), mirrors applications column, stages |
4 |
existing |
existing op auth |
closes scheduled|missed → cancelled(waived) in-tx |
5 |
|
|
chain + immutable projection; consumed by notices worker + BFF |
6 |
store fn |
in-process |
for the withdrawal/void/reopen-interleave units |
Guards: G1 no past dates — scheduled_at > now, interview_by_date ≥ today (legal-tz); G2 day-30 boundary — scheduled legal date / interview_by_date ≤ the standard SOP date (U-FOUND’s immutable standard clock, never the expedited or workflow clock — finding 3); G3 program row non-terminal; G4 initial appointment only: scheduled date ≤ SOP − interview_nomi_headroom_days (guarantees NOMI-then-reschedule fits before day 30 — finding 39); G5 on_demand: interview_by_date ≤ SOP, defaults to SOP (call-in by SOP date). No drains in this unit (miss detection = sibling NOMI unit).
Events + cutover order (finding 7)
application.interview_scheduled (application_id, interview_id, hoh person_id resolved pre-tx degrade-loudly, mode token, scheduled_at | interview_by_date, reschedule_of: interview_id|null), application.interview_completed (interview_id, completed_at, mode). Both are NEW families → no two-step needed; schema_gate parks unknown versions; topology-allow entries added. U-INT-C’s expedited_window_missed is additive-within-v1 (no bump per substrate); were it ever made required, it follows the #1487→#1014 tolerant-then-require path. NOMI staging is DRAIN-owned (U-NOMI arm M2; endpoint 2 stages nothing; the interview_missed event definition is U-NOMI’s — see deployment order). #433 replay: new families replay clean. Consumers-first within each MR: notices (routes/templates/channel) deploys before the applications producer.
Notices
| Template | Route (both manifests, both rulesets) | Discriminator |
|---|---|---|
|
|
routing table gains |
|
mode = on_demand |
same discriminator |
|
mode = on_demand, second route |
notice_type differs → (source_event_id, notice_type) uniqueness holds (finding 36) |
Content pins: scheduled notice states date AND real time (3105:205), f2f location, telephone dial-in, home-visit "at your home" (persons address at render), contact name/phone, mode-specific instruction blocks (template-owned, no free text in events); On-Demand notice states the call-in number + interview-by SOP date + miss consequences. Worker renders from the immutable row via the applications client (get_recovery_detail precedent). Reschedule = a fresh interview_scheduled event → a fresh letter carrying the supersession line (reschedule_of). Text channel (U-INT-B, as built — !TBD): notices work items gain delivery_channel CHECK(mail|sms) DEFAULT mail + a skipped status; sms transits the ADR-026 stub boundary (SmsTextAdapter, redacted logging — production adapter replaces the stub; disclosed, letter is the binding artifact; an sms item mints NO notice row and closes via complete_without_notice). Applicability = a notify phone with sms_opt_in — LIVING-SPEC surface note: the plan originally said "the persons contact surface", but persons carries no phone; the election lives on applications.sms_opt_in beside notify_phone_e164 (the application-time contact the recovery side-channel already texts), threaded via FinalizeRequest.sms_opt_in, and read service-to-service at send time through the service-caller-only GET /v1/applications/{id}/sms-contact (recovery-detail doctrine). NULL/absent → letter only, item skipped with the reason — "(if applicable)" per 3105:216. Body: ruleset-owned snap/interview-on-demand-text.txt (both rulesets) with fail-closed {key} substitution; one event fans both work items via the routing table’s lookup_all winning-tier read; (source_event_id, notice_type) keeps each single.
Params + citations (4 rulesets, ADR-011)
[snap.intake] interview_nomi_headroom_days = 10 — G4 only. Georgia cites PAMMS 3105 (":205 as promptly as possible"; ":707 NOMI in sufficient time… prior to the 30th day" — administrative election, no fixed number in policy); default/test cite 7 CFR 273.2(e)(3). No On-Demand deadline param (derived = standard SOP date). 3105 already citations-pinned; no new pin.
BFF-UI slice (finding 40)
canopy-web exchanged-token routes: interview panel (open row + chain), schedule + reschedule forms — WritePermission + CSRF + ProgramScope('snap'); server-side validation mirrors G1–G5 with recovery UI (409 shows the open row with a jump-to-reschedule action; 422 shows the SOP/headroom boundary date). A11y: keyboard-operable date+time inputs, labels with aria-describedby-associated errors, focus to first error on failure, live-region announcement on schedule/supersession success, notice preview for both letter types.
Tests
-
Proptest (mandatory): guard totality — arbitrary (mode, status, dates, clock) lands in exactly one of {accept, 409, 422-past, 422-sop, 422-headroom, 409-terminal}; chain invariant — arbitrary op sequences yield ≤1 open row, non-branching superseded_by, exactly one is_initial; legal-tz date math across DST/UTC-date boundaries (23:30 legal scheduling).
-
Truth tables as specs: transition matrix (status × op → result) — the table IS the spec; NOMI-eligibility table (is_initial × status × date-passed × completed/waived × pre-date-reschedule → NOMI due), incl. the :240 row: pre-date reschedule of the initial appointment ⇒ NOMI due for the ORIGINAL row, exactly once.
-
Race + idempotency pins: concurrent schedule → unique index, loser 409; concurrent reschedule vs complete → row lock, loser 409-conflict, no orphan supersession; retry of reschedule cannot double-supersede (superseded_by UNIQUE); one event staged per tx (outbox pin); pre-date reschedule leaves NOMI staging entirely to the drain (endpoint 2 stages nothing — asserted).
-
Render pins: date AND time (real minutes, never 12:00 for a 14:30 agreement), per-mode blocks, On-Demand letter + text body, supersession line.
-
ALLOWLIST FLIP (owned here, U-INT-A): interview-schedule → binding = the schedule endpoint + its integration test.
-
U-INT-C flow spec
flow-snap-intake-on-demand-interview.spec.ts: On-Demand notice + text staged → call-in completes by SOP; expedited AU completes after expedited participation deadline but ≤ day 30 →expedited_window_missedfact → processed unexpedited on the standard clock; interview_by passes → missed → NOMI issues. Spec authored here; the ROW FLIP (blocked_by drop) happens at U-D30-B when the downgrade arm completes the third journey clause
Deployment + index notes
Order: U-INT-A → (sibling U-NOMI: miss drain + nomi.typ + NOMI event def; sibling U-FOUND: distinct clocks) → U-INT-B → U-INT-C (spec authoring last; the flip itself is U-D30-B’s — its spec needs NOMI + clocks; finding 41 multi-MR shape stated). Endpoint 2 has no NOMI dependency (drain-owned staging) (no unrouted-letter window). Notices channel migration precedes any sms route. Indexes shipped with the table (open-row partial unique, superseded_by unique, no drain index (U-NOMI-a owns it)); query-plan regression check on the open-row lookup. Docs (finding 44): api/canopy-applications.adoc, data-models/canopy-applications.adoc, api/canopy-notices.adoc, data-models/canopy-notices.adoc under the existing Service Catalog nav group; CHANGELOG; api-docs regen.
Out of scope
NOMI miss-detection drain + letter (sibling unit; columns + staging site + indexes provided here); distinct clocks + downgrade/denial machinery (U-FOUND/day-30 unit — U-INT emits the fact only); recert interviews (F1; context CHECK); On-Demand screening-criteria codification (worker-elected mode; tracking issue filed at delivery); production SMS gateway (ADR-026 boundary, partner-blocked); georgia.snap.certification.on-demand-renewal-interview (renewals family).
FINDINGS RESOLVED
-
37: scheduled_at stores the real agreed instant (noon fabrication eliminated by schema); location/dial-in/contact are NOT NULL-per-mode columns; mode-specific instructions template-owned; On-Demand = interview_by_date deadline + DISTINCT notice + sms per 3105:216; render pin asserts date AND time.
-
38: G1 no past dates; G2 day-30 boundary on the standard clock; complete/waive close missed rows too (transition matrix); reschedule = new notice event + UNIQUE superseded_by (non-branching) + explicit terminal
supersededstate. -
39: U-NOMI’s drain arm M2 stages the NOMI for the initially scheduled appointment on pre-date reschedule of the initial row (3105:240/:705-707 — single sender, send-once fenced); endpoint 2 only supersedes the row; G4 headroom param guarantees NOMI-then-reschedule fits before day 30.
-
1 (intake On-Demand row): U-INT-C authors the flow spec for
georgia.snap.intake.on-demand-interview; the row FLIPS at U-D30-B (downgrade arm) with a flow spec exercising all three journey clauses (notice+text/call-in-by-SOP, expedited-late-call → unexpedited processing, NOMI on miss).
U-NOMI — Notice of Missed Interview: fenced drain, dispatch-gated evidence, scheduler trigger, cure journey
Split into two sub-units (>10 testable criteria total). U-NOMI-a weight 5, U-NOMI-b weight 3. One MR each (no cross-service saga; the b-consumer is additive — finding 41 single-MR shape holds).
Purpose + regulatory cites
NOMI for the missed INITIAL intake interview (273.2(e)(3): the "first interview appointment"; subsequent misses surface on the worker queue — no second NOMI) (7 CFR 273.2(e)(3)); PAMMS 3105:705-707 (NOMI timing/day-30), 3105:240 (pre-date reschedule still sends NOMI for the initially scheduled appointment — maintainer-DECIDED, encode, no SME flag), 3105:216 (On-Demand distinct text), 3105:334-336 (business-day rendering of the day-30 date). Denial evidence must be a dispatched NOMI, never a staged one (finding 19). Depends on U-INT (application_interviews table) and the standard-SOP-deadline clock (finding 3 clocks unit).
U-NOMI-a — miss-detection drain + NOMI letter + scheduler trigger + timing guarantee (weight 5)
Data model (columns added to application_interviews by this unit’s migration)
| column | type | constraint |
|---|---|---|
miss_kind |
TEXT |
NULL, CHECK(missed | superseded_predate) |
nomi_staged_at |
TIMESTAMPTZ |
NULL, set-once — the send-once fence (honest name: staged ≠ sent, finding 19) |
nomi_source_event_id |
UUID |
NULL; UNIQUE partial index WHERE NOT NULL — v7 id of the staged event, the dispatch-correlation key |
Indexes (finding 42): idx_interviews_nomi_scan partial ON (scheduled_at, id) WHERE nomi_staged_at IS NULL AND status IN ('scheduled','superseded') — serves the predicate and the keyset cursor; uq_interviews_nomi_event as above.
The drain — fenced daily leg canopy-applications.interview-nomi
run_daily_fenced, keyset paging on (scheduled_at, id), per-tick budget, per-row tx; ordered before any later day-30 leg. All date comparisons date_in(scheduled_at, legal_tz) < today(legal).
Miss predicate — truth table IS the spec (disjoint, total):
| # | row state | action |
|---|---|---|
S1 |
application interview completed/waived (authoritative |
skip |
S2 |
SNAP program row terminal, or |
skip |
S3 |
nomi_staged_at NOT NULL |
skip (send-once) |
S4 |
scheduled date ≥ today(legal) |
skip |
S5 |
status = cancelled/completed |
skip |
M1 |
status='scheduled' AND is_initial AND date past |
status→missed; stamp missed_detected_at, miss_kind='missed', nomi_staged_at, nomi_source_event_id; stage event — one tx |
M2 |
status='superseded' AND is_initial AND date past, nomi_staged_at NULL |
the :240 pre-date rule: stamp miss_kind (='superseded_predate' when the supersession happened on/before the scheduled date — read from the superseding row’s created_at vs scheduled_at, no separate superseded_at column — else 'missed'), nomi stamps; stage event; status stays 'superseded' (non-branching supersession, finding 38) — one tx |
On-Demand (living-spec correction at U-NOMI-a delivery; ACTIVATED in U-INT-B #1639): the #1638 schema stores the on-demand deadline in interview_by_date (scheduled_at stays NULL by CHECK), so the drain’s on_demand arm activated WITH U-INT-B alongside the mode gate’s removal — as built, the leg runs a SECOND keyset scan (interview_by_date, id) over idx_interviews_nomi_scan_od (migration 20261127000000) and the classifier generalizes to a NomiAppointment (agreed instant | call-in-by date — same arms; the deadline day is attendable to its end and the :240 predate discriminator compares the same legal date); the missed event carries interview_by_date with scheduled_at null and nomi.typ gains the call-in-deadline prose arm. Additionally, arm M0 (added): a missed NON-initial scheduled row flips to missed (truthful record + worker queue) with NO NOMI — the NOMI belongs to the chain-initial appointment only; the plan’s original table left non-initial past rows implicit. Expedited On-Demand miss stages NOMI here; the downgrade-to-unexpedited arm is U-D30-B’s (no clock moves — processing simply continues on the standard clock, finding 3) — boundary explicit.
CAS guard: UPDATE … WHERE status=$prior AND nomi_staged_at IS NULL; 0 rows → lost the race to a reschedule/completion → skip, no event. Per-row failure: WARN + continue (keyset advances); row retried next run; repeated failures surface via WARN counter (no wedged leg).
Contracts / Events
application.interview_missed — NEW event, ADR-004 payload (IDs/dates/tokens): application_id, interview_id, hoh person_id (resolved pre-tx, degrade-loudly, PersonsClient per the reconciler precedent), scheduled_at (date + real agreed time, finding 37), interview_mode, miss_kind, reschedule_by_date = the standard SOP deadline (finding 3 — never expedited/current-workflow), rescheduled_to date when a superseding row exists (truthful pre-date prose). Event id = the row’s nomi_source_event_id (staged in the same tx, #477 outbox). New event ⇒ no finding-7 two-step (no required-field change on an existing event); topology-allow entry applications→notices.
Endpoints
POST /v1/applications/scheduler/run (renewals #1109 precedent): advisory-lock-aware; 200 with per-leg counters {examined, staged, skipped, warned} / 202 lock-held; optional body {legs:[tokens]}; runs applications-side legs in canonical order (interview-nomi first; later units append). Auth (finding 2): require_service_or_exchanged(claims, SCHEDULER_RUN_ROLES) with an origin-enforced supervisor role array (SCAN_OVERRIDE_ROLES precedent); actor claim-derived; body actor display-only. This is the deterministic drain driver other units' specs cite (finding 41).
Notices
Route application.interview_missed → notice_type nomi, template snap/nomi.typ — both manifests (#1101), both rulesets. No routing discriminator needed (1:1); miss_kind + interview_mode are template inputs: 'missed' → missed date+time+mode, "rescheduling is your responsibility", interview-by = reschedule_by_date, day-30 warning, informational (no hearing block); 'superseded_predate' → :240 formal-record prose naming the original appointment + the already-agreed new date; on_demand → call-in-deadline language (3105:216 distinct text). Recipient = HoH (standard membership gate); uniqueness (source_event_id,'nomi') holds — one event per row. Day-30 date renders business-day-forward per 3105:334-336 via WorkdayCalendar.
Params + citations (all four rulesets, ADR-011)
| key | default | pins |
|---|---|---|
(consumed) |
10 |
georgia → PAMMS 3105:705-707 (existing 3105 citations pin; nothing new); default/test → 7 CFR 273.2(e)(3) |
Timing guarantee (finding 39, clause 2), encoded as a chain: (1) U-INT’s G4 guard (the shared pure fn nomi_schedule_guard is DEFINED IN U-INT with G4; reused here for the timing proptest): a chain-initial appointment date must be ≤ standard SOP deadline − headroom, else 422 — so after a first miss the household still has ≥ floor−1 legal days; (2) daily leg ⇒ detection lag ≤ 1 legal day; (3) reschedules accepted through day 30 (U-INT’s existing ≤-deadline guard unchanged). The headroom param is OWNED BY U-INT (ships with G4 at cutover step 3); this MR only consumes it.
Tests (a)
-
Truth table above as parameterized integration spec — every row, incl. on_demand, voided app, terminal program row, cancelled.
-
Proptest (mandatory): predicate totality/disjointness — arbitrary row states land in exactly one of {M1, M2, skip}; legal-tz date-boundary math around midnight/DST; timing property — any guard-accepted initial date + miss leaves ≥ floor−1 days before the SOP deadline after next-day staging.
-
Race/idempotency pins: same-day double run no-ops (fence); concurrent triggers → one 200 one 202, zero double-stages; drain-vs-reschedule CAS (0-row update → no event); re-run stages nothing (S3).
-
Drain safeguards (finding 42): multi-page keyset continuation across budget exhaustion; per-row failure WARN-and-continue; EXPLAIN query-plan pin — partial index scan, no seq scan; legal-clock tests (miss detected at date+1 legal day; weekend day-30 renders forward-shifted).
-
Render pins: all three prose variants with exact dates; route pins both manifests; tx pin (stamps + event atomic).
U-NOMI-b — dispatch-gated evidence + BFF slice + cure journey (weight 3)
Consumer + evidence contract (finding 19)
-
Column
application_interviews.nomi_dispatched_at TIMESTAMPTZ NULL(this migration). -
canopy-applications' first inbox consumer (standard parking/inbox substrate; enrollment
adverse_actions.rs::set_notice_dispatchedis the shape precedent, incl. its restamp-WARN-keep-first semantics): subscribenotice.dispatched(existing event, producer unchanged — annex-verified correlation); filter notice_type='nomi'; look upnomi_source_event_id(unique index, O(1)); set-oncenomi_dispatched_at= payload dispatched date. Unknown 'nomi' correlation → WARN; other notice_types ignored silently. Replay/duplicate → set-once no-op; #433 replay is safe (stamps re-derivable). Topology-allow notices→applications. -
Evidence contract: exported store predicate
nomi_evidence_dispatched(interview) := miss evidence present AND nomi_dispatched_at IS NOT NULL. The day-30 classifier’s missed_interview arm MUST bind this predicate — denial evidence is DISPATCHED, never staged (seam for findings 17/19; the U-EXP-A NOE staging and U-REP noticed_on replicate the pattern in their units).
BFF-UI slice (finding 40)
-
Exchanged-token BFF route
POST /api/ops/scheduler/applications/run→ the a-endpoint; guards WritePermission (newSchedulerRun) + CSRF; ProgramScope N/A stated explicitly (ops-wide, not program-scoped) — supervisor role enforced end-to-end (exchanged claims carry roles; applications' origin-enforced array is the authority). -
Application-detail interview panel: distinct chips "NOMI staged {date}" / "NOMI dispatched {date}" (the enqueue/dispatch split made visible) + notice preview link.
-
A11y: trigger keyboard-operable with focus retained; per-leg counters announced via aria-live=polite; errors associated via aria-describedby; chips text-labeled, not color-only.
Tests (b) + journey
-
Consumer pins: stamp set exactly once; replay no-op; foreign notice_type ignored; unknown-nomi WARN; forged source_event_id (no matching row) never stamps.
-
Evidence-contract pin: predicate false while staged-only, true after dispatch (the day-30 unit re-binds it in its classifier tests).
-
BFF: routed test (scope/CSRF/permission rejections + happy path).
-
Journey
journey-snap-intake-nomi-cure.spec.ts(#799 full-profile test-clock): file (legal_filed_date oracle preserved) → schedule within guard → clock past date →scheduler/run→ NOMI staged + event → notices worker →notice.dispatched→ nomi_dispatched_at stamped → reschedule before day 30 (guarantee exercised) → complete → determination proceeds. Walkthrough captured from the real run at flip time (never walkthrough_blocked_by). Row flip:missed-interview-nomi-cure(journey tier) + service-level integration binding. Allowlist flip:notice-of-missed-interview. The On-Demand intake row gets its NOMI-on-miss leg here; its flip lands in U-D30-B (the downgrade arm completes the row; the spec is authored in U-INT-C).
Deployment + index notes
-
Order: U-NOMI-a → U-NOMI-b → (later) day-30 classifier activation — the classifier MUST NOT deploy before b (dispatch gate would be unpopulatable).
-
Within a’s rollout: notices (template + routes in both manifests) applies before the applications drain leg activates — no staged-event/DLQ window.
-
b’s consumer needs no producer change ⇒ no cutover window; rollback of b loses only stamps, re-derivable via #433 replay.
-
Both indexes ship in the same migration as their predicates; EXPLAIN pin guards regressions.
-
Docs (finding 44): Antora
api/canopy-applications.adoc(scheduler/run),data-models/canopy-applications.adoc(columns/indexes),api/canopy-notices.adoc(route row) — Service Catalog nav group; CHANGELOG== Unreleased; api-docs regen.
Out of scope
Recert NOMI (F1); TANF/Medicaid interview analogs; worker-queue aging reports beyond the day-30 no-action surfacing.
=== FINDINGS RESOLVED
* 19 (NOMI part): nomi_staged_at (enqueue) vs nomi_dispatched_at (dispatch) split at the column level; applications consumes notice.dispatched correlation via nomi_source_event_id; exported nomi_evidence_dispatched predicate makes DISPATCHED the only lawful denial evidence. U-EXP/U-REP replicas stay with their units.
* 39: :240 encoded as drain arm M2 — a pre-date-rescheduled row still yields the NOMI for the initially scheduled appointment (truthful superseded_predate prose); timing guarantee encoded as guard-param interview_nomi_headroom_days + daily-leg lag bound + through-day-30 reschedule acceptance, with a proptest over the chain.
* 42 (this unit’s drains): partial + unique indexes for both new predicates; acceptance criteria explicitly include fence behavior, multi-page keyset continuation, tick budgets, concurrent-trigger 200/202, per-row retry/terminal-failure WARN semantics, EXPLAIN query-plan regression pins, legal-clock tests.
U-VER — Verification context package, written-request due dates, read/cancel surfaces
Weight: 10 total, split U-VER-a (5) / U-VER-b (2) / U-VER-c (3). Multi-MR per finding 41 (cross-service producer/consumer sequencing). Sub-unit map: a = migrations + requests endpoint + notices routing + dispatch consumer + params; b = producer flips + old-POST withdrawal; c = batch-context + list widening + cancel/cancel-open + BFF-UI.
Purpose + regulatory cites
Verification rows become program/purpose/episode-aware facts whose deadlines anchor on the WRITTEN request the household actually received. 7 CFR 273.2(f) (written request, 10-day floor, agency assistance duty); PAMMS 3105:599 (eligibility-critical must be verified) / :601 (unverified deduction → process without it). Verified substrate (3 targeted reads): verifications table (migration 20260526001500 — person_id, due_date, notes already exist), #1480 open-natural-key (application_id, household_id, verification_type) (20261122000000), per-item POST /v1/verifications with deny_unknown_fields (crates/canopy-contracts-verification/src/verifications.rs), verification-checklist.typ present in BOTH rulesets but unrouted, notice.dispatched exists for dispatch correlation (annex substrate).
Data model (additive migration on verifications; legacy rows NEVER backfilled — fabrication)
| Column | Type | Constraint |
|---|---|---|
program |
TEXT |
NULL for legacy rows; contract-enum (canopy_reference Program token), required on new writes; no DB CHECK (program set grows) |
purpose |
TEXT |
CHECK IN ('eligibility_critical','deduction_only'); NULL legacy only |
episode_kind |
TEXT |
CHECK IN ('intake','agency_pend','reopen','expedited_postponement','mid_certification'); NULL allowed |
episode_id |
UUID |
CHECK both-or-neither with episode_kind; provenance, immutable, NOT in unique key |
notice_ref |
TEXT |
small closed vocab: 'checklist' | 'covered_by_other_notice:expedited-approval' … — which written notice states the deadline |
checklist_event_id |
UUID |
NULL; the staged |
request_dispatched_at |
TIMESTAMPTZ |
NULL until notice.dispatched correlates |
due_date_anchor |
TEXT |
CHECK IN ('requested','dispatched','caller'); NULL legacy |
policy_version |
TEXT |
pinned rules policy/param version the response-days read resolved against (finding 16 "pin governing policy version") |
response_days |
SMALLINT |
pinned param value at creation; re-anchor uses THIS, never a re-read |
cancelled_at / cancelled_by / cancel_reason |
TIMESTAMPTZ / UUID / TEXT |
cancel audit; reason CHECK IN ('superseded_by_reopen','postponement_reverted','application_voided','requested_in_error') |
Natural key v2 (same migration, one tx): drop verifications_open_natural_key_uq; recreate legacy-scoped (application_id, household_id, verification_type) WHERE open AND application_id IS NOT NULL AND program IS NULL; create v2 UNIQUE (application_id, household_id, program, verification_type, COALESCE(person_id,'00000000-…0'::uuid)) WHERE status IN ('pending','in_progress') AND application_id IS NOT NULL AND program IS NOT NULL. Program+person join the key (finding 14): snap+tanf same doc coexist; per-member items are distinct work. Purpose deliberately NOT in key (same evidence = one work item — monotonic purpose escalation below); episode deliberately NOT in key (an older episode’s open row satisfies a newer episode’s need — the saga uses the created flag; provenance stays immutable).
Contracts (canopy-contracts-verification)
-
NEW
POST /v1/verifications/requests— ONE written request = one letter = N items:{ application_id, household_id, program, episode_kind?, episode_id?, notice_mode: checklist(default)|covered_by_other_notice{notice_ref}, due_date?, items: [{verification_type, person_id?, purpose}] }→{ items: [{id, created: bool, status, due_date, due_date_anchor}], checklist_event_id? }. Conflict-return on key v2 → existing row,created=false; if existing.purpose='deduction_only' and incoming='eligibility_critical', purpose escalates (monotonic, never downgrades). -
due_date/notice_mode truth table (the spec):
| # | caller due_date | notice_mode | outcome |
|---|---|---|---|
1 |
absent |
checklist |
due = date_in(requested_at,legal)+response_days, anchor='requested' (provisional, NON-enforceable) |
2 |
(row 1 after dispatch) |
checklist |
due = date_in(dispatched_at,legal)+pinned response_days, anchor='dispatched' (enforceable; ≥ provisional always) |
3 |
present |
covered_by_other_notice |
due = caller value, anchor='caller' (the covering notice IS the written statement — U-EXP-B postpone path) |
4 |
present |
checklist |
422 — deadline formula is policy, not caller discretion; the letter must print the true date |
5 |
absent |
covered_by_other_notice |
422 — covered mode must state the deadline the covering notice carries |
6 |
legacy row |
— |
due_date NULL = household never told a deadline = permanent agency-fault semantics (consumed by the day-30 unit) |
-
Old per-item
POST /v1/verifications: tolerant window (creates legacy-shaped rows, program NULL), then WITHDRAWN in U-VER-b (finding 7 two-step applied to the HTTP contract). -
Purpose classification is POLICY: the SERVICE derives it — items carry NO purpose field on the wire (
deny_unknown_fieldsrejects a caller-asserted purpose; a producer opinion about deadline/fault consequences would be policy drift). The service maps item → 'deduction_only' iff verification_type ∈ new list paramdeduction_only_types(3105:601), else 'eligibility_critical' (3105:599).
Endpoints + drains (auth per annex finding 2)
| Endpoint | Auth | Notes |
|---|---|---|
POST /v1/verifications/requests |
require_service_or_exchanged(claims, roles); claim-derived actor; body actor display-only |
callers: eligibility orchestrator, applications sagas, web manual. HoH person_id resolved pre-tx via new thin PersonsClient (U1/U2 precedent); resolve failure → fail-closed refuse the batch (no silent letterless rows; refusal is fail-safe — no rows = agency fault) |
POST /v1/verifications/{id}/cancel |
require_service_or_exchanged + claim-derived actor → cancelled_by |
body |
POST /v1/verifications/cancel-open |
require_service_caller + EXACT caller allowlist ["canopy-applications"] |
|
POST /v1/verifications/batch-context |
require_service_caller + EXACT allowlist ["canopy-applications"]; exchanged workers REJECTED |
|
GET /v1/verifications |
unchanged auth |
status param widened from pending-only to full vocab + 'all' (finding 45). PORTAL route untouched: pending-only, 50-clamp, notes exposure unchanged (regression-pinned) |
No new drains; one new inbox consumer (next section).
Events + cutover order (finding 7)
-
NEW
verification.requestedv1 (#477 outbox, staged in the requests-tx; ADR-004 tokens): event id, application_id, household_id, program, HoH person_id, items[{verification_type, person_id?, purpose}], response_days, policy_version, requested_date. One event per batch → exactly one letter (notices UNIQUE (source_event_id, notice_type) holds). The event’s items are the rows THIS call CREATED — converged rows keep their original letter and pinned deadline, and a batch converging entirely stages NO event (a re-listed item under a new date would contradict the deadline its row pinned). NOT staged for covered_by_other_notice rows; the fail-closed HoH recipient resolution accordingly applies to checklist mode only (covered mode letters nothing, so it needs no recipient). -
CONSUME
notice.dispatched(verification inbox exists): source_event_id = checklist_event_id → for rows WHERE due_date_anchor='requested': stamp request_dispatched_at, due = date_in(dispatched_at,legal)+pinned response_days, anchor='dispatched'. The WHERE guard makes replay a no-op. Dispatch timestamp comes from the event payload — the same payload need as U-NOMI-b’s NOMI dispatch stamping (finding 19); cross-unit contract check noted. -
Topology-allow: notices→verification
notice.dispatched; verification→noticesverification.requested. -
Cutover, consumers-first: (1) U-VER-a MR — notices routes/template, then verification migrations/endpoints/consumer/params; deploy notices BEFORE canopy-verification; old POST stays tolerant. (2) U-VER-b MR — eligibility orchestrator (
register_pending_verifications→ one requests call per determination, supplying program/purpose/episode) + canopy-web manual path flip; old POST removed (contract, handler, api-docs, test-lib) = the require step. (3) Follow-up issue (a filed follow-up issue): drop the legacy-scoped index only once open program-NULL rows reach zero. No event version change; schema_gate untouched; #433 replay unaffected (new family).
Notices
| Template | Route | Discriminator |
|---|---|---|
|
|
none — whole family, one letter |
Content (render-pinned): items as tokens→labels; "provide within {response_days} days of the date of this notice" + the explicit date computed from the notice date (render/dispatch moment — matches the DB’s dispatch-anchored due_date); agency ASSISTANCE duty prose (273.2(f)); consequences prose distinguishing eligibility-critical vs deduction-only items (3105:599/:601). Recipient: household_member (HoH), default machinery.
Params + citations (4 rulesets each, ADR-011)
| Key | Value | Pinned by |
|---|---|---|
|
10 |
7 CFR 273.2(f) 10-day floor; PAMMS 3105 (georgia cite). Owned HERE (finding 41 — day-30 + reopen units consume). Unit test fails loud on values < 10 citing 273.2(f); no silent clamping |
|
list of verification_type tokens |
PAMMS 3105:601; 273.2(f) deduction carve-out. Not listed = eligibility_critical (3105:599) |
Rows persist (policy_version, response_days) at creation; every later derivation uses the pinned pair — a param change never retroactively moves a household’s stated deadline.
BFF-UI slice (finding 40)
canopy-web worker verification panel: exchanged-token BFF route POST /verifications/{id}/cancel (WritePermission + CSRF + ProgramScope from the row’s program); cancel = confirm dialog with closed-vocab reason select; rows show purpose badge (eligibility-critical / deduction-only) and due-date state ("provisional — letter not yet sent" for anchor='requested' vs "letter sent {date}, due {date}"); checklist notice preview. A11y: dialog focus-trapped + Esc + keyboard-complete; reason select labelled; errors aria-describedby-associated; success/failure announced via live region.
Tests
-
PROPTEST (mandatory, date math): ∀ requested ≤ dispatched, N ≥ 10 — dispatch-anchored due ≥ provisional due (never shrinks); legal-tz date_in boundaries; anchor transition is a fixpoint under dispatch replay.
-
Truth tables AS specs: the due_date/notice_mode table (rows 1–6, both 422 arms); cancel transition table (pending/in_progress/completed/cancelled × cancel → 200-transition / 200-noop / 409 / 409).
-
Race + idempotency pins: concurrent duplicate batch create → key v2 conflict-return, exactly one created=true, same ids in both responses; purpose escalation monotonic (upgrade only); concurrent cancel vs resolve → exactly one wins, loser 409; notice.dispatched replay → single stamp, due_date stable; dispatch after complete/cancel → stamp only, no due_date rewrite; cancel-open second call → 200 empty.
-
Integration: one requests call → exactly ONE staged event covering N rows; covered mode → NO event; HoH-resolve failure → whole batch refused, zero rows; snap+tanf same type coexist open; legacy-index narrowing still dedupes program-NULL rows.
-
Privacy/auth pins: batch-context JSON contains no notes/worker_id/completed_by; wrong-service caller 403; exchanged worker rejected on batch-context/cancel-open; portal route regression (pending-only + 50-clamp + notes unchanged); cancel records claim-derived actor, body actor ignored for authz.
-
Render/route pins: checklist tokens, N-day + explicit-date phrasing, assistance-duty prose, both manifests.
Deployment + index notes
-
Indexes: key v2 partial unique + narrowed legacy key (one forward-only migration, one tx, ADR-016); NEW
(application_id, program)btree (batch-context + cancel-open serve the day-30 drain — finding 42 query-plan regression check on the batch-context query); partial(checklist_event_id) WHERE due_date_anchor='requested'for the dispatch consumer. -
Enforceability contract for consumers: only anchor IN ('dispatched','caller') due dates are enforceable; anchor='requested' is display-only — the day-30 deny arm must require request_dispatched_at IS NOT NULL (finding 19 discipline; exposed in the batch-context projection precisely so it can).
-
Docs (finding 44): Antora
api/canopy-verification.adoc+data-models/canopy-verification.adocupdated (actual nav group named in the MR), api-docs regen, CHANGELOG== Unreleased.
Out of scope
-
Day-30 fault classification and its consumption of purpose/anchor (day-30 unit); postpone/void saga ORCHESTRATION (U-EXP-B/U-REOPEN — this unit ships the primitives: created-flag acknowledgment, idempotent cancel/cancel-open, covered-notice mode).
-
resolve's body-supplied completed_by retrofit to claim-derived actor — pre-existing finding-2-shaped defect on an existing endpoint: separatefix:issue, not this MR. -
Legacy-row backfill (fabricates facts); ievs_hits / verification_responses; #1618 mid-cert flows (episode_kind reserves the token only); orchestrator registration durability upgrade (stays best-effort + WARN; follow-up issue).
FINDINGS RESOLVED
-
14: program/purpose/episode_kind+episode_id columns added (person_id already present); natural key v2 adds program + COALESCE(person); legacy key narrowed to program-NULL; cancellation surfaces (cancel-open + store queries) scope by application+program+episode.
-
15: exact-caller
POST /v1/verifications/batch-context— ≤100 apps, all statuses, minimal projection with no notes/worker fields (privacy-pinned) — kills the drain N+1; portal route stays byte-for-byte constrained (pending-only, 50-clamp, notes) with regression pins. -
16:
verification.requested→verification-checklist.typrouted in both manifests (template existed unrouted, now reworked); due_date re-anchors to notice.dispatched date + verification_response_days; (policy_version, response_days) pinned at creation; 10-day floor fail-loud test + assistance-duty prose cite 273.2(f)/3105. -
26 (part): verification-side saga primitives — batch create returns per-item
createdacknowledgment (U-EXP-B’s release gates on acknowledged effects, no false completion), idempotent cancel/cancel-open for compensation, covered_by_other_notice mode for the postpone deadline; orchestration itself stays in U-EXP-B. -
45 (part): corrected baseline honored — the EXISTING status param (pending-only today) is widened to the full vocabulary + 'all'; no "add a status filter" fiction.
U-PROV — Effective-date provenance (signed, claimed, two-step cutover)
Total weight: 10 (sub-units A=3, B=5, C=2; >10 testable criteria forced the split). Multi-MR shape mandatory per finding 41: the tolerant→require cutover is a dormant-activation sequence — one MR per sub-unit, consumers-first deploy order stated per sub-unit.
Purpose + regulatory cites
Every SNAP determination states WHY its benefit effective date is lawful, signed and race-safe. Substrate for the family’s back-dating arms (7 CFR 273.2(h)(2)/(h)(3)/(i)(4); PAMMS 3105 — arms themselves land in later units). Evaluation date vs benefit date separation mirrors the envelope’s existing effective_date (benefit start, canopy-signing/src/envelope.rs:99) vs evaluated_as_of (:177): facts + policy always evaluate at legal-today; only the benefit period is anchored elsewhere.
Data model (all migrations additive-nullable; NULL = pre-provenance historical row — never backfilled, backfill fabricates facts)
canopy-eligibility determination_operations (new — the per-application claim; the bulk path instead adds operation_id uuid + basis columns to its existing case rows and mints inside its existing cas_claim step, bulk/store.rs:417/:660 shape reused, not duplicated):
| column | type | constraint |
|---|---|---|
id (operation_id) |
uuid v7 |
pk |
application_id |
uuid |
not null |
program |
text |
not null (ADR-004 token) |
generation |
bigint |
not null (dispatch_generation shape) |
effective_date_basis |
jsonb |
not null |
benefit_effective_date |
date |
not null |
claimed_at |
timestamptz |
not null |
settled_at / outcome |
timestamptz / text |
null until settle |
-
Unique partial index
(application_id, program) WHERE settled_at IS NULL— one open claim; cas_claim refuses a second.
canopy-eligibility program_determinations + effective_date_basis jsonb, benefit_effective_date date, operation_id uuid (unique where not null).
canopy-snap snap_determinations + same three columns (NB: existing basis TEXT column is a different concept — new column is effective_date_basis, no rename, no collision). operation_id unique where not null.
canopy-enrollment enrollment row + effective_date_basis jsonb, benefit_effective_date date (persisted by auto_enroll from the event).
Contracts
-
canopy-common
EffectiveDateBasis— besideDeterminationTrigger(#1213; trigger = what caused the run, basis = why this date is lawful). Internally tagged serde{"kind": "…"}(flat string kind is the future notices discriminator input, finding 28’s unit). Exhaustive enum — later units ADD variants (application_reopen,agency_fault_pending,expedited_postponed), each carrying its episode id (finding 6: episode ids ride the variants); a new stamp without a match arm is a compile error. U-PROV variants:determination_day,order_effective { order_ref },mass_change_cola(reuses thecolatoken). -
canopy-contracts-eligibility
ApplicationContext(src/determine.rs:222+) + per-program mappers into the snap dispatch contract: gainbenefit_effective_date,effective_date_basis,operation_id(Option in sub-unit A/B, required in C).evaluated_as_ofUNCHANGED — never back-dated, no facts-snapshot change. -
SignableDetermination(canopy-signing/src/envelope.rs) — additive-field ritual for the two genuinely-new fieldseffective_date_basis+operation_id:skip_serializing_if, tolerance-test pair (absent ⇒ byte-identical canonical form), frozen RFC8785 KAT at :304 untouched + a NEW present-fields KAT.benefit_effective_dateneeds NO new field — it flows into the already-signedeffective_date(:99). All three provenance facts are thereby signed (finding 5). -
determination.completed.snapevent +effective_date_basis,benefit_effective_date,operation_id,legal_filed_date(application-scoped runs only; bundled here so later units don’t pay a second cutover). Additive-within-v1 — no envelope version bump (verified substrate); schema_gate parking untouched for v1. -
record_determinationrequest gains the three fields;determination_idstays required as-is (finding 45 — the #1630 shim question belongs to the admin-denial unit, untouched here).
Endpoints + drains
-
GET /v1/applications/{id}/determination-context(canopy-applications, new). Auth per finding 2:require_service_caller()— a pure orchestrator read, sole caller canopy-eligibility, no exchanged-worker or body-actor surface. Returns{ application_id, filing_date, programs: [{ program, status, determination_received_at }] }— an extension point: later units add episode blocks (pends, cures, postponements); the legal-filed-date unit swapsfiling_date's source additively (finding 8 is not resolved here). -
canopy-eligibility: NEW context operation on the EXISTING applications client/DI (config.rs:22 — today assignments-fetch only; finding 45: extend, never a client from zero). Fail-closed: context read error/404 ⇒ application-scoped determine is REFUSED before any claim or dispatch — never a guessed basis.
-
No new drains. Back-dated/per-program runs (later units) dispatch via the EXISTING
DetermineRequest.programsper-program loop withprograms=["snap"](finding 4) — the loop pin lands here.
Derivation + claim flow (finding 6 chain: context → signature → event → CAS record-back)
Design notes (U-PROV-B implementation, 2026-08-31). Two spec points resolved
against the landed topology: (1) settle site — the claim ledger lives in
canopy-eligibility’s database (ADR-001), so the CAS settle happens at the
orchestrator’s own record-back (response persistence), not inside
canopy-applications' record_determination HTTP handler (that endpoint gains
the Optional provenance echo as a tolerant-parse consumer, like notices; web’s
BFF threads the echo through). The settle semantics are exactly as specified —
operation id must match the open claim, stale/unknown never clobbers, re-settle
is an idempotent no-op — expressed as in-process store outcomes rather than
HTTP 409s. (2) bulk evaluation date — the #1213 bulk arm keeps its frozen
run.as_of evaluation (the D-2b determinism core: byte-stable re-arms, the H2
ladder); B14 pins that value to the mass-change effective_period.start, so
at enactment it coincides with legal-today and the truth table’s bulk row
holds operationally. The arm consumes the table’s (benefit_effective_date,
basis) pair from the cohort-case claim mint; the evaluated_as_of ==
legal-today invariant is enforced by construction on the two arms the
interactive dispatcher owns and proptest-pinned in crate::derivation.
1. Eligibility resolves the arm (truth table below), reads context where application-scoped (fail-closed), mints operation_id, cas_claims the row.
2. (benefit_effective_date, basis, operation_id) travel in ApplicationContext → snap signs them (envelope) → persists on snap_determinations → stages the event (#477 outbox, same tx) → calls record_determination.
3. record_determination settles the claim CAS-style (settle_case shape): operation_id must match the open claim; stale/unknown ⇒ 409, WARN, no clobber; re-settle of the settled same-id ⇒ idempotent no-op.
4. canopy-snap/src/determine.rs:268 — the one-line change: let effective = eligible.then_some(benefit_effective_date); (was as_of). determination_day makes them equal, so all existing behavior is bit-identical.
Derivation truth table (the spec — every dispatch path lands in exactly one arm)
| Path | evaluated_as_of | benefit_effective_date | basis |
|---|---|---|---|
interactive / application determine |
legal-today |
legal-today |
|
#1504 order dispatch site |
legal-today |
order’s date |
|
bulk COLA dispatcher |
legal-today |
mass-change effective date |
|
Invariant (proptest): evaluated_as_of == legal-today in EVERY arm, forever.
Events + cutover order (finding 7 — a required field changes: two-step, #1487→#1014 precedent)
-
Step 1 (sub-units A+B, tolerant): fields Optional everywhere; ALL consumers parse-and-use-when-present: enrollment auto_enroll (persists), renewals subscriber, notices routing (tolerant parse only), security event_parsing, web audit/SSE, record_determination, seeds/fixtures/test-lib. Deploy order: applications (endpoint) → consumers (enrollment, renewals, notices, security, web) → eligibility → snap (producer last).
-
Step 2 (sub-unit C, tolerance withdrawal): fields required in event schema + dispatch contract + record_determination; precondition = parked/DLQ/inbox drained of pre-basis payloads (drain-before-deploy note in the MR; parking substrate handles residue). IMPLEMENTATION SHAPE (#1648, living spec): the withdrawal is SNAP-SCOPED — the event trio is serde-REQUIRED (the replay fail-loud), the snap dispatch guard requires the triple (422
provenance_fields_required;/determinebecomes orchestrator-only, since every dispatch now asserts provenance), and a snap record_determination requires the echo trio (handler 422). The GENERIC eligibility ApplicationContext/ProgramResult and the RecordDeterminationRequest wire fields stay Optional: synthesized non-determination outcomes (breaker-open, input_unsatisfiable, exchange-failed) have no derivation to echo, and TANF/Medicaid record-backs have no provenance machinery until their own provenance units land — blanket-required would have broken both.legal_filed_datestays Optional everywhere (application-scoped runs only; bulk has no application to date). -
Snapshot version bump: dry-run/recompute snapshot vN+1 — basis REQUIRED at vN+1, fail-loud on out-of-window versions (ADR-028 discipline, not optional-on-new like #1467).
-
Rollback rule (documented in-repo): after Step 2, producer rollback is forbidden until withdrawal is reverted first. Historical-replay rule: #433 replay of pre-basis payloads fails loud post-withdrawal (#1613 precedent) — replays of pre-cutover history must run in the tolerant window or be re-derived, never silently defaulted.
Notices
None. No new templates/routes/discriminators — notices only gains tolerant parsing of the new payload fields; the routing-table basis-kind discriminator mechanics are finding 28’s unit (expedited). Stated to prevent scope bleed.
Params + citations
None. Provenance is mechanism, not policy — no jurisdiction knob exists to codify (maintainer ruling: policy in rulesets where applicable; a basis vocabulary is wire contract, ADR-004 tokens). COLA/order dates come from their existing owning machinery. Later units own their window params (e.g. denial_reopen_window_days is owned by U-DENY (its denial letter renders it first)).
BFF-UI slice (finding 40)
-
Web audit/SSE consumer surfaces basis + benefit_effective_date on the existing exchanged-token determination/audit views under
ProgramScope(snap). No new write route ⇒ WritePermission + CSRF have no new application site (named per the finding; the read path still rides the exchanged-token session). -
A11y: basis rendered as localized text from the kind token (never color/icon alone); back-dated benefit date carries a visible "(effective <date>, <basis label>)" suffix; SSE updates announce via the existing polite live-region; dates localized.
Tests
-
Proptest (mandatory):
EffectiveDateBasisserde roundtrip over all variants; RFC8785 canonical-form determinism under arbitrary basis values; derivation totality — every dispatch path × input lands in exactly one truth-table arm withevaluated_as_of == legal-today. -
KATs: frozen envelope.rs:304 KAT byte-identical (tolerance pair — fields absent ⇒ old signature reproduced); new present-fields KAT frozen.
-
Race + idempotency pins: concurrent double-claim same (application, program) ⇒ second cas_claim refused; record-back with stale operation_id ⇒ 409 + WARN + no clobber; settle idempotent on redelivery; event redelivery to enrollment ⇒ single persisted basis (inbox + operation_id uniqueness).
-
Anchor pin: eligible + back-dated benefit_effective_date ⇒ benefit_period starts at the benefit date while the signed
evaluated_as_of= legal-today (both asserted from the envelope). -
Fail-closed pin: applications context read 404/down ⇒ determine refused, zero claims, zero dispatches.
-
Cutover pins: tolerant consumer accepts a pre-basis payload (step 1); post-withdrawal consumer rejects it loud (step 2); snapshot vN out-of-window fails loud;
programs=["snap"]dispatch reaches only snap. -
Existing-path regression: all three U-PROV arms produce byte-stable envelopes vs golden fixtures where dates coincide.
Deployment + index notes
-
Indexes: the partial-unique open-claim index; unique
operation_idon snap_determinations + program_determinations (WHERE NOT NULL); no drain predicates added (finding 42 N/A). -
Sub-unit MRs: A = contracts + signing + snapshot-bump scaffolding (no behavior change; KATs prove it). B = endpoint + derivation + claim + producer + tolerant consumers + persistence (deploy order above). C = withdrawal + replay/rollback documentation, gated on DLQ/inbox drain evidence.
-
Docs per finding 44: applications + eligibility + snap + enrollment Antora
api/+data-models/pages updated in each MR; CHANGELOG== Unreleased.
Out of scope
Legal filed date derivation (finding 8’s unit — this endpoint returns applications' current filing date, source swapped later); back-dating basis variants + their episode ids (reopen/pend/postpone units add arms + context-endpoint blocks); notices discriminator mechanics (finding 28); administrative denial (determination_id semantics untouched); verification changes.
FINDINGS RESOLVED
-
4:
evaluated_as_ofnever back-dated — single legal-today facts snapshot untouched; distinctbenefit_effective_dateinput through ApplicationContext; the one-lineeligible.then_some(benefit_effective_date)change at snap determine.rs:268; existingDetermineRequest.programsloop pinned forprograms=["snap"]runs. -
5: basis + operation_id join SignableDetermination via the additive-field ritual (skip_serializing_if + tolerance pair + frozen :304 KAT + new KAT); benefit_effective_date signed through the pre-existing
effective_datefield (:99); persisted at snap_determinations, program_determinations, and the enrollment row. -
6: claimed operation id minted at cas_claim, carried context → signature → event → CAS record-back settle (dispatch_generation/cas_claim/settle_case shape reused, bulk path extends its own case rows); open-claim uniqueness + stale-settle 409 kill the one-shot race; episode ids contractually ride later basis variants.
-
7: two-step tolerant-then-require (#1487→#1014), consumers-first deploy order stated per sub-unit, parked/DLQ/inbox drained before withdrawal, rollback + historical-replay (#433 fails loud, #1613) rules documented, snapshot vN+1 with basis required + ADR-028 fail-loud.
-
45: context operation added to the EXISTING eligibility→applications client/DI (config.rs:22), not a client from zero;
record_determination.determination_iduntouched (already required); no reliance on the verification list status param (out of scope here).
U-DENY — Administrative denial first-class (resolves annex findings 9, 10, 11, 12, 13)
Four lettered sub-units; delivery order a → b → c, d parallel after a. Total weight 14.
| Sub-unit | Delivers | Weight | Depends on |
|---|---|---|---|
U-DENY-a |
Reason vocabulary + administrative_denials table + op + integrity + event two-step + notice + param |
5 |
consumer-tolerance MR (§10) |
U-DENY-b |
Web per-program SNAP deny retarget + BFF-UI slice |
2 |
U-DENY-a |
U-DENY-c |
record_determination pure record-back (#1630 |
2 |
U-DENY-b (zero |
U-DENY-d |
Appeals three-arm contested union + hearing-view union |
5 |
U-DENY-a (GET endpoint) |
1. Purpose + regulatory cites
Procedural denial (failure to complete the application process) becomes a first-class, durable, appealable, curable record — no longer masquerading as a rules determination. 7 CFR 273.2(h)(2) (denial for failure to complete; 60-day rights), 273.2(h)(1)(i) (missed interview), 273.2(f) (verification), 273.15 (fair hearing); PAMMS 3105:743-745 (reopen rights), 3705 (hearings). Voluntary withdrawal remains the existing withdrawal op — never a denial reason.
2. Data model
administrative_denials (canopy-applications DB):
| column | type | constraint |
|---|---|---|
id |
UUID |
PK, v7 |
application_id |
UUID |
NOT NULL, FK applications |
program |
TEXT |
NOT NULL, CHECK program vocab (snap first consumer; table program-generic) |
episode_id |
UUID |
NULL — the reopen/pend episode this denial closes; NULL = initial intake episode |
reason |
TEXT |
NOT NULL, CHECK ('missed_interview','verification_not_provided') |
interview_id |
UUID |
NULL, FK application_interviews |
verification_ids |
UUID[] |
NULL |
— |
— |
CHECK closed matrix: (reason='missed_interview' AND interview_id IS NOT NULL AND verification_ids IS NULL) OR (reason='verification_not_provided' AND cardinality(verification_ids)>=1 AND interview_id IS NULL) |
initiated_by |
TEXT |
NOT NULL, CHECK ('worker','system') |
actor_uuid |
UUID |
claim-derived (reviewer_uuid shape); CHECK: NULL iff initiated_by='system' |
actor_display |
TEXT |
NULL — body actor, display-only (finding 2) |
idempotency_key |
UUID |
NOT NULL |
denied_at |
TIMESTAMPTZ |
NOT NULL |
legal_denied_date |
DATE |
NOT NULL — date_in(denied_at, legal_tz); reopen-guard anchor |
Indexes: partial UNIQUE (application_id, program) WHERE episode_id IS NULL + UNIQUE (application_id, program, episode_id) WHERE episode_id IS NOT NULL (active-episode uniqueness); UNIQUE (application_id, program, idempotency_key); FK-support index on application_id.
application_programs + administrative_denial_id UUID NULL FK; CHECK NOT (administrative_denial_id IS NOT NULL AND determination_id IS NOT NULL) — the row tells the truth. Contract for the reopen unit: denied→processing clears administrative_denial_id (history stays in the table).
Appeals table (U-DENY-d): determination_id → nullable; + administrative_denial_id UUID NULL, rep_disqualification_id UUID NULL (application_id already existed, nullable); CHECK exactly one contested column NOT NULL (num_nonnulls(…) = 1); CHECK application_id NOT NULL for the administrative_denial arm only — design note: the DETERMINATION arm cannot make that promise, because canopy-snap only knows its LOCAL determination id and the appeals filing carries no upstream application ref; resolving a determination to its owning application is a pre-existing scope gap this unit records rather than papers over (the admin arm’s application_id is server-resolved from the denial record, which names it authoritatively). Existing rows all determination — no backfill; the admin-arm CHECK passes vacuously for them (plain validated CHECK, no NOT VALID needed). Partial index on administrative_denial_id WHERE NOT NULL. Ownership check: AdministrativeDenial (contracts-applications) additively carries household_id so filing validates ownership in ONE applications read.
3. Contracts
-
canopy-common (beside #1213 DeterminationTrigger — one vocabulary home):
AdministrativeDenialReason { MissedInterview, VerificationNotProvided }. NOTDenialReasonCode— canopy-reference enums.rs:85 is build.rs-generated and TSNAP/TMA wire-load-bearing; untouched (finding 9). snake_case serde, proptest roundtrip. -
AdministrativeDenialEvidenceunion (store + read views only):MissedInterview{interview_id} | VerificationNotProvided{verification_ids: non-empty}. Never accepted over HTTP (finding 12). Noworker_judgment, noother, no merits arms (finding 10). -
POST body:
{ reason, idempotency_key, expected_program_status, actor }(actor display-only). 201 = full record; replay same key = 200 same record. -
RecordDeterminationRequest: the #1630source: RecordDeterminationSourcefield (contracts-applications applications.rs:236) REMOVED — pure record-back; determination_id stays required (already is, finding 45). -
Appeals
FileAppealRequest/AppealRequest: requireddetermination_id(appeals.rs:231/:40) → required taggedcontestedunion:determination{determination_id} | administrative_denial{administrative_denial_id} | rep_disqualification{disqualification_id}.application_idbecomes server-populated, never caller-asserted. -
Hearing view: typed
contestedresponse union, three arms — determination summary (existing); administrative-denial record (reason, evidence, denied_at, program — never 404); rep-disqualification record (reason, noticed_on, effective window). -
Appeals CB/overpayment EVENT contracts (
continued_benefits_granted,overpayment_assessed, AppealCbCeasedV1, AppealOverpaymentAssessmentVoidedV1, …) UNCHANGED — determination-only; live snap/tanf/medicaid claim consumers; admin denials have no benefits to continue (finding 13).
4. Endpoints + drains
| Route | Service | Auth (finding 2) |
|---|---|---|
POST /v1/applications/{id}/programs/{program}/administrative-denial |
applications |
require_service_or_exchanged(claims, DENY_ROLES); actor claim-derived (documents_scan.rs:31 shape); body actor display-only |
GET /v1/administrative-denials/{id} |
applications |
require_service_or_exchanged(claims, READ_ROLES) — appeals (service) + web BFF (exchanged) |
POST filing (existing) |
appeals |
unchanged auth; contested union body |
GET hearing view (existing) |
appeals |
unchanged; union response |
Web: POST /applications/{id}/snap/deny — exchanged-token route, WritePermission + CSRF + ProgramScope.
Op semantics — one tx, store fn record_administrative_denial shared by the HTTP handler and (in-process) the future day-30 drain:
-
SELECT program row FOR UPDATE.
-
CAS: status non-terminal AND == expected_program_status; determination_id NULL for the current episode — else 409 stale-state. Symmetric: record_determination takes the same lock and 409s if administrative_denial_id is set (finding 11).
-
Idempotency: same (application, program, idempotency_key) → 200 replay, zero side effects; same key different payload → 409.
-
Server-side evidence resolution (finding 12): missed_interview → latest non-superseded
missedinterview row in the current episode; verification_not_provided → past-due verification rows for this application+program+episode. Nothing resolves → 422 fail-closed, no row. -
Evidence ownership rule (also for in-process explicit evidence): every ref belongs to the same application+program+episode, else 422. Episode leg of the verification check activates when the finding-14 columns land (§10); until then it binds application_id + program (+ the same-application interview).
-
Recipient fail-closed: resolve HoH person + mailing path PRE-tx; no lawful recipient → 422, no denial — the notice is mandatory (finding 12).
-
Write the row; program row → denied + administrative_denial_id; stage
application.denied.{program}in the same tx (#477 outbox).
No new drains in U-DENY; the day-30 unit’s drain calls the store fn in-process.
5. Events + cutover order (finding 7)
application.denied.{program} (exists, #1630) gains REQUIRED administrative_denial_id, reason token, legal_filed_date, reopen_deadline_date; the family becomes admin-denial-only (merits denials ride determination.completed.*; the free-string browser reason stops flowing). Required-field change → two-step per #1487→#1014:
-
Consumers-first MR: notices routing, security event_parsing, web audit/SSE, seeds/fixtures/test-lib tolerate the fields as optional; schema_gate keeps parking newer versions centrally (additive-within-v1, no version bump).
-
Producer MR (U-DENY-a) + web retarget (U-DENY-b): fields always emitted; no old-shape producer remains.
-
Tolerance-withdrawal MR: fields required; #433 replay of pre-cutover payloads fails loud (#1613 precedent); parked/DLQ drained before deploy; rollback + historical-replay rule documented (pre-cutover payloads replay only under the tolerant schema; after withdrawal they park).
Appeals contract change is an HTTP break (pre-1.0): web file-appeal, test-lib, e2e givens updated in the SAME diff; CHANGELOG Changed. Appeal event families: no cutover — untouched (finding 13).
6. Notices
| Template | Route | Discriminator |
|---|---|---|
existing #1630 snap denial template, extended |
application.denied.snap (both manifests #1101; both rulesets) |
none new — event family now admin-denial-only, event type suffices (basis discriminators belong to the expedited unit) |
Template additions: reason token → label; per-reason canned cure prose (schedule your interview / provide the listed items); exact reopen-by date = legal_filed_date + denial_reopen_window_days; hearing-rights block. Exactly-one letter via UNIQUE (source_event_id, notice_type).
7. Params + citations
[snap.intake] denial_reopen_window_days = 60 — all four rulesets; georgia cites PAMMS 3105:743-745, default/test fixtures cite 7 CFR 273.2(h)(2). Owned HERE (finding 41: owned before consumed — this letter is the first renderer; day-30 + reopen units consume). Deliberately not the colliding 3730 reopen_window_days leaf. No other new keys.
8. BFF-UI slice (finding 40)
-
Exchanged-token POST /applications/{id}/snap/deny; WritePermission + CSRF + ProgramScope('snap'); per-program action — the cross-program deny loop deleted (finding 12).
-
Modal reason select = the two procedural tokens only. Old 7-token vocabulary (web api/applications.rs:1165-1193) disposed: voluntary_withdrawal → link to the existing withdrawal action; gross_income_exceeded / net_income_exceeded / asset_limit_exceeded / not_eligible_noncitizen → removed (merits denials only via rules determinations);
other→ removed (finding 10).validate_denial_reasondeleted with the free-string path. -
No evidence pickers — server resolves. 422 no-qualifying-evidence → recovery UI naming the gap ("no missed interview on record"); 409 stale → refresh-and-retry; both preserve modal state.
-
Synthetic-v7 determination-id minting deleted; determinations_to_record deny arm removed.
-
a11y: focus-trapped modal, labelled select, errors associated via aria-describedby, outcome announced in a live region, fully keyboard-operable.
9. Tests
Proptest (mandatory): AdministrativeDenialReason + evidence union serde roundtrip; contested three-arm union roundtrip + exactly-one invariant; reason×evidence closed-matrix totality (every pair satisfies the CHECK xor is rejected — no third state). Truth tables ARE the spec: * Evidence matrix: reason × {matching, wrong-application, wrong-program, wrong-episode, empty verification_ids, superseded interview} → 201/422 per cell. * Deny-vs-state: program status {received, processing, determination-recorded, denied same-episode, denied prior-episode post-reopen, withdrawn} × expected_status {match, stale} → 201/409 per cell. Race + idempotency pins: two concurrent denials same program+episode → exactly one 201 (FOR UPDATE); denial vs record_determination race → loser 409, never both stamped; replay same key → same id, ONE event, ONE notice work item; same key different payload → 409. Fail-closed pins: no lawful recipient → 422, no row/event; no qualifying evidence → 422. Appeals (U-DENY-d): file-against-admin-denial end-to-end (ownership fetch → application_id populated → hearing view renders the record, never 404); foreign household’s denial → 404/403; rep_disqualification arm pre-substrate → 422 (record unresolvable — naturally fail-closed until that unit lands); CB stay refused for both non-determination arms; serde pins that CB/overpayment events still carry bare determination_id. Reversion pins (U-DENY-c): the two #1630 serde pins replaced (the omitted-source test at contracts applications.rs:290-307 deleted); contracts roundtrip.rs strategies/imports; applications integration tests retargeted; test-lib client signature; web routed deny tests retargeted; OpenAPI regen (applications + appeals). Cutover pins: tolerant-window consumer accepts old payloads; post-withdrawal old payload parks; replay-fails-loud.
10. Deployment + index notes
-
Multi-MR (finding 41 — cross-service cutover): MR-1 consumer tolerance (deploy first) → MR-2 U-DENY-a → MR-3 U-DENY-b → MR-4 U-DENY-c → MR-6 tolerance withdrawal after parked/DLQ drain. MR-5 U-DENY-d any time after MR-2.
-
Indexes ship with the table (§2); appeals partial index for the hearing-view join; query-plan check on the locked program-row path.
-
Sequencing: U-DENY precedes the day-30 unit (store fn + param consumer); verification-episode evidence leg activates with the finding-14 columns (guarded, stated in both issues); rep_disqualification union arm is wire-stable from day one, resolvable once the rep-disqualification unit lands.
-
Docs (finding 44): applications + appeals Antora api/ + data-models/ pages updated in the implementing MRs.
11. Out of scope
Day-30 drain + fault classifier (separate unit; consumes the store fn); reopen op + episode creation (both reasons here curable by construction — no is_procedural gate needed beyond the closed enum); verification program/episode columns (finding-14 unit); rep-disqualification substrate (the union arm ships, the record arrives there); per-designation notice fanout (finding-36 unit); merits-denial letter content (determination-driven, elsewhere).
ALLOWLIST FLIP (owned here): deny-failure-to-complete → binding = the administrative-denial endpoint (actor=worker honest; the U-D30 drain is the system backstop).
FINDINGS RESOLVED
-
9 — New enum is
AdministrativeDenialReasonin canopy-common; canopy-reference::DenialReasonCode (build.rs-generated, TSNAP/TMA wire-load-bearing) untouched. -
10 — Procedural-only closed matrix (missed_interview{interview_id}, verification_not_provided{verification_ids}) enforced by DB CHECK + server-side resolution; worker_judgment, merits tokens, and
otherremoved; voluntary_withdrawal stays on the withdrawal op. -
11 — administrative_denial_id on the program row + truth CHECK; active-episode partial-UNIQUE pair; idempotency-key UNIQUE; FOR UPDATE + expected-status CAS; same application/program/episode evidence rule; stale determination state → 409 both directions.
-
12 — Web deny is a per-program SNAP action (cross-program loop deleted); evidence resolved server-side only; mandatory denial fails closed (422, pre-tx) when no lawful recipient resolves.
-
13 — Contested union has THREE arms (determination | administrative_denial | rep_disqualification) on FILING + typed hearing-view union only; ownership validation + server-populated application_id; CB/overpayment event families stay determination-only, pinned by serde tests.
U-D30 — Day-30 procedural disposition drain + (h)(3) pend + reopen-rights pins (weight 10: U-D30-A classifier+drain IN SHADOW MODE w5 — ships the mode flag, shadow findings rows, report page; U-D30-B pend writes+letters+ENFORCE flip w5)
Purpose + regulatory cites
Dispose every SNAP application at its standard SOP day: household-fault → administrative denial; agency-fault → pend, never deny. 7 CFR 273.2(h)(1)-(3); PAMMS 3105:334-336 (denials shift FORWARD to the next business day, approvals BACK), :599 (eligibility-critical verification unprovided → deny day after deadline), :601 (deduction-only verification → process WITHOUT the deduction), :743-745 (denial notice reopen content).
Data model
application_agency_pends (episode table): id v7 PK; application_id; program; pended_at TIMESTAMPTZ; cause CHECK('no_interview_scheduled', 'no_verification_requested','verification_window_overran_sop'); extended_deadline DATE; letter_event_id UUID. One row per episode; partial index (application_id, program) + (extended_deadline) WHERE latest. application_programs: disposition_reserved_at TIMESTAMPTZ (the race-safe reservation stamp, cleared on commit of the disposition tx); expedited_downgraded_at TIMESTAMPTZ (stamped by the downgrade arm — DDL owned here, migrated in U-D30-B).
The classifier — the DISJOINT truth table IS the spec (finding 17)
Evaluated per SNAP program row with current_workflow_deadline ≤ today(legal), applications.active = true, row non-terminal. Precedence TOP-DOWN, first match wins; DEFAULT = AGENCY FAULT (never deny unless household noncompliance is affirmatively proved):
| # | State (authoritative columns) | Arm |
|---|---|---|
1 |
interview satisfied (applications.interview_completed_at OR interview_waived) AND no open eligibility-critical verification |
NO ACTION — worker determination pending; surface on the worker queue age report; never auto-denied |
2 |
interview satisfied AND open eligibility-critical verification rows, ALL with dispatched checklist + due_date ≤ standard SOP + due_date < today |
DENY verification_not_provided (evidence: the verification ids) |
3 |
interview satisfied AND open eligibility-critical rows where ANY lacks a dispatched checklist OR has due_date > SOP OR due_date NULL |
PEND (verification_window_overran_sop / no-written-request — agency) |
4 |
initial interview row missed + NOMI DISPATCHED (nomi_dispatched_at) + no later scheduled/completed row + not waived — regardless of verification state (interview fault dominates: the household never completed the process step that precedes verification) |
DENY missed_interview (evidence: interview id) |
5 |
interview row missed but NOMI not dispatched |
PEND (agency — notice never reached dispatch) |
6 |
no interview row ever for the application |
PEND (no_interview_scheduled) |
7 |
anything else |
SKIP + WARN + durable exception record (shadow-audit row) |
IMPLEMENTATION REFINEMENTS (#1653, living spec): (a) an awaiting_verification_due arm closes a totality gap — every open critical item enforceable + due within the SOP but not all PAST due (denial fires the day AFTER the deadline, 3105:599; the row simply waits); (b) arm 3 splits into pend_checklist_not_dispatched (any item without a dispatched/caller anchor) and pend_verification_window_overran_sop (all anchored, any due date past the SOP or unstated); (c) arm 7’s durable exception record IS a shadow row (skip_exception).
IMPLEMENTATION NOTES (#1654 U-D30-B, living spec): (a) the pend CAUSE vocabulary is the shipped classifier’s agency-fault set — no_interview_scheduled \| nomi_not_dispatched \| checklist_not_dispatched \| verification_window_overran_sop — the plan’s no_verification_requested is checklist_not_dispatched (no written request reached dispatch) and arm 5 (pend_nomi_not_dispatched) is a cause in its own right; (b) the reservation protocol is a CLAIM (disposition_reserved_at, 15-minute lease) + a RE-VERIFY under the row lock in tx2 of the claim, the row status, and the INTERVIEW premise (the deny-missed-interview arm and the interview-premised pend causes defer when a completion raced in; the verification arm’s premise is remote and is not re-read — the writer’s status CAS on the locked status is the last belt) — racing local writers do not clear the stamp (the plan’s "cleared via their own writes" was not built by U-D30-A and is unnecessary); an error exit releases the claim best-effort, else the lease bounds it; (c) the enforce cutoff is REQUIRED config (CANOPY_APPLICATIONS__DAY30_ENFORCE_CUTOFF_DATE; boot error without it, like the persons identity) and is judged against the IMMUTABLE standard deadline; pre-cutoff rows are recorded cutoff_deferred every tick; (d) the ledger keeps its table name (day30_shadow_findings) and gains an applied outcome — in enforce it IS the metrics substrate the runbook reads; (e) the pend letter is mandatory like the denial letter: an unresolvable head of household DEFERS the pend (never a letterless clock extension); the letter carries the standard hearing-rights block (273.15 reaches a failure to act); (f) the expedited downgrade is its own ENFORCE-only leg (expedited-downgrade) with a strictly-past predicate (the deadline day is still inside the window) and no event — the stamp is the durable fact, exposed on the program row; (g) finding 7 on the new basis: the agency_fault_pending VARIANT + fleet tolerance ship in the first MR with NO emitter; the eligibility derivation arm (episode present AND no administrative denial ⇒ benefit_effective_date = filing_date) activates in the closing MR — an unknown kind is a hard deserialization error at typed consumers (never a schema_gate park; the plan’s roster row overstated that); (h) the determination-context read gains the per-program administrative_denial_id + agency_pend block (additive, serde(default)), and the WORKER surface gets its own truth — ApplicationProgram.administrative_denial_id on the wire + GET /v1/applications/{id}/agency-pends (episode history, worker-read class) — so a worker surface can render the pend cause / extended clock and the letter’s exact reopen date from records, never from clock divergence or a re-derived window (the canopy-web banner that does so ships in the web commit of the same MR); (i) devstack dials enforce with cutoff 2026-09-01; the Rust live suite derives every deadline from the service’s test clock and skips loudly when a steered day predates the cutoff (the day-30 flow spec, in the e2e commit of the same MR, steers to a post-cutoff epoch); (j) shadow observation record: the devstack ledger held 6 pend_no_interview_scheduled findings from the steered e2e runs and nothing else — recorded in the runbook; (k) the day-30 infra seeds were pinned to the legal-day clock (a UTC CURRENT_DATE seed failed deterministically after 20:00 Eastern — fixed in !1298’s last commit). (l) the (h)(3) derivation arm (the closing MR) made the orchestrator’s provenance PER PROGRAM — arm_for_program over the program’s context block, ProgramClaim per row, the provenance stamped on each program’s dispatch clone — because the pend episode lives on one program row and a sibling program on the same application must not inherit SNAP’s back-date; an order-driven run keeps the order’s anchor (a pend on an ordered row is a worker question, never a silent back-date); (m) decision stamps written by the drains (expedited_downgraded_at, pended_at) take the tick’s injected as_of instant rather than SQL now() — the steered e2e clock caught the wall-clock defect and the fix landed inside !1299 (commit 84cfbff9).
Deduction-only (non-eligibility-critical) open verifications NEVER deny or
pend: the row proceeds to determination without the deduction (3105:601) —
the verification purpose flag (U-VER) carries this split, and the
determination context marks the unproven deduction excluded.
Endpoints + drains
Drain leg canopy-applications.day-30-disposition (fenced daily, after the
NOMI leg; keyset over the U-FOUND partial index; tick budget). Race safety
(finding 18): tx1 stamps disposition_reserved_at (conditional: row
unchanged, still non-terminal) → remote verification batch read (U-VER
exact-caller endpoint) → tx2 applies the arm ONLY IF reserved_at matches and
the row is still non-terminal (a completion/schedule racing in between
clears the reservation via their own writes → drain skips, retries next
tick). Calendar: denials execute on the SOP day or the NEXT business day
when SOP falls on weekend/holiday (WorkdayCalendar; approvals are worker
work, not this drain’s). Manual trigger reused (U-NOMI’s scheduler/run).
Auth: drain in-process; no new public endpoints except the shadow report
read (service-class).
Expedited-downgrade arm (U-D30-B; fires at the EXPEDITED deadline, not day 30)
Consumes U-INT-C’s expedited_window_missed fact + U-FOUND’s
expedited_participation_deadline: rows with a positive expedited screen
whose participation deadline passed without expedited processing completing
(interview completed late, or never, within the expedited window; not
postponed-certified) → stamp expedited_downgraded_at on the program row —
processing simply CONTINUES on the STANDARD clock (never a denial; the
Georgia On-Demand row’s "processed as an unexpedited application" clause).
The disposition classifier below then treats the row as standard. This arm
completes row 2 (georgia.snap.intake.on-demand-interview): the U-INT-C-
authored flow spec gains its downgrade assertion here and the row’s
blocked_by drops HERE. Tests: downgrade-never-denies pin; late-call-by-
day-30 processed-standard pin; the row-2 flow-spec downgrade arm.
(h)(3) pend arm
U-D30-B OWNS the agency_fault_pending basis variant end to end, per
U-PROV’s add-a-variant recipe: the canopy-common variant + signing tolerance
pair + consumer-tolerance MR ordering + the determination-context response’s
pend-episode block (episode id + pended_at + administrative-denial
existence) that the orchestrator derivation reads.
New episode row + extend current_workflow_deadline to today(legal) +
standard days + stage application.pending_agency_delay (per-episode event
id) → NEW agency-pending.typ both rulesets (noa-pending stays orphaned):
still pending, what the agency is completing (cause token → prose), any
household action, benefits back to the filing date if eligible. Re-pend =
new episode + WARN + re-letter; a pended row whose state now matches arms
2/4 is denied (household fault proved post-pend). Back-to-filing on late
approval = U-PROV derivation (episode present + no administrative denial →
benefit_effective_date = legal_filed_date).
Notices
The reopen-rights block on snap/noa-denial.typ SHIPS IN U-DENY (single
template owner); U-D30 adds the render pins for the DRAIN-produced denial
arm (exact 60-day date from legal_filed_date + the owned-by-U-DENY window
key) so both event arms are pinned.
agency-pending route/template; per-episode event ids satisfy the
(source_event_id, notice_type) uniqueness.
Params + citations
None new here: SOP days live in U-FOUND; denial_reopen_window_days is
OWNED BY U-DENY (its denial letter renders the date first in the cutover)
and consumed here; verification_response_days is owned by U-VER-a.
BFF/UI slice
Worker case-detail: disposition banner (pended cause + extended deadline; denial with cure action); the shadow-mode report page (supervisor role, web-side gate) listing would-be dispositions during rollout. A11y: banner role=status; report table with header scope; keyboard focus on pagination.
Shadow rollout (finding 43)
Ships OFF: CANOPY_APPLICATIONS__DAY30_MODE = shadow|enforce|off (boot-
validated). Shadow = classifier runs, writes durable
day30_shadow_findings rows (arm, evidence, would-deny/pend), sends NOTHING,
denies NOTHING. Cutover runbook in the MR: N days of shadow, audited sample
sign-off, backfill/cutoff rule for pre-existing overdue rows (first enforce
tick processes only rows whose SOP falls after a configured cutoff date —
older rows surface on a worker report, never auto-denied), canary (enforce
on lowest-volume day), metrics (dispositions by arm, skips), kill switch
(mode flip), rollback = mode off + shadow rows retained.
Tests
-
The truth table as a table-driven spec (every row above + NULL/None permutations) + proptest totality/disjointness (arbitrary states hit exactly one arm).
-
Race pins: reservation cleared by racing completion → skip; double-tick idempotence; weekend shift pin (SOP Saturday → denial Monday).
-
Shadow-mode pin: no writes beyond shadow rows.
-
Render pins: reopen block exact dates both arms; agency-pending letter.
-
Flow spec
flow-snap-intake-day-30.spec.ts(arms 2/4/6 + re-pend) — binds the 4 flow rows.
Deployment/index notes
Consumer-first inside the family: U-VER (batch read + purpose flag) and U-NOMI (dispatch stamp) MUST be live before enforce mode; shadow mode may ship earlier. Partial indexes per predicate (finding 42).
FINDINGS RESOLVED
-
17: disjoint precedence table, default agency, authoritative interview columns, critical-vs-deduction split, no-action arm for complete files.
-
18: reservation + conditional transition; active join; 3105:334-336 calendar shifts.
-
19 (consumer): denial requires nomi_dispatched_at / dispatched checklist.
-
43: full shadow rollout machinery.
-
3 (consumer): keys on the preserved standard/current_workflow clocks.
-
(h)(3): episode table, re-pend, cause vocabulary, agency-pending letter.
U-REOPEN — 60-day reopen of a procedural SNAP denial
Sub-units: U-REOPEN-a substrate (weight 3) → U-REOPEN-b endpoint + saga + void (weight 5) → U-REOPEN-c BFF/UI (weight 2). Depends on: the admin-denial unit (finding 10/finding 11 evidence matrix + administrative_denial_id), the clocks unit (finding 3/finding 8 legal_filed_date + immutable clocks), the provenance unit (finding 4–finding 6 signed basis), U-DENY (owns denial_reopen_window_days), the verification unit (finding 14 episode-scoped rows + cancel).
1. Purpose + regulatory cites
A household that cures a procedural denial within 60 days of filing gets the denied SNAP episode reopened without a new application: 7 CFR 273.2(h)(2); PAMMS 3105:743-745 (window + cure), 3105:475-479 (later duplicate application voided on reopen), 3105:484-485 (legal filing date). Benefit arms: cure within the standard period → benefits from the filing date; days 31–60 → the cure date becomes the new application date.
2. Data model (canopy-applications)
application_reopen_episodes (append-only; immutable history — rows never updated except state/settle columns via CAS):
| column | type | constraint |
|---|---|---|
id |
UUID v7 |
PK (= the episode id riding the basis variant, finding 6) |
application_id, program |
UUID, TEXT |
FK; CHECK(program='snap') for now (portable widening) |
administrative_denial_id |
UUID |
FK NOT NULL — the denial being cured; must match app+program+active episode (finding 11 discipline) |
cure_kind |
TEXT |
CHECK(verification_provided | interview_completed | attestation) |
cure_evidence |
JSONB |
typed refs: {verification_ids[]} | {interview_id} | {attestation_id}; same app+program (finding 11 analog) |
cured_on |
DATE |
NOT NULL — server-derived, never caller-supplied (§3) |
benefit_effective_date |
DATE |
NOT NULL — arm output (§4 table) |
episode_processing_deadline |
DATE |
NOT NULL — the IMMUTABLE history copy of the fresh clock ( |
reopened_at / reopened_by |
TIMESTAMPTZ / UUID |
claim-derived actor (finding 2) |
dispatch_generation |
BIGINT |
claimed-operation id for basis CAS record-back (finding 6, bulk/store.rs:417 shape) |
resulting_determination_id |
UUID |
NULL until settle; CAS-set on record-back (open→determined) |
state |
TEXT |
CHECK(open | determined | incomplete_closed); partial UNIQUE (application_id, program) WHERE state='open' |
reopen_cure_attestations: id v7 | application_id+program | attested_cured_on DATE | reason TEXT NOT NULL | document refs | attested_by (claim-derived supervisor) | created_at. Durable audited record; audit event staged in-tx.
reopen_sagas (finalize-saga claim_or_resume shape): id | reopen_episode_id UNIQUE FK | step CHECK(local_reopen \| void_later_snap_episodes \| cancel_void_side_records \| dispatch_determination) | state CHECK(running \| awaiting_retry \| incomplete \| complete) | attempt_count | next_attempt_at | claimed_by / claim_expires_at | last_error.
application_programs orthogonal columns (recovery-gate precedent, finding 21): active_reopen_episode_id FK NULL; void columns voided_at, voided_reason CHECK('superseded_by_reopen'), voiding_episode_id + new terminal status token voided (distinct from withdrawn — agency-void ≠ applicant withdrawal, finding 23). All status-enum consumers updated (queues, drains, UI, migrations).
3. Contracts
-
cured_on derivation (finding 20) — closed matrix, fail-closed 422 otherwise:
| cure_kind | authoritative evidence | cured_on |
|---|---|---|
verification_provided |
ALL eligibility-critical verification rows in the denial’s evidence completed |
max(completed_at) as legal date |
interview_completed |
completed/waived interview row superseding the denial’s missed interview_id |
completion/waiver legal date |
attestation |
valid same-app+program attestation row |
attested_cured_on |
-
Window guards use
legal_filed_date(finding 8), neverdate(received_at):denial_date ≤ cured_on ≤ legal_filed_date + denial_reopen_window_days; program row status=denied withadministrative_denial_id+is_procedural()reason. -
Recompute branch (finding 21): store recompute (store/mod.rs:589) stays monotonic EXCEPT one guarded branch — denied→processing permitted iff
active_reopen_episode_idpoints at an open episode. Parent-application recompute derives from surviving program rows only (voided = terminal). -
Basis (finding 5/finding 6):
application_reopen { episode_id, cured_on, benefit_effective_date }variant; signed via the provenance unit’s additive-field ritual; episode settles by CAS on record-back (dispatch_generation match); once state=determined the context read never re-derives the basis (staleness predicate).
4. Endpoints + drains
-
POST /v1/applications/{id}/programs/snap/reopen— body{cure_kind, cure_evidence_refs, attestation_id?, idempotency_key}; no cured_on, no body actor (display only, finding 2). Auth:require_service_or_exchanged(claims, REOPEN_WRITE_ROLES)+ claim-derived actor (reviewer_uuid shape, documents_scan.rs:31). 409 on open episode (same idempotency_key → 200 existing); 409later_episode_approvedwhen a later SNAP episode is approved (enrolled OR approved-not-enrolled — supersession belongs to the continuation primitive per the CONTINUATION RULING; operator guidance in body). Arms:
| arm | predicate | benefit_effective_date |
|---|---|---|
A |
cured_on ≤ legal_filed_date + snap_standard_days |
legal_filed_date |
B |
else, within denial_reopen_window_days |
cured_on |
-
POST …/programs/snap/reopen-attestations— origin-enforced supervisor role array (SCAN_OVERRIDE_ROLES precedent, finding 2/finding 20); creates the audited attestation row. -
GET …/programs/snap/reopen/eligibility— read-only preview: derived cure state, window remaining, arm, computed dates (powers UI, no client-side math). -
Saga steps (finding 22; each idempotent, claim_or_resume on entry, capped exponential retries, then state=incomplete + WARN metric + queue surfacing — no silent compensation; voiding is lawful once granted, so compensation is confined to step-1 guard failures which abort before commit):
-
local_reopen— one tx underpg_advisory_xact_lock(HoH person_id,'snap')(finding 23 serialization; the SNAP program-row filing path takes the same lock): guards + episode insert + denied→processing +active_reopen_episode_id+ saga row + stageapplication.reopened.snap. -
void_later_snap_episodes— same-lock tx: every later NON-TERMINAL SNAP program row of the household →voided+ void columns; stageapplication.snap_episode_voidedper voided row. Application rows and Medicaid/TANF/CAPS rows untouched (finding 23). Denied later rows left alone. -
cancel_void_side_records— cross-service: cancel the voided episodes' SNAP-scoped interview rows (local) + SNAP-program/episode-scoped verification rows via the verification cancel surface using finding 14 natural keys; retried, WARN-never-silent. -
dispatch_determination— automatic post-reopen trigger (finding 21): eligibility application-scoped determine,programs=["snap"], evaluated at legal-today with distinctbenefit_effective_dateinput (finding 4); permanent failure → incomplete + queue surfacing (worker resume = the backstop, never the primary path).
-
-
Saga driver: fenced daily leg
canopy-applications.reopen-saga+ the manual scheduler trigger; keyset paging + tick budget (finding 42). -
Day-30 drain coordination: rows with an open reopen episode key on the single mutable clock
current_workflow_deadline, which the reopen episode reset (fresh clock — else instant re-denial, finding 21); a post-reopen procedural failure produces a NEW administrative denial (new episode chain; history immutable). -
Queue predicates (finding 21): my_queue.rs:74, at_a_glance.rs:102, team_queue.rs:104 gain the reopen arm — denied-with-open-episode and processing-with-open-episode rows surface as "Reopened — determination pending", sorted by the fresh deadline;
voidedrows excluded everywhere.
5. Events + cutover order (finding 7)
| event | change | cutover |
|---|---|---|
|
NEW (app id, episode id, arm, dates, HoH) |
new family: schema_gate + topology-allow; consumers (security event_parsing, web audit/SSE) deploy first |
|
NEW (voided app id, program, voiding episode id, HoH household_id + person_id, reason token |
consumers-first (U-REOPEN-a: notices route + template + render pin, security/web label arms, topology-allow — live before the U-REOPEN-b producer emits) (living spec, U-REOPEN-a: the letter’s three ISO dates + the |
|
new |
two-step: MR1 all basis consumers tolerate the variant (enrollment, renewals, notices, security, web, seeds/test-lib) → MR2 producer emits; #433 replay + parked/DLQ handled by the parking substrate; rollback = stop producer, variant is additive |
6. Notices
-
No reopen-grant letter — the post-reopen determination NOA is the household notice; the 60-day right itself renders on the denial notice (day-30 unit).
-
Void letter (finding 23 household informed): new
snap/reopen-supersession-void.typ, both rulesets, routed in both manifests (#1101) onapplication.snap_episode_voided— plain language: the earlier application was reopened; the later duplicate SNAP request is merged/void; other programs on that application unaffected; no action required; hearing-rights block. No discriminator needed (dedicated event type); uniqueness = (source_event_id, notice_type).
7. Params + citations
-
No new keys.
denial_reopen_window_days(273.2(h)(2); PAMMS 3105) stays OWNED by U-DENY — its denial letter renders it first; U-REOPEN consumes (finding 41 owned-before-consumed holds via the dependency edge).snap_standard_daysreused for arm A and the fresh clock. Saga retry caps/backoff = service config, not ruleset policy.
8. BFF-UI slice (finding 40) — U-REOPEN-c
-
Exchanged-token routes on canopy-web’s existing per-application action surface:
POST /applications/{id}/snap/reopen,POST …/snap/reopen/resume(incomplete-saga retry),POST …/snap/reopen-attestations; all writes WritePermission + CSRF + ProgramScope(snap); attestation UI behind the supervisor role only. The eligibility preview and the episode history are read SERVER-SIDE while the process page renders (no browser-facing GET — the page never computes a date). The service-side resume endpointPOST /v1/applications/{id}/programs/snap/reopen/resume(worker write class) lands with this slice. -
Denied-case view: reopen panel shows server-derived cure evidence, arm + dates preview, disabled-with-reason when window lapsed/evidence absent; incomplete-saga banner with resume action; queue chips per §4.7.
-
A11y: dialog keyboard-operable with focus trap + return-to-trigger; errors programmatically associated (aria-describedby); success/failure announced via live region; status chips never color-only.
9. Tests
-
Proptest (mandatory): window/arm totality — arbitrary (legal_filed_date, denial_date, cured_on) lands in exactly one of {arm A, arm B, window-refused, guard-refused}; invariants benefit_effective_date ≥ legal_filed_date, arm A ⇒ = filing date, arm B ⇒ = cured_on, fresh deadline > cured_on.
-
cured_on derivation truth table = the spec (§3 matrix + refusal rows: open/cancelled verification, wrong-app attestation, non-procedural denial).
-
Race + idempotency pins: duplicate POST same key → one episode; concurrent distinct keys → one 201 + one 409; reopen vs concurrent SNAP filing under the advisory lock (both interleavings); approved-not-enrolled later episode → 409; saga double-claim (one driver wins); crash-between-steps resume completes 3–4; each step replay-idempotent; dispatch permanent failure → incomplete + queue-visible; CAS settle rejects stale generation.
-
Recompute: denied→processing only with open episode; monotonic regression pin otherwise.
-
Void: later app with SNAP+Medicaid → only SNAP row voided, application + Medicaid survive; void letter render pin; voided rows excluded from all three queues + all drains.
-
Cross-service pin: determination event carries the signed reopen basis + benefit_effective_date; enrollment persists them. Legal-clock pins for the fresh deadline through the day-30 drain (3105:334-336). Query-plan regression for the three queue queries (finding 42).
10. Deployment + index notes
-
Multi-MR shape (finding 41 — cross-service saga): MR1 (U-REOPEN-a) dormant substrate: tables, derivation fns, recompute branch, queue predicates, basis-variant tolerance in all consumers, topology/schema_gate, void status token consumers. MR2 (U-REOPEN-b) activation: endpoint, saga + driver, producer emits, notice template+routes. MR3 (U-REOPEN-c) BFF/UI. Day-30 unit deployed first (param + drain).
-
Indexes (finding 42): partial UNIQUE episodes(app,program) WHERE open; application_programs partial ON (active_reopen_episode_id) WHERE NOT NULL (queue + drain predicate); reopen_sagas keyset (next_attempt_at) WHERE state IN (running, awaiting_retry); void columns covered by existing status indexes (verify plan).
11. Out of scope
Supersession of an APPROVED later episode (continuation primitive per the CONTINUATION RULING); multi-month restoration (#1113); event-path initial-month proration (the issuance unit per finding 31); recert reopen (F1 re-fence); non-SNAP reopen (schema portable, CHECK widening later).
12. FINDINGS RESOLVED
-
20: cured_on server-derived from completed verification/interview records (closed matrix, fail-closed); attestation fallback is a separately-authorized (origin-enforced supervisor), durable, audited row — no caller date anywhere.
-
21: explicit episode table + orthogonal
active_reopen_episode_id; guarded episode-aware denied→processing branch; fresh clock (current_workflow_deadline reset by the episode; episode_processing_deadline is the history copy) keyed by the day-30 drain; automatic saga-step determination dispatch with worker-queue surfacing as backstop; append-only episodes/attestations; my_queue/at_a_glance/team_queue predicates updated. -
22: reopen_sagas table in the finalize-saga claim_or_resume shape — durable ordered steps, idempotent replays, capped retries, explicit
incompletestate surfaced to the queue, compensation confined to pre-commit guards. -
23: void = new terminal
voidedstatus + void columns on the later SNAP program row only; application + sibling program rows survive; distinct agency-void event + household PAMMS letter (3105:475-479); approved(-not-enrolled) later episodes → 409 to the continuation primitive; HoH+program advisory lock serializes reopen against concurrent filing.
Row flip: reopen-within-60-days (flow) via flow-snap-intake-reopen.spec.ts (both arms asserted from the signed basis + enrollment cert start; void interleave included). Allowlist flip: reopen-within-60-days.
IMPLEMENTATION NOTES (#1655 U-REOPEN-a, living spec): (a) the episode row carries the resolved arm token beside benefit_effective_date (the table’s output is otherwise unrecoverable from the anchor alone) and a settled_at; state = determined ⇔ resulting_determination_id present is a CHECK; (b) the roll-up’s guarded branch keys on an OPEN episode (application_programs.active_reopen_episode_id → state = 'open'), pulling a determined parent back to processing — the only non-monotonic transition; (c) voided joins the shared Rust vocabulary TERMINAL_PROGRAM_STATUSES (one spelling for every CAS and the day-30 SQL consts via the agreement pin) and the DB CHECK gains status = 'voided' ⇔ voided_at IS NOT NULL; (d) the queue predicate rides Application.reopen_pending (an EXISTS over open episodes on the list/detail reads) because the flat list model carries no program rows; the fresh clock stays on the program row; (e) the store ships the whole dormant surface (episode insert / open lookup / CAS settle / incomplete close, attestation insert / scoped read, saga insert / claim_or_resume / advance / fail, void_snap_row, reopen_program_row) so U-REOPEN-b is endpoint + saga orchestration + producer only; (f) the void letter and both event families' topology/consumers land in the sibling commits of this MR (finding 7 rule ii — consumers with-or-before producers), the producer in U-REOPEN-b; (g) settling or closing an episode clears the row’s active_reopen_episode_id, so reopen_pending and the roll-up guard turn off with the episode; (h) every saga step transition is fenced to the LIVE lease holder (claimed_by + unexpired lease) — a lapsed holder writes nothing.
IMPLEMENTATION NOTES (#1656 U-REOPEN-b, living spec): (a) the reopen is ONE tx under the household’s pg_advisory_xact_lock (the plan’s serialization) that also opens the saga at its SECOND step — step 1 (local_reopen) IS that tx, so the saga row never re-runs it; (b) the saga is driven INLINE right after the commit (the worker sees the void + determination in the same request when they succeed) and again by the fenced leg canopy-applications.reopen-saga (+ the scheduler/run token) for anything that stalled — the plan’s "driver" is both; (c) the void step stamps a per-row voided_letter_event_id (the application.snap_episode_voided envelope id) and SKIPS the publish when the stamp is already set, so exactly one letter per voided row survives retries; the interview sweep for a voided row closes with the reason superseded_by_reopen (the application row survives the void, so the pre-existing application_terminal reason would be false); (d) the cure-date derivation reads the DENIAL’s own evidence: the verification arm through canopy-verification’s exact-caller batch context filtered to denial.verification_ids, the interview arm by walking the supersession chain from denial.interview_id to its terminus (completed OR waived — U-REOPEN-b adds the waived_at stamp the plan’s matrix needs), the attestation arm by id, application-scoped; (e) the preview endpoint derives the same facts for all three kinds — the attestation arm previews the NEWEST attestation on record (a reopen still names the id it means) — so the UI renders coded refusals rather than computing anything; (f) benefit_effective_date is resolved ONCE by the window/arm table and carried on the episode — the eligibility derivation reads it from the context block rather than re-deriving, and a denial closing the episode makes the row fall through to determination_day exactly as a pend does; (g) the reopen basis settles its episode by CAS in the record-back handler as well as in the saga (scoped to the recording application + program), so a worker-run determination settles the episode the same way the automatic one does; (h) the household reopen lock is taken by the reopen tx and the void step only — the SNAP filing path does not take it yet, so finding 23’s serialization against a concurrent duplicate filing is half-established (follow-up #1683); the APPROVAL writer does not take it either, so the void step re-runs the later-approved check under the lock and abandons the saga to incomplete rather than voiding an episode the continuation primitive owns; (i) the reopen-saga leg runs on a five-minute advisory-locked tick, NOT a daily window fence — a retry queue whose tick is coarser than its back-off can never honour that back-off, and double-running is a no-op under the lease; (j) row 7’s flow spec drives arm A through the SUPERVISOR ATTESTATION and arm B through the EVIDENCE-DERIVED interview completion — possible only because #1684 made interview/complete stamp completed_at from the service’s decision clock (it was SQL now(), the wall clock, which a clock-walked spec could not drive truthfully); the waiver cure and every coded refusal ride the service-level suite, bound beside the spec on the same row; the SUCCESSFUL verification-provided cure is driven nowhere yet (it needs a household-fault verification denial plus a resolved item under the steered clock) — #1687; (k) a PENDING determination completes the saga (the household owes verification; the episode stays open on its fresh clock), and the saga’s record-back is guarded on the program row still pointing at its episode so a worker’s concurrent verdict is never overwritten.
Erratum (2026-09-08): note (j) — the SUCCESSFUL verification-provided cure is now driven end to end too (#1687): the row-7 flow spec’s fourth test builds a household-fault verification denial (interview held; one eligibility-critical checklist item dispatched and past due on the SOP day), resolves the item under the steered clock on day 45, and asserts the arm-B reopen from the derived cured_on down to the certification start.
IMPLEMENTATION NOTES (#1657 U-REOPEN-c, living spec): (a) the routes follow canopy-web’s existing per-application action naming (/applications/{id}/snap/…, beside /snap/deny) rather than the plan’s /bff/… prefix — there is no /bff surface in the portal and the route-authz audit classifies by the existing shape; (b) the preview is not a browser-facing GET: the process page fetches the history (always, for a row that ever reopened) and the preview (only for an administratively denied row) server-side and renders coded refusals as prose, so the panel degrades honestly ("preview unavailable", page marked incomplete) instead of failing the page; (c) the service-side reopen/resume endpoint did not exist after U-REOPEN-b (the saga’s incomplete state was reachable only by the leg’s resume path in tests) — it lands here as the plan’s "incomplete-saga retry" needs a write to call; the store’s resume_saga is a single guarded statement (state = 'incomplete' → awaiting_retry, attempts reset, due now); the no-double-drive property is claim_or_resume's FOR UPDATE + lease, which the inline drive and the leg both pass through; (d) the preview’s attestation row carries its attestation_id (additive) so the confirm dialog posts exactly the record the worker saw; (e) refusal copy is server-owned and keyed on the origin’s RFC 9457 code (api/actions_reopen_copy.rs), never the upstream’s message — the recovery affordance names the on-page panel (interview / verification) the worker must visit; (f) the attestation form offers no document picker (empty document_ids) — supporting documents ride the documents panel; a picker is not in this slice.
U-CONT — General enrolled-household continuation primitive (split: a=5, b=3, c=3; total 11)
Sub-units (D1): U-CONT-b downstream consumers FIRST: every contract change (incl. the shared causal helper in canopy-common), notices, renewals, security/web tolerance, broker ACLs (weight 3) · U-CONT-a enrollment core: issuance kind + supplement, enrollment_continuations + lineage, the reduction enact tail, denials, the read endpoint + BFF panel (weight 5) · U-CONT-c first consumer: the in-cert conversion derivation, the snap.case_closed suppression, the applications claim/settle, e2e (weight 3). Deploy order b→a→c (consumer-first; every new event is dormant until a emits, every new basis kind until c emits). Ownership is marked (b), (a), (c) on every item below.
1. Purpose + regulatory cites
A new signed determination for an already-ENROLLED household carrying a continuation-class basis applies IN-PLACE (amount + certification end) to the live snap_enrollments row under the lifecycle_revision fence — never a second live row, never a park. Increases/extensions apply immediately; reductions, shortenings and continuation-class DENIALS route through the EXISTING adverse-action pipeline (enrollment_pending_terminations, 7 CFR 273.13 advance notice + CB, PAMMS 3705), which this unit extends with a NON-terminating reduction enact tail (today the tail always sets status = 'terminated', services/canopy-enrollment/src/adverse_actions.rs:1011-1048). Cites: 273.13(a)(1)-(2) (timely notice; adequate-notice content), 273.12(c) (increase timing; supplemental issuance), 274.1(h)(4) (each issuance identified as initial / supplemental / replacement / restored), 273.15(k) (continued benefits), 273.2(i)(4)(iii) (postponed-verification conversion — the first consumer), 273.10(f) (certification periods), 273.14(b)(1) (NOE), PAMMS 3110:140-143 (conversion letter promise), 3110:103 (post-cert verification is NOT this — normal processing), 3705. FNS SIRT element ids appear in FINDINGS as pointers only: the SIRT is FNS technical assistance — the CFR and state policy govern (D14).
2. Data model
enrollment_continuations (a) — canopy-enrollment, migration 20261225000000_continuations_and_issuance_kind.sql (forward-only, ADR-016):
| column | type | constraint |
|---|---|---|
id |
UUID |
v7 PK ( |
enrollment_id |
UUID |
FK snap_enrollments, NOT NULL |
determination_id |
UUID |
NOT NULL; UNIQUE (enrollment_id, determination_id) — apply-once |
operation_id |
UUID |
NOT NULL UNIQUE — the claimed |
previous_determination_id |
UUID |
NULL — the event’s lineage input (D4) |
determined_at |
TIMESTAMPTZ |
NOT NULL — the continuing determination’s instant; an event without it is a DLQ (D4) |
basis_kind |
TEXT |
NOT NULL CHECK (basis_kind IN ('in_cert_conversion')) — the literal set duplicates |
upstream_application_id |
UUID |
NOT NULL — the canopy-applications id (never the SNAP-local id; D8); an event without it is a DLQ (§4) |
postponement_episode_id |
UUID |
NULL; CHECK basis_kind = 'in_cert_conversion') = (postponement_episode_id IS NOT NULL |
eligible |
BOOLEAN |
NOT NULL — |
previous_amount |
NUMERIC(10,2) |
NOT NULL (mirrors |
new_amount |
NUMERIC(10,2) |
NULL; CHECK classification = 'termination_staged') = (new_amount IS NULL |
previous_end |
DATE |
NOT NULL ( |
new_end |
DATE |
NULL; CHECK classification = 'termination_staged') = (new_end IS NULL |
benefit_effective_date |
DATE |
NOT NULL (from the signed envelope) |
classification |
TEXT |
NOT NULL CHECK (classification IN ('immediate','reduction_staged','extend_now_reduce_later','termination_staged','no_change')) |
adverse_action_id |
UUID |
NULL FK enrollment_pending_terminations; CHECK (classification IN ('immediate','no_change') OR status IN ('superseded','cancelled') OR adverse_action_id IS NOT NULL) |
status |
TEXT |
NOT NULL CHECK (status IN ('applied','staged','partially_applied','superseded','vetoed','cancelled')) |
lifecycle_revision_before, lifecycle_revision_after |
INTEGER |
|
supplemental_issuance_id |
UUID |
NULL FK snap_benefit_issuances, UNIQUE — exactly-once supplement |
applied_at, created_at |
TIMESTAMPTZ |
|
Same migration (a):
-
snap_enrollments.determined_at TIMESTAMPTZ NULL— stamped at auto-enroll from the event’sdetermined_atand re-stamped on every applied continuation (D4). -
snap_benefit_issuances.issuance_kind TEXT NOT NULL DEFAULT 'regular' CHECK (issuance_kind IN ('regular','supplemental','replacement','restored'))— 7 CFR 274.1(h)(4) withregularas the ongoing default; the prorated first row isregularflagged by the existing proration fields;replacement/restoredare vocabulary only (no writer in this unit). Plussupplemental_of_continuation_id UUID NULLwith partial UNIQUE (WHERE supplemental_of_continuation_id IS NOT NULL) and CHECK issuance_kind = 'supplemental') = (supplemental_of_continuation_id IS NOT NULL. -
idx_snap_issuances_enrollment_month(20260401000000:53, total UNIQUE) is DROPped and re-created UNDER THE SAME NAME as UNIQUE(enrollment_id, benefit_month) WHERE issuance_kind = 'regular' AND issuance_status <> 'cancelled'—store.rs:33ISSUANCE_MONTH_UNIQUE_CONSTRAINTmaps its 23505 to the 409benefit_month_already_issued; a renamed index would surface as a 500.snap_issuances_no_overlapping_coverage(20261222000000:36-45) is re-created withWHERE (issuance_status <> 'cancelled' AND issuance_kind = 'regular'). A plain index(enrollment_id, benefit_month)over ALL rows serves the kind-agnostic readers (store.rs:759,:1232; both in §10’s EXPLAIN check) (D3). -
enrollment_pending_terminationsgainsproposed_benefit_amount NUMERIC(10,2) NULL,target_certification_end_date DATE NULL, CHECK action_type = 'reduction') = (proposed_benefit_amount IS NOT NULL NOT VALID (pre-existing devstackreductionrows), CHECK (target_certification_end_date IS NULL OR action_type = 'reduction') (D2).
snap_certification_adjustments (b) — canopy-renewals, migration 20261224000000_snap_certification_adjustments.sql; ONE row per ACCEPTED event, the complete history (D7):
| column | type | constraint |
|---|---|---|
id |
UUID |
v7 PK |
certification_id |
UUID |
NULL FK snap_certifications; CHECK outcome = 'pending_certification') = (certification_id IS NULL |
household_id, certifying_determination_id, determination_id |
UUID |
NOT NULL |
person_id |
UUID |
NOT NULL — the event’s recipient, kept so a pending row can be re-run through the adjuster at create-path reconciliation (the at-adjust NOE recipient) |
basis_kind |
TEXT |
NOT NULL — kept for the same reason (the type-flip discriminator) |
applied_via |
TEXT |
NOT NULL CHECK (applied_via IN ('immediate','adverse_action_enacted')); UNIQUE (determination_id, applied_via) — replay belt 1 |
source_event_id |
UUID |
NOT NULL UNIQUE — replay belt 2 (the envelope id) |
outcome |
TEXT |
NOT NULL CHECK (outcome IN ('applied','no_change','stale','superseded_by_new_certification','pending_certification')) |
continuation_watermark |
INTEGER |
NOT NULL — the event’s |
determined_at, previous_determination_id |
TIMESTAMPTZ, UUID |
|
new_end, new_type |
DATE, TEXT |
|
prior_end, prior_type |
DATE, TEXT |
NULL iff |
prior_interim_contact_due_date, new_interim_contact_due_date |
DATE |
NULL |
prior_periodic_report_required, new_periodic_report_required |
BOOLEAN |
NULL |
interim_contact_action |
TEXT |
NULL CHECK (interim_contact_action IN ('unchanged','rescheduled','skipped_past')) |
noe_action |
TEXT |
NOT NULL CHECK (noe_action IN ('none','released_to_drain','staged_at_adjust')) |
noe_fence_cleared |
BOOLEAN |
NOT NULL DEFAULT false; CHECK (noe_fence_cleared = (prior_expiration_notice_sent_date IS NOT NULL)) |
prior_expiration_notice_sent_date, prior_noe_source_event_id, prior_noe_dispatched_at, prior_noe_dispatched_date |
DATE, UUID, TIMESTAMPTZ, DATE |
the fence QUARTET snapshot; CHECK (prior_noe_dispatched_at IS NULL OR prior_noe_source_event_id IS NOT NULL); partial UNIQUE on |
new_noe_source_event_id |
UUID |
NULL — the at-adjust NOE’s envelope id; CHECK noe_action = 'staged_at_adjust') = (new_noe_source_event_id IS NOT NULL |
prior_renewal_notice_sent_date |
DATE |
NULL — snapshot when the renewal-due fence was cleared |
applied_at |
TIMESTAMPTZ |
NOT NULL DEFAULT now() |
Belt CHECK: outcome IN ('applied','no_change') OR (noe_action = 'none' AND noe_fence_cleared = false) — stale / superseded_by_new_certification / pending_certification never touch a fence. Indexes: (certification_id, applied_at); partial (household_id, certifying_determination_id) WHERE outcome = 'pending_certification' (create-path reconciliation).
Column additions (b): snap_certifications.continued_by_determination_id UUID NULL — the LATEST continuing determination the adjuster accepted for this cert (applied or no_change; overwritten each time; a read-model/audit column with a plain partial index WHERE NOT NULL — NOT the create-path guard, which reads snap_certification_adjustments.determination_id, §3.11) — and snap_certifications.continuation_watermark INTEGER NULL (advance on applied and no_change); snap_certifications.determined_at is RE-STAMPED by the adjuster with the continuing determination’s instant (documented: the latest applied determination’s instant).
canopy-notices (b) — migration 20261224000000_work_item_superseded.sql: notice_work_items status CHECK DROP+ADD to ('pending','done','failed','skipped','superseded') (the 20261128000000:16-19 shape); notices.delivery_status gains the value superseded (the column carries no CHECK — 20260401000000:26; the data-model page documents the vocabulary).
canopy-applications (c) — migration 20261226000000_postponement_conversion_claim.sql: application_postponement_episodes gains conversion_generation BIGINT NULL + conversion_claimed_at TIMESTAMPTZ NULL (the CLAIM, stamped at the release — the DeterminationOperationId does not exist yet: canopy-eligibility mints it after the context read), conversion_operation_id UUID NULL + conversion_determination_id UUID NULL + conversion_settled_at TIMESTAMPTZ NULL (the SETTLE, stamped by the record-back); CHECKs (conversion_generation IS NULL) = (conversion_claimed_at IS NULL), conversion_generation IS NULL OR conversion_generation > 0, (conversion_operation_id IS NULL) = (conversion_determination_id IS NULL) AND (conversion_determination_id IS NULL) = (conversion_settled_at IS NULL), conversion_determination_id IS NULL OR conversion_generation IS NOT NULL, conversion_generation IS NULL OR (state = 'completed' AND resulting_determination_id IS NOT NULL); partial index (conversion_determination_id) WHERE NOT NULL; the settle CAS is the UPDATE predicate conversion_generation = $gen AND conversion_determination_id IS NULL (no (id, conversion_generation) UNIQUE — redundant with the PK; D9 amended in the #1660 notes). postponement_sagas.step CHECK widens to dispatch_conversion (the terminal step the release enters).
3. Contracts
-
Basis variant
(b):EffectiveDateBasis::InCertConversion { episode_id: PostponementEpisodeId, generation: i64 }(kind tokenin_cert_conversion; field order IS the pinned wire form;generation= the episode’sconversion_generation— finding-6 parity withExpeditedPostponed; NOoperation_id(the envelope signs the claimed op id and the event carries it) and NO application id (the event carriesupstream_application_idsince #1662)). Beside it:pub const CONTINUATION_CLASS_KINDS: &[&str] = &["in_cert_conversion"]andfn continuation_class(&self) → bool(D13 — the Rust const is the reference for the DB CHECK and both manifests). Every hand-enumerated basis list gains the variant in b: the serde pin +arb_basis+ kind-loop test in canopy-common; contracts-snaparb_basis/basis_mirrors(certification_monthsNone); the webeffective_notearm (services/canopy-web/src/determination_view.rs:1074, canopy-web’s onlyEffectiveDateBasismatch —verification_panel.rs's badge keys on the EPISODE kind and needs no arm); the e2e union intests/e2e/lib/given/determine.ts; the notices routing-pin payload builders. Signed via the additive-field ritual + frozen RFC8785 KAT (U-PROV owns the envelope; U-CONT adds only the variant). -
Wire typing
(b)(D8, all in canopy-contracts-enrollmentevents.rs): closed enumsAppliedVia { Immediate, AdverseActionEnacted },ContinuationOutcome(the §2 adjustmentoutcomeset),IssuanceKind { Regular, Supplemental, Replacement, Restored },ActionType { Termination, Reduction }(allsnake_case;AdverseActionScheduledV1.action_typebecomesActionType— byte-identical wire); money =rust_decimal::Decimalserialized as a 2-dp string through a validating deserializermoney2(non-negative, scale ≤ 2, else error);Supplement { issuance_id: IssuanceId, amount: Decimal, month: NaiveDate }as ONEOption(all-or-none by type);fn validate(&self, envelope_programs: Option<&[String]>) → Result<(), ContractViolation>on every NEW payload —program == "snap", envelope programs ==["snap"], date ordering (certification_start_date ≤ previous_certification_end_date,≤ new_certification_end_date,benefit_effective_date ≥ certification_start_date),supplement.monthfirst-of-month,postponement_episode_id.is_some() == (basis_kind == "in_cert_conversion"),basis_kind ∈ CONTINUATION_CLASS_KINDS,lifecycle_revision_after ≥ 1. EVERY consumer calls it before acting; a violation is a DLQ. Pins: frozen wire JSON per type, negative-validation pins, vocabulary pins, proptest roundtrips. -
Delta classification
(a)(pure fn, canopy-enrollment domain) — DISJOINT, TOTAL truth table (finding 17). Inputs:status ∈ {approved, denied}(any other status on a continuation-class kind → DLQ, D5), ΔA = new − current amount, ΔE = new_end − current end:
| status | ΔA | ΔE | classification | apply |
|---|---|---|---|---|
denied |
— |
— |
termination_staged |
termination action ( |
approved |
≥0 |
≥0, not both zero |
immediate |
one CAS tx: amount + end date now; supplement per §3.8; |
approved |
<0 |
>0 |
extend_now_reduce_later |
end-date extension NOW under the CAS (benefits continue at the prior level through the advance period — the 273.13 CB posture; deferring the extension would lapse the cert mid-notice) + |
approved |
<0 |
=0 |
reduction_staged |
nothing to extend: the amount change at enact — |
approved |
any |
<0 |
reduction_staged |
cert-end shortening is adverse: the whole change at enact — |
approved |
=0 |
=0 |
no_change |
record row, settle op, NO revision bump, NO event, NO letter (unreachable for |
-
Apply op
(a)apply_continuation(tx, enrollment_id, expected_revision, continuation_id)— single store fn, two callers (subscriber immediate path; the reduction enact tail):UPDATE snap_enrollments SET monthly_issuance_amount = $2, certification_end_date = $3, determined_at = $4, lifecycle_revision = lifecycle_revision + 1, updated_at = now() WHERE id = $1 AND lifecycle_revision = $5 AND active = true AND status IN ('pending_issuance','active','suspended') RETURNING *(the full live predicate,20260801000000:51-54). Zero rows → the household left the live set → rowcancelled(the enrollment row is heldFOR UPDATEby every caller, so alifecycle_revisionmismatch cannot occur;expected_revisionstays in the predicate as the fence’s belt — a mismatch is a programming error → DLQ, never retried). -
Causal supersession:
canopy_common::causal::{Lineage, Incoming, supersedes}(b)lifted verbatim from renewals' former privatecausal_supersedes(determination_subscriber.rs, pre-lift lines 226-234):supersedes(current, incoming) = incoming.previous_determination_id == Some(current.determination_id) || current.determined_at.is_some_and(|at| incoming.determined_at > at)— newer iff the incoming names the current as antecedent OR its instant is strictly later; equal/older → false (D4). Enrollment’s use(a):current= the newestenrollment_continuationsrow with status IN ('applied','staged','partially_applied') bydetermined_at, else the enrollment itself (determination_id,determined_at— NULL on a pre-a row falls back tocreated_at, a lower bound on the certifying instant). Older/equal → the continuation row is recordedsuperseded, nothing applies. A newer arrival while astaged/partially_appliedrow exists: in the same tx and BEFORE the new action is inserted (one open action per enrollment,20260724000000:17-19),cancel_lockedthe old action with the pinnedCANCEL_REASON_SUPERSEDED_BY_NEWER_DETERMINATION = "superseded_by_newer_determination"+AdverseActionCancelledV1; the old row →superseded(an already-applied extension is retained — never adverse). Renewals' determination arm is the first call site (b), enrollment’s the second (a) — the renewalshandlefilters the active cert’sActiveCertLineage::lineage()against the event’sIncoming(a pure lift, no behaviour change); the adjuster itself orders bycontinuation_watermark(§3.9). -
Adverse staging
(a): in-processcreate_adverse_actionwithActionSourceClaim { created_source: "continuation", source_reference: continuation_id, source_generation: 0 }(a new determination is a new continuation id, so generation 0 never collides),action_typeper the table, recipient =head_of_household_person_id,enact_not_before= floor.derive_schedule(adverse_actions.rs:1263-1276) gains thecontinuationarm:source_referencemust parse as a UUID (elseBadSourceReference), anexemptionclaim is refused (never advance-notice exempt),cb_available = reason_cb; a newScheduleOrigin { Http, InProcess }parameter refusescreated_source = continuationover HTTP (422source_not_claimable_over_http). The schedule API requiresproposed_benefit_amountfor areduction(422reduction_requires_proposed_amount) and refusestarget_certification_end_dateover HTTP (422target_end_not_claimable_over_http— no renewals consumer exists for a worker reduction’s end change). Stay/veto unchanged: stays hold enactment; a veto → continuationvetoed(an applied extension is retained); a worker cancel of the action → continuationcancelled. -
Enact tails
(a)— insideenact_gate_locked(:1883-1987) after every gate passed (guarded_enact(a)locks the enrollment’spendingissuance rowsFOR UPDATE ORDER BY idbetween its unlocked peek and the enrollmentFOR UPDATEwhenpeek.action_type = 'reduction'— the D16 order; a termination touches no issuance row here), branch onaction.action_type(D2): termination → today’senact_locked+AdverseActionTerminatedV1; whencreated_source = continuationalso: continuation →appliedwithlifecycle_revision_after,ContinuationTerminatedV1, andsnap.case_closed(§5) in the same tx. reduction →apply_continuation-shaped UPDATE:monthly_issuance_amount = proposed_benefit_amount,certification_end_date = COALESCE(target_certification_end_date, certification_end_date),determined_atre-stamped for a continuation source, under the live predicate + revision bump; actionenacted+ signalenacted(reduced_to=…); pending re-mint (§3.8 step c, floor = the enacted month);created_source = continuation→ continuationapplied+ContinuationAppliedV1 { applied_via: adverse_action_enacted }; any othercreated_source(worker,periodic_report) →AdverseActionEnactedV1.terminated_date/ enacted date = the noticeddue;partial_retentionstays termination-only;is_terminable(:1003) keeps gating both (the live matrix). -
Supplement + pending re-mint
(a)(D2/D3) — every step runs under the D16 lock order (the enrollment’spendingissuance rowsFOR UPDATE ORDER BY id→ the enrollment rowFOR UPDATE→ action rowsORDER BY id;expiry_sweep.rs:210-214,adverse_actions.rs:15-18; the enrollment id from an UNLOCKED peek, theguarded_enactpattern:2105; the live predicate re-checked after the enrollment lock). Anissuedprorated first row is never touched or re-prorated. On animmediateapply with ΔA > 0, effective monthm = first_of_month(benefit_effective_date):-
The regular row covering
m(SnapBenefitIssuance::covered_months,crates/canopy-contracts-enrollment/src/models.rs:181— a combined row covers month+1) isissued→ INSERT ONEsnap_benefit_issuancesrow{ issuance_kind: 'supplemental', supplemental_of_continuation_id, benefit_month: m, allotment_amount: (new − previous) × (proration_days_remaining / proration_days_total when the covered row is prorated, else 1; the `prorate_month_fromrounding,issuance.rs:89), issuance_status: 'pending', expiry_date: benefit_expiry_date(params, today) }`,supplemental_issuance_idset; the settlement pass drives it. A combined row keyed onmthat also coversm+1(#1722) mints ONE supplemental row in the combined shape (combined,benefit_months_covered = 2,covered_next_month_amount= them+1part):(new − previous) × frac(m)+(new − previous)form+1(never prorated),allotment_amount= the total; the event’ssupplement.months_covered = 2. -
The row is
pending→ cancel + re-mint instead (step c), no supplement — including a still-pendingprorated initial row, which is re-minted with its proration fields applied to the new amount. -
EVERY
pendingregular row of the enrollment withbenefit_month ≥ m(immediate apply) orbenefit_month ≥ first_of_month(enacted date)(reduction tail — earlier pending months keep the noticed amount; reductions are never retroactive) whose amount ≠ the new amount for that row (a prorated initial row compares against the new amount × its proration fraction) →issuance_status = 'cancelled',issuance_error = 'superseded_by_continuation', and a NEW regular row (new id) for the same month at the new amount — EBT idempotency is per issuance id; an in-place rewrite would replay the old transfer. -
A SEPARATE issued regular row for a month after
m→ DLQ (one legal supplement per event; #1722 made the combined row’s own month+1 legal — the covering row is identified FIRST and the guard judges only other rows; a real defect for a #1133 adopter).
-
-
Renewals adjuster
(b)— consumer ofenrollment.continuation_appliedon queuecanopy-renewals.continuations(D7); one tx, in this order:-
validate()(§3.2) → violation DLQ. -
SELECT pg_advisory_xact_lock(hashtext(household_id::text))— b ADDS the same statement as the first line ofcreate_with_supersede(cert_create.rs:136takes no lock today; both callers — the manual POST and the expedited arm indetermination_subscriber.rs— inherit it), so guard-then-write is atomic across all three writers (thereopen_saga.rs:113precedent). -
Replay belts:
source_event_idseen → ack;(determination_id, applied_via)seen → ack. -
The cert =
snap_certifications WHERE determination_id = certifying_determination_id AND active = true(thesnap_certs_one_per_determinationkey); none → rowpending_certification(certification_id,prior_*,new_typeNULL), ack;status <> 'active'→ rowsuperseded_by_new_certification, no cert change. -
Desired state:
new_end = new_certification_end_date;new_type = standardiffbasis_kind == in_cert_conversionANDcertification_type == expedited, else the cert’s type; direction (extension vs shortening) is judged against the CERT’s current end — the event’sprevious_certification_end_dateonly feeds a WARN when it disagrees. -
new_end == end && new_type == type→ outcomeno_change, still advancingcontinued_by_determination_id,continuation_watermark,determined_atthrough the CAS below (every other column unchanged). -
Else the CAS — zero rows → re-read →
status <> 'active'→superseded_by_new_certification, elsestale:UPDATE snap_certifications SET certification_end_date = $new_end, certification_type = $new_type, determined_at = $determined_at, continued_by_determination_id = $det, continuation_watermark = $w, interim_contact_due_date = <step 8>, periodic_report_required = <step 8>, renewal_notice_sent_date = <NULL when set and the end changed, else unchanged>, <fence columns per step 9> WHERE id = $1 AND status = 'active' AND active = true AND (continuation_watermark IS NULL OR continuation_watermark < $w) RETURNING *A cleared
renewal_notice_sent_dateis snapshotted toprior_renewal_notice_sent_date(the renewal-due drain re-emits inside its lookahead);interim_contact_notice_sent_dateis left as is (informational). -
Derived fields (pure fns of type/start/end/params,
cert_create.rs:189-224): on a type flipinterim_contact_due_date := certification::interim_contact_due_date(params, start, Standard)only when that date > legal today (else unchanged,interim_contact_action = skipped_past);periodic_report_required := periodic_reports::periodic_report_required(policy, new_type, start, new_end); atrue → falseflip runs the newperiodic_reports::cancel_open_for_certification(cert_id, "certification_adjusted")(WHERE certification_id = $1 AND status NOT IN ('processed','terminated','cancelled'));false → truemints nothing (materialize_cyclespicks the cert up);reporting_modelunchanged. -
NOE — the fence is SET iff
expiration_notice_sent_date IS NOT NULL(post-20261221000000writers stamp the whole quartet —store.rs:416-426,noe.rs:98-100; an older row may carry the date alone). The decision is the 8-row table over (direction) × (fence set?) × (owed:noe::owed_at_certification(start, new_end)OR the #792 drain window (noe::drain_owns) fornew_endalready open/past at legal today): extension+set+owed → clear-and-stage; extension+set+not-owed → clear-only (released_to_drain); extension+unset+owed → stage-only; extension+unset+not-owed →none; shortening+set → clear-and-stage in both owed cases (the household was told a later end); shortening+unset+owed → stage-only; shortening+unset+not-owed →none; end unchanged with a type flip alone (reachable only through the WARN path — the event disagrees with the cert’s end) → the fence is left as is,noe_action = none. "Clear" = snapshot the quartet onto the row and NULL all four in the same UPDATE (CHECK-legal),noe_fence_cleared = true; "stage" =noe::stage_at_adjust(thestage_at_certificationshape: fresh envelope id, re-stamps the fence, recipient = the event’sperson_id) →noe_action = staged_at_adjust. At-adjust staging ALSO fires when the cert remainsexpeditedafter the apply (the drain excludes that type — unreachable forin_cert_conversion, guards #1133 adopters). -
Whenever the fence was cleared AND
prior_noe_source_event_id IS NOT NULL, emitrenewal.snap_expiration_notice_superseded(§5) in the tx — even for a dispatched letter (notices no-ops; the corrected letter follows); a legacy fence without an envelope id has nothing to supersede in notices. Renewals emits no other event.
-
-
Renewals
enrollment.continuation_terminatedconsumer(b)(same queue, same lock): cert by certifying determination →update_certification_status(id, "terminated")(the singleterminated_atsetter) +periodic_reports::cancel_open_for_household(hh, "continuation_terminated")+ whenexpiration_notice_sent_date IS NOT NULLthe same quartet snapshot/NULL and (given an envelope id) the supersession event — a terminated household must not receive the expiry letter — + an adjustment row{ applied_via: adverse_action_enacted, outcome: applied, new_end: terminated_date, new_type: the cert’s type, determined_at, previous_determination_id, continuation_watermark: lifecycle_revision_after, noe_action: none, noe_fence_cleared per the clear above }(all from the event; a denied continuation never emits anappliedevent, so the UNIQUE holds); already terminated → ack. No live certification for the certifying determination → WARN + ack, no row; a non-active, non-terminated certification (expired,recertifying) → asuperseded_by_new_certificationrow, no cert change (mirrors the applied arm). Erratum (#1728, U-RC-A §4.4 — recorded 2026-09-05): therecertifyingarm of this sentence is SUPERSEDED.recertifyinghad no writer when this plan shipped; U-RC-A gives it one and rules it IN FORCE (store::IN_FORCE_CERT_STATUSES), so the terminated consumer now TERMINATES arecertifyingcertification exactly like anactiveone (theappliedarm); only theexpiredarm keeps thesuperseded_by_new_certificationno-op. The infra pinterminated_on_a_non_active_certification_records_superseded_and_changes_nothinglost itsrecertifyingcase, which moved to a new applied-outcome pin. -
Renewals create path
(b): afterinsert_new, the household’spending_certificationrows forcertifying_determination_id = new.determination_idare run incontinuation_watermarkorder through the same adjuster fn, each UPDATED in place to its final outcome (applied/no_change,certification_idandnew_typeset); the POST guard refuses a request whosedetermination_idappears insnap_certification_adjustments.determination_id→ 409certification_exists_for_determination(a continuing determination never opens a certification). -
Renewals late
notice.dispatchedfor a cleared id(b):noe_dispatch_subscriberfalls through toUPDATE snap_certification_adjustments SET prior_noe_dispatched_at = $2, prior_noe_dispatched_date = $3 WHERE prior_noe_source_event_id = $1 AND prior_noe_dispatched_at IS NULLat debug — before, and instead of, the unknown-correlation WARN.
4. Endpoints + drains (auth per finding 2)
-
No new write endpoint
(a): enrollment’sdetermination.completed.snapconsumer (queuecanopy-enrollment.events) grows a continuation arm, one tx, lock order D16:basis.continuation_class()→ the inbound checks onSnapDeterminationCompleted(U-PROV’s type — the checks live in the arm, not a contractsvalidate()):determined_atandupstream_application_idpresent; forapprovedalsomonthly_allotment,effective_date,expiration_datepresent — any absence → DLQ (they feed the §2 NOT NULL columns) → status ∉ {approved, denied} → DLQ → unlocked peek of the household’s live enrollment id — none → DLQ (LOUD; the auto_enroll/park path is NOT a fallback for this class — D6) → replay: a row for (enrollment_id, determination_id) already exists → ack, before any lock or INSERT (a concurrent duplicate that races past this SELECT hits the UNIQUE pair on INSERT and is acked as a replay) → that enrollment’spendingissuance rowsFOR UPDATE ORDER BY id→ the enrollment rowFOR UPDATE, live predicate re-checked (left the set → rowcancelled) → the enrollment’shead_of_household_person_idNULL → DLQ (it is the outgoing events'person_id, the letter recipient) →supersedes()→ classify → apply/stage → emit. No park for this class. -
GET /v1/enrollments/{id}/continuations(a)— class service-to-service read + exchanged worker read:contract.require_service_or_exchanged(&claims, canopy_auth::CASEWORKER_OR_ABOVE_ROLES)(the household-issuance precedent,api/mod.rs::list_issuances_for_household); the enrollment lookup answers 404 BEFORE the #408 assignment gate, which then runs on the row’s household; claim-derived caller, no body actor; returns rows newest first, each with the linkedAdverseActionView. -
POST /v1/adverse-actions(a)— class worker write (existing):ScheduleAdverseActionRequestgainsproposed_benefit_amount: Option<Decimal>andtarget_certification_end_date: Option<NaiveDate>(#[serde(default, skip_serializing_if)]underdeny_unknown_fields); the §3.6 422 codes; the responseAdverseActionViewmirrors both fields. -
No new drain
(a): the EXISTING enact sweep (enact_sweep.rs::run_enact_sweep→guarded_enact→enact_gate_locked) reaches the new tails; the 8-point checklist applies to the added join — item 1/7: partial indexenrollment_continuations(adverse_action_id) WHERE status IN ('staged','partially_applied')+ EXPLAIN attached; item 2: the double-run no-op test covers a reduction. -
Renewals
(b): no endpoint; thecanopy-renewals.continuationsqueue (§3.9–§3.12); the create-path lock + guard. -
Notices
(b): no endpoint; a dedicated subscriber (thecanopy-notices.recoveryprecedent) on queuecanopy-notices.noe-supersededbindingrenewal.snap_expiration_notice_superseded(§6). -
Conversion dispatch
(c): NO worker action —POST …/postponement/complete(the release) re-enters the postponement saga at a new TERMINAL stepdispatch_conversionwhen the release is in-cert (legal_today ≤ postponed_deadline) AND the claim CAS (state = 'completed' AND resulting_determination_id IS NOT NULL AND conversion_determination_id IS NULL, evaluated under the household lock — never from a pre-lock snapshot) affects one row; driven inline after commit, retried by thepostponement-sagaleg; the step: not convertible any more → done; window lapsed →incompleteconversion_window_lapsed(U-EXP-C’s arc); elsePOST /v1/eligibility/determine→ the in-process record-back settles byconversion_generation; a non-naming result while still convertible →incompleteconversion_not_honoured.GET …/determination-contextemitsconversion { episode_id, generation, certifying_determination_id, postponed_deadline }iff the newest snap episode is released + approval-settled + claimed + unsettled + in-cert; canopy-eligibility’sarm_for_programderivesInCertConversion { episode_id, generation }withbenefit_effective_date = legal todayand NOpostponementblock (co-presence with an open postponement, an order, a reopen or a pend →ArmConflict::ConflictingConversion, 422conflicting_episodeswith its own message). Anincompleteconversion saga is worker-resumable (POST …/postponement/resumeaccepts acompletedepisode whose saga step isdispatch_conversion); a post-lapse release enters nothing.previous_determination_idis NOT threaded (the eligibility contract has none; canopy-snap’s 1:1 supersession index would make a crash-retry a permanent 409) — newer-wins rests ondetermined_at.
5. Events + cutover order (finding 7)
Every new payload lives in canopy-contracts-enrollment events.rs (renewals' in canopy-contracts-renewals certifications.rs beside RenewalExpirationNoticeDueV1); ADR-004 (ids, dates, tokens, 2-dp money strings); #477 outbox in the writing tx; every publish .with_programs(["snap"]) (D10 — security audit rows and web SSE scope through it). Fields no domain consumer reads — continuation_id, postponement_episode_id, operation_id, benefit_effective_date, and the terminated event’s person_id / basis_kind / previous_* — exist for the security audit metadata and the web SSE/history projection (D10, §8) and for validate()'s date ordering; upstream_application_id is read by notices' notice-row binding on every routed event (subscriber.rs:28, main.rs:416); certification_id on the superseded event is the web/audit correlation to the cert; the security audit row for the superseded event indexes by household_id (the general list) — certification_id is correlation only.
-
enrollment.continuation_appliedv1 —ContinuationAppliedV1(b)fields, exactly:schema_version: u32(1);continuation_id: ContinuationId;enrollment_id;household_id;person_id: PersonId(the HoH — REQUIRED recipient);program: String;upstream_application_id: ApplicationId;postponement_episode_id: Option<PostponementEpisodeId>(Some iffin_cert_conversion);certifying_determination_id: DeterminationId(snap_enrollments.determination_id— renewals' cert key; never changed by an apply);determination_id(continuing);previous_determination_id: Option<DeterminationId>;determined_at: DateTime<Utc>;operation_id: DeterminationOperationId;basis_kind: String;applied_via: AppliedVia;previous_amount,new_amount: Decimal;certification_start_date,previous_certification_end_date,new_certification_end_date,benefit_effective_date: NaiveDate;lifecycle_revision_after: i32;supplement: Option<Supplement>;applied_at: DateTime<Utc>. Producer(a): one event per apply (extension halfimmediate, enact halfadverse_action_enacted); none forno_change. Consumers: renewals, notices, security, web. -
enrollment.continuation_terminatedv1 —ContinuationTerminatedV1(b):schema_version;continuation_id;adverse_action_id: Id;enrollment_id;household_id;person_id;program;upstream_application_id;certifying_determination_id;determination_id;previous_determination_id: Option<DeterminationId>;determined_at: DateTime<Utc>;basis_kind;reason_code: String;terminated_date: NaiveDate;previous_amount: Decimal;previous_certification_end_date: NaiveDate;lifecycle_revision_after: i32. Producer(a): the termination tail forcreated_source = continuation. Consumers: renewals, security, web. -
enrollment.adverse_action_scheduled(b)—AdverseActionScheduledV1gainsproposed_benefit_amount: Option<Decimal>(Some iffaction_type == Reduction; 2-dp string —current_benefit_amountstays the pre-formatted$string) andtarget_certification_end_date: Option<NaiveDate>;termination_reasonsis RENAMEDaction_reasons(pre-1.0, no alias) — every in-repo reader in the same diff:scheduled_event_payload(adverse_actions.rs:1133-1152, plus the pins at:2637,:2657),crates/canopy-contracts-enrollment/tests/roundtrip.rs, both manifests' threeprogram_data_keyslists,noa-termination.typ/pr-combined.typ/pr-vcl-termination.typ(+shared/noa-termination.typ) in both rulesets, the notices routing/generator pins,crates/canopy-typst/tests/render_test.rs:398andbenches/render.rs:84. -
enrollment.adverse_action_enactedv1 —AdverseActionEnactedV1(b)for NON-terminating enactments:schema_version;adverse_action_id;enrollment_id;household_id;program;action_type: ActionType(Reduction in v1);reason_code;enacted_date: NaiveDate(the noticed date);previous_benefit_amount,new_benefit_amount: Decimal;previous_certification_end_date,new_certification_end_date: NaiveDate;created_source;source_reference;source_generation: i32;lifecycle_revision_after: i32. Producer(a): the reduction tail for every non-continuationsource (a continuation source emitscontinuation_applied { adverse_action_enacted }instead — exactly one of the two per enactment). No domain consumer (audit + SSE) — allow-file entry per the topology-lint bullet below. -
CANCEL_REASON_SUPERSEDED_BY_NEWER_DETERMINATION(b)pinned beside the two existing consts (events.rs);AdverseActionCancelledV1.reasoncarries it; renewals' terminal consumer treats it as system supersession (likeperiodic_report_completed). -
renewal.snap_expiration_notice_supersededv1 —ExpirationNoticeSupersededV1(b):schema_version;source_event_id: EventEnvelopeId(the fenced NOE’s envelope id);certification_id: CertificationPeriodId;household_id. Producer: the adjuster (§3.9 last step; §3.10). Consumer: notices (§6). -
snap.case_closedfrom canopy-enrollment(a): payload identical to canopy-snap’s (household_id,person_ids = [person_id](the HoH — enrollment holds no roster; the Medicaid consumer keys onhousehold_id,services/canopy-medicaid/src/main.rs:1461-1490),reason = reason_code,closure_date = terminated_date), emitted by the termination tail forcreated_source = continuation; canopy-snap stops emitting it for continuation-class denials(c)(determine.rs:961-975gains!basis.continuation_class()), so Medicaid’s ELE projection drops SNAP at ENACTMENT, after advance notice, never at signing (D5). -
Broker ACLs
(b)(devstack/rabbitmq/definitions.json:342,:377): enrollment write regex gainsenrollment\.continuation_applied|enrollment\.continuation_terminated|enrollment\.adverse_action_enacted|snap\.case_closed; renewals write regex gainsrenewal\.snap_expiration_notice_superseded. -
Topology lint
(b):enrollment.continuation_applied,enrollment.continuation_terminatedandrenewal.snap_expiration_notice_supersededare bound in-tree (notices manifests / renewals queue — an allow entry would be a stale-entry failure);enrollment.adverse_action_enactedgets anxtask/mq-topology-allow.tomlentry only ifcargo xtask mq-topologystill reports it unbound after the SSE binding (§8) lands — the lint is the arbiter of whether an SSE key counts as bound; themq-topology.rs:120"dead binding" line is expected until a lands. The allow-file reason forapplication.snap_postponement_completedis corrected to "the continuation letter routes onenrollment.continuation_applied" (the pre-revision text named the wrong key). -
Cutover (a required field’s domain widens: the
in_cert_conversionkind ondetermination.completed.snap's basis): Step 1 (MR-1, U-CONT-b + contracts; closes #1696) every typed consumer knows the variant and the new events. Theschema_gatepark is VERSION-keyed only (crates/canopy-mq/src/subscriber.rs:175-180) — a same-version payload with an unknownkindis a hard deserialization error (DLQ) at every typed consumer, never a park — so the b→a→c ORDER is the guard and no schema bump is made. Step 2 (MR-2, U-CONT-a) enrollment core + producer, dormant. Step 3 (MR-3, U-CONT-c) the derivation arm emits. -
Rollback (D12): stop the producer
(c)first; drain criterion = zero unacked, parked or dead-lettered events carrying the kind or any of the four new keys; the #433 replay store MARKS post-variant events and never replays them into rolled-back consumers; then roll back a, then b. Pre-variant #433 replays are unaffected (additive kind); replayed post-variant events are idempotent via the UNIQUEs.
6. Notices — one legal notice per effect (D6)
| effect | letter | route | timing |
|---|---|---|---|
extension / increase / conversion ( |
|
|
immediate |
reduction or shortening staged |
|
|
in advance (273.13) |
reduction enacted |
none |
|
— |
termination staged (incl. continuation-class denial) |
|
|
in advance |
termination enacted / |
none |
unrouted |
— |
|
none |
no event |
— |
continuation-class approval or denial on |
none |
SUPPRESSOR entries, both statuses, both manifests |
— |
-
extend_now_reduce_lateris two effects and therefore two letters —benefit-continuationnow (amount unchanged) andnoa-reductionin advance; the enact-time event letters nothing. No other classification yields two. -
Discriminators
(b)(flat strings; a new discriminator = typedEventRoutingfield +PayloadDiscriminatorskey +lookup_alltier,event_routing.rs:31-104):action_typeandapplied_via, each its own tier placed AFTER the provenance tiers and BEFOREinterview_mode(their families compose with nothing above); the status and bare tiers EXCLUDE entries carrying either (the fail-closed shape); areductionpayload therefore never falls through to the barenoa-terminationentry, and anadverse_action_enactedpayload matches nothing →has_event_typetrue → debug skip. -
benefit-continuationroute (both manifests):event_type = "enrollment.continuation_applied",applied_via = "immediate",notice_type = "benefit-continuation",program = "snap",template_key = "benefit-continuation",subject_template = "Your SNAP Certification Has Been Updated",regulatory_basisdefault"7 CFR 273.12(c); 7 CFR 273.13(a)(2); 7 CFR 273.10(f)", georgia+ "; PAMMS 3110:140-143", default Clamp policy,program_data_keys = ["previous_amount", "new_amount", "certification_start_date", "previous_certification_end_date", "new_certification_end_date", "basis_kind", "supplement"](benefit_effective_datestays off the key list),notice_required = true. -
noa-reductionroute (both manifests):event_type = "enrollment.adverse_action_scheduled",action_type = "reduction",notice_type = "adverse_action_reduction",program = "snap",template_key = "noa-reduction",subject_template = "Notice of Adverse Action — SNAP Benefit Change",regulatory_basis = "7 CFR 273.13; PAMMS 3705",effective_date_policy = "verbatim",program_data_keys = ["current_benefit_amount", "proposed_benefit_amount", "action_reasons", "effective_date", "target_certification_end_date"]; binding + CB read from the payload as on the termination route (main.rs:426-500). -
notice_required: bool(b)— a typed manifest flag (default false): the recipient-gate skip WARNs when set (subscriber::log_recipient_skipkeys onnotice_required || kind_bearing); the gate itself stays ack-never-park (the enrollment-side DLQ in §4 is the loud failure). -
Suppressors
(b)(D11, the #1696 mechanism): an entrysuppress = true+reason = "…"withevent_type+ discriminators and NO letter fields. Parse refuses: a suppressor with any letter field or zero discriminators; a letter entry carryingsuppress; an emptyreason; a mixed discriminator tuple (a suppressor and a letter for the same tuple); duplicate suppressors. Resolution: tiers as today; a suppressor in the winning tier suppresses the WHOLE event’s fanout (documented as intended), decided BEFORE the recipient gate so the INFO record{event_type, discriminators, reason, source_event_id}always exists; ack;has_event_typecounts suppressors;kind_bearingignores them. Entries in BOTH manifests:determination.completed.snap×status = approved×effective_date_basis_kind = in_cert_conversion, and ×status = denied× the same kind, withreason = "continuation-class approval: the enrollment-side benefit-continuation letter is the household notice (U-CONT §6)"andreason = "continuation-class denial: the 7 CFR 273.13 adverse-action notice from the enrollment pipeline is the household notice (U-CONT §6)"respectively — an enrolled household’s continuation-class denial is a termination the pipeline notices under 273.13; the application-stylenoa-denialis wrong for it. -
Templates
(b), both rulesets,[templates.snap.*]blocks version"2026.1", no form number (system-generated change-letter doctrine, thenoa-changenote):snap/benefit-continuation.typ— the certification period (start unchanged + new end, long dates); previous → new monthly amount; a supplement line iffsupplementis present (supplement.amount,supplement.month); thebasis_kindblock by STRICT token lookup (in_cert_conversion→ the 3110:140-143 promise fulfilled: "you provided the postponed verification; your certification period is now…"; unknown token → fail closed, the void-letter precedent); adequate-notice hearing-rights (273.13(a)(2) content; CB false; no effective-date line).snap/noa-reduction.typ— FUTURE tense; states the current amount, the amount that will apply (the template prefixes$onproposed_benefit_amount) and, when present, the new certification end — the headline reads "reduced" when the amount falls and "changed" otherwise (a shortening with an equal or higher amount); effective date; reason block fromaction_reasons; hearing-rights with CB per payload (273.15(k)).noa-change.typstays past-tense and unrouted. Default copy CFR-only (the expedited-letter divergence convention — byte identity NOT asserted). Uniqueness(source_event_id, notice_type). -
Superseded-NOE consumer
(b)(queuecanopy-notices.noe-superseded): (1)UPDATE notice_work_items SET status = 'superseded', updated_at = now() WHERE source_event_id = $1 AND notice_type = 'notice_of_expiration' AND status = 'pending' RETURNING id— a still-queued (even claimed) item:complete/failare already fenced onstatus = 'pending'(work_items.rs:145,:179), so a mid-render worker rolls back and discards its artifacts; (2) the item isdone→UPDATE notices SET delivery_status = 'superseded' WHERE id = $notice_id AND active = true AND delivery_status = 'pending'— excluded fromclaim_pending_delivery_batch(store.rs:344);mark_notice_dispatchedis fenced ondelivery_status = 'pending'(store.rs:202-214), so the dispatcher race is safe either way; (3) already dispatched → no-op (debug; the corrected letter follows); (4) unknownsource_event_id→ WARN, ack.
7. Params + citations
No new numeric keys — classification is statutory (273.13/273.12(c)); jurisdiction variation lives in the pipeline’s existing advance-notice/election-days params; the conversion cert length is the standard assignment (273.10(f)) canopy-snap already computes. Consumed existing keys: snap.adverse_action.*, snap_standard_days (none redefined). Owned by U-CONT-a in ALL FOUR rulesets' jurisdiction.toml (params owned before consumed; derive_schedule refuses an unknown reason, adverse_actions.rs:1298): two [[snap.adverse_action.reasons]] rows — code = "continuation_benefit_reduced" (display text states the 273.13(a)(2) reason: the verification the household provided after its certification changed the benefit) and code = "continuation_ineligible" (the provided verification shows the household is not eligible), both cb_available = true, with ADR-011 citations (default CFR; georgia PAMMS 3705 + 3110:140-143 pins already exist).
8. BFF-UI slice (finding 40)
-
(a)Worker case view, enrollment panel: exchanged-token BFF routeGET /cases/{household_id}/enrollment/continuations(household-keyed — the enrollment is resolved server-side via the service identity; BFF →GET /v1/enrollments/{id}/continuationson the worker’s exchanged bearer; the SNAP view gate,ProgramScope's read-side twin, audited as aScopedRead; GET-only — the slice’s one write affordance, cancelling a staged reduction, deep-links into the EXISTING adverse-action UI (actions_snap_adverse_action.rs, WritePermission + CSRF + ProgramScope)). Renders: continuation history (old→new amount/dates, basis label, applied/staged/superseded/vetoed/cancelled), a pending-reduction banner with the proposed amount, the enact date + CB deadline, notice preview link. -
(a)A11y (U-FRAME line): full keyboard operability; the banner isrole=statusaria-live=polite; history rows keyboard-navigable with visible focus; dates/amounts in labelled cells; errors associated viaaria-describedby; the letter preview accessible. -
(b)Web tolerance:services/canopy-web/src/api/sse.rsSSE_EXTRA_ROUTING_KEYSgainsenrollment.continuation_applied,enrollment.continuation_terminated,enrollment.adverse_action_enacted(delivery scopes through the producer’sprogramsassertion);audit/mod.rshumanize arms ("continued a SNAP certification in place", "terminated a SNAP enrollment on a continuation denial", "enacted a SNAP benefit reduction"). -
(b)canopy-security (D10): aparse_enrollment_eventfamily fn (theparse_application_eventshape,event_parsing.rs:259) with named armsenrollment.continuation_applied → ("continue", "snap_enrollment"),enrollment.continuation_terminated → ("terminate", "snap_enrollment"),enrollment.adverse_action_enacted → ("enact", "adverse_action"), and a per-familyresource_idextractor whose key ORDER follows the resource type — the continuation pair (snap_enrollment)["enrollment_id", "adverse_action_id"], the scheduled/enacted pair (adverse_action)["adverse_action_id", "enrollment_id"]— consulted before the general list (event_parsing.rs:61-107) forenrollment.continuation_*,enrollment.adverse_action_scheduledandenrollment.adverse_action_enacted(today the general list would pickperson_id), with a precedence test; the existing audit pins forenrollment.adverse_action_scheduledare re-pinned fromperson_idtoadverse_action_idin the same diff.
9. Tests
-
Proptest (mandatory): classification totality/disjointness — arbitrary (status, ΔA, ΔE) lands in exactly one arm
(a); basis-variant serde roundtrip(b);continuation_class()≡ membership ofkind()inCONTINUATION_CLASS_KINDSfor everyarb_basis()variant(b);causal::supersedesproperties(a): the lineage arm wins regardless of instants, the time arm is strict (equal instants → false) and antisymmetric, a NULL current instant never supersedes by time; supplement month math (settled vs pending effective month, prorated fraction, combined row, month-end anchors, the re-mint month floor)(a); money deserializer (scale, sign)(b). -
Truth table §3.3 as example pins — every row, both apply times
(a). -
Race/CAS pins
(a): concurrent continuation vs adverse-action reopen (serialized on the enrollment row lock — single final state, no retry path); two determinations racing → newer wins, older rowsuperseded+ its staged action cancelled with the pinned reason; enact-after-supersede discarded; older/equaldetermined_at→superseded, zero writes; the one-open-action index never trips on cancel-and-replace; a household leaving the live set mid-apply → rowcancelled, CHECK-legal; the D16 lock order under a concurrent settlement mark (no deadlock, the fenced mark misses). -
Idempotency pins: replayed
determination.completed.snap→ one continuation row(a); replayedcontinuation_applied→ one adjustment per(determination_id, applied_via)and one persource_event_id(b)+ one letter(source_event_id, notice_type)(b); supplement exactly-once(a); sweep re-run enacts once(a). -
Issuance
(a): month past the OLD short end refuses pre-conversion, issues post-conversion (HTTP path AND settlement predicates, finding 32); prorated first-month row untouched by the supplement AND by the re-mint; the supplement row isissuance_kind = 'supplemental'and never blocks a regular mint (the narrowed UNIQUE + EXCLUDE — the supplement-kind pins); the 409benefit_month_already_issuedstill maps through the SAME index name; the pending re-mint cancels + re-mints under a new id (an in-flight settler’s fenced mark misses) and never a month before the floor; the multi-month guard DLQs; every aggregate reader (annual summary, QC batchGet, appeals CB/overpayment, snap overpayment sizing) sums the supplement row; the DB CHECK token set equalsCONTINUATION_CLASS_KINDS(D13). -
Renewals
(b), one pin per arm:-
applied— end adjust; type flipexpedited → standardiffbasis_kind == in_cert_conversionAND the type wasexpedited;interim_contact_due_daterescheduled vsskipped_past;periodic_report_requiredrecomputed incl. thetrue → falsecycle cancel;reporting_modelunchanged. -
no_change— watermark,continued_by_determination_id,determined_atstill advance. -
stale— older/equal watermark writes nothing;superseded_by_new_certification— no cert change. -
pending_certification(new_typeNULL) + create-path reconciliation under the lock updating the row in place; the POST guard 409. -
NOE — every row of the 8-row table; the quartet snapshotted + NULLed exactly when the table says clear; a legacy date-only fence clears without emitting the supersession event;
staged_at_adjustwhen the cert staysexpedited; no double NOE (two drain passes after an extension); the supersession event emitted iff a fence with an envelope id was cleared. -
Late
notice.dispatchedfor a cleared id stamps BOTH snapshot columns at debug (never the WARN);renewal_notice_sent_datecleared and re-fired inside the lookahead. -
continuation_terminatedends the cert, cancels cycles, clears a staged NOE and emits the supersession event, records the adjustment row withdetermined_atfrom the event. -
The concurrent two-writer race (continuation apply vs manual POST for one household → serialized by the lock b adds, never a lost update); dormancy: an
in_cert_conversionapproval is a no-op oncanopy-renewals.determinationsand deserializes at every typed consumer.
-
-
CB stay holds enact; veto retains the extension and cancels the amount change; a worker cancel → continuation
cancelled(a). -
Reduction enact pins
(a): the tail leavesstatuslive and rewritesmonthly_issuance_amount(+certification_end_datewhen targeted) under the live predicate + revision bump; a continuation source emitscontinuation_applied { adverse_action_enacted }and neverAdverseActionEnactedV1; a worker or periodic-report source the reverse; a termination action still terminates and a continuation-sourced one emitscontinuation_terminated+snap.case_closed; thecase_closedsuppression pin(c): canopy-snap emits none for a continuation-class denial and the enrollment tail emits exactly one at enactment. -
Notices
(b): the suppressor pin iteratingCONTINUATION_CLASS_KINDS× {approved, denied} over both manifests (suppressed, INFO record present,has_event_typetrue); the suppressor parse rules (mixed tuple, duplicate, empty reason, letter field); suppression decided before the recipient gate; theapplied_viapins (exactly onebenefit-continuationforimmediate, zero foradverse_action_enacted, both manifests); theaction_typepins (reduction→noa-reduction,termination/absent →noa-termination, both manifests; a georgia PR-sourced termination still takes the provenance tier); thenotice_requiredrecipient-gate WARN; the superseded-NOE consumer arms (pending →superseded; done+pending delivery →superseded, excluded from the dispatch claim; dispatched → no-op; unknown → WARN); render pins in both rulesets (continuation with/without supplement; placeholder; fail-closed on an unknownbasis_kind; reduction with/without target end, with/without CB, "reduced" vs "changed" headline); the canopy-typst text-claim pin; portal labels. -
Security/web
(b): the resource-id precedence test (incl. the re-pinned scheduled-event audit rows);derive_programswith the asserted["snap"]; the SSE binding pins. Contracts(b): frozen wire pins, negative-validation pins, vocabulary pins for every new payload; the inbound-absence DLQ pins for theOptionprovenance fields(a). -
E2E
(c): postpone → release (the automatic conversion dispatch) →in_cert_conversion { episode_id, generation: 1 }signed → in-place apply (same enrollment id, revision 1, start unchanged, end = the standard assignment) → `benefit-continuation` letter (no NOA) → renewals `expedited → standard` → month-2 issuance lands (POST …/issuefor the month after the short end: 409 before, 201regularafter); a reduction variant (extend_now_reduce_later) →benefit-continuation+noa-reduction, then enact under the 14-day floor; the idempotent post-conversion state (episode settled, a repeated leg dispatches nothing). The second-attempt staleness belts (Replayed/Stale/NotClaimed/MissingOperationId, episode unchanged) are applications record-back pins, not e2e — no user-facing second conversion exists.
10. Deployment + index notes
Migrations: renewals 20261224000000_snap_certification_adjustments.sql (b); notices 20261224000000_work_item_superseded.sql (b); enrollment 20261225000000_continuations_and_issuance_kind.sql (a); applications 20261226000000_postponement_conversion_claim.sql (c) — all forward-only (ADR-016), transactional. Indexes: §2’s UNIQUEs (the month UNIQUE under its existing name); partial enrollment_continuations(adverse_action_id) WHERE status IN ('staged','partially_applied'); snap_certification_adjustments (certification_id, applied_at) + the pending partial; the plain (enrollment_id, benefit_month) index; query-plan regression checks (finding 42, EXPLAIN attached) on the enact-sweep join AND the two kind-agnostic issuance readers (store.rs:759, :1232). Multi-MR shape (finding 41): §5 order; U-CONT-b’s MR also closes #1696 (a suppressor is a prerequisite of its own manifest entries — the recorded exception to one-MR-per-issue). Params: the two reason rows (§7, a). U-CONT-c depends on the U-EXP-B postponement episode existing. Docs (finding 44), each MR: docs/modules/ROOT/pages/api/canopy-{enrollment,renewals,notices,web}.adoc, data-models/canopy-{enrollment,renewals,notices}.adoc (recounted headers), services.adoc (thin index), CHANGELOG.adoc (the deploy-order note).
11. Out of scope
Combined initial allotment + agency-fault missed-month issuances (31’s other parts — the expedited-issuance and day-30 units); enrollment SUPERSESSION (row replacement — remains #1133’s, e.g. U-REOPEN’s approved-later-application 409); adopting the primitive for COLA/order/interim-change callers — #1133 narrows to exactly that: each caller = a continuation-class basis member + derivation arm; no new apply machinery; recorded on #1133 in U-CONT-c’s MR. Also out: writers for replacement/restored issuances (vocabulary only); a renewals mirror for a WORKER-scheduled reduction’s end change (HTTP refuses target_certification_end_date); multi-month retroactive supplements (the §3.8 DLQ guard); the SIRT secondary-reference registry (its own feature issue, D14).
FINDINGS RESOLVED
-
25 (continuation ruling): the general primitive built as ruled — in-place CAS apply under
lifecycle_revisionwith the full live predicate, no second live row, reductions AND continuation-class denials via the existing 273.13/CB pipeline (created_source='continuation'claim; a non-terminating reduction enact tail added because the tail terminates unconditionally today), increases/equal immediate,in_cert_conversionas first consumer, #1133 narrowed to adopting it. -
31 (parts): extension makes further months issuable via the cert-end predicates; ΔA>0 into an issued month → exactly-once SUPPLEMENTAL issuance typed by
issuance_kind(7 CFR 274.1(h)(4); 273.12(c)) — never a second regular row; a pending month is cancelled and re-minted at the new amount; initial-month proration preserved untouched; remaining 31 parts stay with their owning units (declared, not silently dropped). -
28-analog: one legal notice per effect (D6) — extension/increase/conversion →
benefit-continuation(applied_via = immediateonly); reduction →noa-reductionin advance via theaction_typetier; termination →noa-termination;extend_now_reduce_lateris the one two-letter classification; continuation-class approvals AND denials ondetermination.completed.snapare suppressed by manifest through the #1696 suppressor; enact-time events letter nothing; failure modes are DLQs, never a fallback letter. -
29: the shared
canopy_common::causal::supersedeshelper (lineage OR strictly-later instant) guards enrollment and renewals; an older/equal arrival is recordedsupersededand cancels nothing it did not own; renewals' order key is the event’slifecycle_revision_afterstored ascontinuation_watermark(older/equal →stale, no cert change) and the adjuster re-stamps the cert’sdetermined_at. -
44: enrollment + renewals + notices (+ web) api/ and data-models/ Antora pages,
services.adocandCHANGELOG.adocin each MR. -
Complied within-unit: 2 (
require_service_or_exchanged+ claim-derived actor on the read endpoint; web WritePermission/CSRF/ProgramScope named; in-process-only source claims), 6 (claimedoperation_idcontext→signature→event→CAS record-back;conversion_generationclaim/settle), 7 (consumer-first b→a→c order as the guard — the park is version-keyed; rollback/drain/replay rule stated), 24-analog (the NOE fence quartet cleared + snapshotted atomically per the 8-row table, on termination too; the obsolete queued letter superseded; no stale/duplicate NOE), 40 (BFF slice + a11y), 41 (multi-MR shape stated), 42 (indexes + sweep-arm production tests), 44 (above). -
SIRT elements considered: CN-1 273.13 / 273.14(b)(1) / 273.10(g)(1)(i)(B), CN-12, EB-6/EB-7/EB-9/EB-10, ED-3, ISS-10 (274.1(h)(4)) — pointers only; CFR and state policy govern.
IMPLEMENTATION NOTES (#1658 U-CONT-b, living spec): §2–§11 above ARE the spec; this block records only what changed against the pre-revision text, what b leaves for a and c, and the issues to file.
-
(a) D1 — ownership marked per item; b owns every contract (incl. the causal helper’s lift), notices, renewals and tolerance change; a owns the endpoint AND the BFF panel; c owns the derivation, the
case_closedsuppression, the applications claim/settle. -
(b) D2 — "reductions ride the pipeline unchanged" was false (no target amount on the event, one termination letter, a terminating tail):
proposed_benefit_amount/target_certification_end_date, theaction_typeroute, the branching tail,AdverseActionEnactedV1, pending re-mint with a month floor;termination_reasonsrenamedaction_reasons; an amount-only reduction isreduction_staged. -
(c) D3 — a supplement could not be a second row (total month UNIQUE + coverage EXCLUDE):
issuance_kindwith 274.1(h)(4)'s vocabulary, the narrowed UNIQUE (same name) / EXCLUDE, the 409/issuance_countsemantics restated. -
(d) D4 — "newer wins" had no operand:
determined_aton the enrollment and the continuation row,previous_determination_id, the shared causal helper, the pinned cancel reason. -
(e) D5 — denials bypassed advance notice (
snap.case_closedat signing):termination_stagedwith CB,continuation_terminated+snap.case_closedat enactment; canopy-snap stops emitting for the class (c); the enrollment ACL gains the key. -
(f) D6 — "exactly one letter" restated as one legal notice per effect; the denial NOA suppressed too; no-live-enrollment / no-HoH are DLQs, never the approval NOA; the extend-now event carries the unchanged amount; the two-letter case named.
-
(g) D7 — the mirror is a complete history with five outcomes, the household advisory lock ADDED to all three writers, the absolute-state CAS on
continuation_watermark,pending_certification+ in-place create-path reconciliation, the type-flip recompute, the quartet snapshot, the 8-row NOE table, the supersession event and its notices consumer (supersededwork-item/delivery status), the termination-path fence clear, sibling fences decided; the adjustments row also carriesperson_idandbasis_kindfor in-place reconciliation. -
(h) D8 — closed enums, validated 2-dp money, one
Supplement,upstream_application_id,validate()at every consumer plus the inboundOptionchecks in enrollment’s arm,lifecycle_revision_after: i32,subject_templateper route; the basis variant carries{ episode_id, generation }only (nooperation_id, no application id). -
(i) D9 —
conversion_generation BIGINTas the settle CAS operand (the CHECK set and the dropped UNIQUE are amended in the #1660 notes). D16 — the A9 lock order governs every issuance-touching tx. -
(j) D10 — per-family resource-id extractor + named arms; producers assert
programs; the per-family key order follows the resource type. -
(k) D11 — suppressor parse/resolution semantics fixed (sole entry per tuple, required reason, decided before the recipient gate, whole-fanout).
-
(l) D12 — rollback procedure written into §5 (producer first, drain criterion, replay-store marking).
-
(m) D13 — the Rust const is the reference; DB CHECK and both manifests carry literals under agreement tests.
-
(n) D14 — the SIRT cache withdrawn from this plan; SIRT ids are pointers beside the CFR.
-
(o) Obligations for U-CONT-a: emit the §5 payloads with
.with_programs(["snap"])andperson_id= the HoH;certifying_determination_id=snap_enrollments.determination_id; the §2 enrollment migration and CHECK-vs-const test; the two reason rows in all four rulesets; source claims in-process only; the D16 lock order inguarded_enact; b’s dormant-consumer pins become a’s regression pins; the BFF panel ships in a’s MR. -
(p) Obligations for U-CONT-c: settle the episode by
conversion_generation(never thepostponementblock on the conversion dispatch);benefit_period_for_basisstart-unchanged arm (end = the 273.10(f) standard assignment); suppresssnap.case_closedfor the class; the record-back reads as normal processing in the repeat gate (pin it); record #1133’s narrowing. Decided and amended in the #1660 notes block. -
(q) Tracking issues (filed before this text merged; numbers follow each title):
feat(policy): committed SIRT secondary-reference registry(#1713) (registry/schema with workbook + projection hashes, generator version, stable sheet/element anchors, mandatory pins, offline audit, remote-input trust contract, mapping into the committed catalogues, docs + tests; the SIRT is FNS technical assistance — CFR and state policy govern);fix(enrollment): enrollment.* events publish without a programs assertion(#1714) (scoped reads/SSE gap);fix(enrollment): a worker-scheduled reduction enacts as a termination(#1715) (pre-existing; fixed by the D2 enact tail — filed for traceability, closed with the a MR). #1696 closes with this MR.
IMPLEMENTATION NOTES (#1659 U-CONT-a, living spec): §2–§11 above ARE the spec; this block records what the implementation fixed against the text and what it discovered.
-
(a) The BFF route is
GET /cases/{household_id}/enrollment/continuations(household-keyed; the enrollment resolved server-side via the service identity), not/worker/cases/{id}/…; the read rides the worker’s exchanged bearer; the write affordance is the existing cancel form. -
(b)
AdverseActionViewandScheduleAdverseActionRequestgainedproposed_benefit_amount/target_certification_end_datein U-CONT-a (U-CONT-b had not added them). -
(c)
derive_scheduletakesScheduleInput+ScheduleOrigin+today;ScheduleDerivation.continuation_idis its own slot (neverpr_certification); the refusalsSourceNotClaimableOverHttp,ReductionRequiresProposedAmount,AmountOnNonReduction,TargetEndNotClaimableOverHttp,TargetEndOnNonReduction(a termination never carries a target end, any origin — a plain 422 over HTTP),ContinuationExemptionRefused,FloorOverfloware new. -
(d)
lock_action_spinetakes the same conditional pending-issuance lock asguarded_enact; the reduction tail’sapply_continuationre-checks the live predicate (the appeal path previously skipped both). -
(e) The batch EXPLAIN pin moved to
idx_snap_issuances_enrollment_month_all; the narrowed month UNIQUE keeps its name and its 409 mapping. -
(f)
SnapDeterminationCompleted.person_idisOption<uuid::Uuid>and is NOT the recipient — the head of household comes from the enrollment row (NULL → DLQ). -
(g) The sweep log wording and the
EnactOutcome::Enacteddocs are generalized (terminated, or reduced in place). -
(h) The seed tool’s explicit-column issuance INSERT (
tools/canopy-seed/src/sql.rs) relies onissuance_kind DEFAULT 'regular'. -
(i)
list_settleable_pending_issuancesexcludessuspendedenrollments — pre-existing, left as is. -
(j) The replay belt runs before AND after the enrollment lock; the staging classes insert the action first, then the row (the row CHECK needs
adverse_action_id); a 23505 on(enrollment_id, determination_id)is acked. -
(k)
applied_atis the transaction’snow(), returned by the store — an audit instant, never an ordering key. -
(l) The exchanged BFF read passes through enrollment’s #408 assignment gate AFTER the 404 lookup: an unknown id reads 404 to every allowed caller; an assignment-less caseworker on a real enrollment is 403, audited; the allow path’s own audit event is #1717.
-
(m)
snap.case_closedfrom enrollment carriesprograms = ["snap"]; canopy-snap’s copy does not (the D10 divergence). -
(n) The reason rows land in default / georgia / test-max / test-min (
rulesets/federalhas nojurisdiction.toml). -
(o) #1715 closes with this MR (the reduction tail).
-
(p)
apply_continuation's signature is(exec, &ApplyContinuation { enrollment_id, expected_revision, monthly_issuance_amount, certification_end_date, determined_at })rather than the spec’s(tx, enrollment_id, expected_revision, continuation_id)— the tail passes the action’s proposed amount, not a continuation row. -
(q) A combined initial row covering month+1 supplements at fraction 1 (the covered month is not prorated).
-
(r) Settler resurrection after a re-mint: when a fenced mark trips on a row cancelled
superseded_by_continuation, the re-minted pending twin is retired (superseded_re_mint_lost_to_in_flight_settlement), the old row re-assertspending(the money moved at the OLD amount) and the difference is an operator supplement (reconciliation_required; the aged-pending alert surfaces it); when the twin already ISSUED, the old row stayscancelledasorphaned_transfer_after_remintwith its transaction id (double_issuance_suspected); two landings overlapping one re-mint is #1718. -
(s) A foreign open action (a worker / periodic-report
scheduledaction the continuation does not own) at staging is a typed DLQ (ForeignOpenAction) — a continuation cancels nothing it does not own. -
(t) The migration cancels legacy amount-less
scheduledreductions before the reduction CHECKs are added, so the sweep’s one-statement claim batch never aborts on them. -
(u) The pre-existing
adverse_action_scheduled/_cancelledpublishes from the continuation arm still carry noprogramsassertion (#1714). -
(v) The arm refuses an effective month outside the certification window (
first_of_month(certification_start_date) ≤ m ≤ new_end) to the DLQ — a supplemental row outside the settler’s window would be a lost supplement.
IMPLEMENTATION NOTES (#1660 U-CONT-c, living spec): §2–§11 above ARE the spec; this block records the decisions the first producer forced and the amendments A–G against the pre-implementation text.
-
(a) Trigger (amendment B) — the release IS the trigger:
completere-enters the saga at the terminal stepdispatch_conversion(7 CFR 273.2(i)(4)(iii), PAMMS 3110:140-143 — the agency processes the provided verification; parity with the automatic expedited dispatch at postpone); no worker action, no new write endpoint, no new event or routing key. -
(b) Claim (amendment A) — at the release, by the CAS under the household lock (
rows_affected = 1→ re-entry;0→ info log, no re-entry, never an error);conversion_generation+conversion_claimed_atat claim,conversion_operation_id+conversion_determination_id+conversion_settled_atat settle; the plan’s(conversion_operation_id IS NULL) = (conversion_generation IS NULL)CHECK could not hold (the op id is minted by canopy-eligibility after the context read) and the(id, conversion_generation)UNIQUE was redundant with the PK — both replaced by the §2 set. Through the release path the generation is always 1;COALESCE+1is reachable only by a foreign re-claim andStaleonly by a foreign record-back. -
(c) Contract surface (amendment G, c-owned):
ConversionDispatch { episode_id, generation, certifying_determination_id, postponed_deadline }(canopy-common,ToSchema, nodeny_unknown_fields),DeterminationContextProgram.conversion, fiveconversion_*fields onPostponementEpisode, thesaga_stepvocabulary + thepostponement_sagasstep CHECK, the web postponement panel’s step/code copy (dispatch_conversion,conversion_window_lapsed,conversion_not_honoured) and itsincomplete_viewfor acompletedepisode. -
(d) Anchor (amendment C) —
benefit_effective_date = legal todayof the conversion (the day the verification was processed; 273.12(c) timing → the current month’s supplement when already issued). The §3.8 (d) guard misfired for a filing-month conversion with ΔA > 0 over the two-month combined row (the row’s own month+1 read as "already issued") — fixed by #1722 (the covering row is found first; one two-month supplement in the combined shape;supplement.months_covered); c’s e2e arms (ΔA = 0 / ΔA < 0) never mint a supplement. -
(e) canopy-snap — guard
in_cert_conversion_invalid(422;legal_filed_datepresent,generation ≥ 1,benefit_effective_date == as_of— the conversion is the first arm whose signedeffective_datediffers from the anchor, so the supplement-month anchor the enrollment arm keys money on stays the evaluation date structurally; apostponementblock stayspostponement_basis_mismatch); the period arm: start =legal_filed_date(U-EXP-B pins it as the expedited certification start), end =benefit_period(start, standard months)(anniversary−1, #1474), denied → no period,certification_months = None→ internal (never an end-less conversion approval);snap.case_closedsuppressed forcontinuation_class()(D5 — enrollment’s termination tail emits it at enactment). -
(f) No antecedent (amendment E) —
previous_determination_idis not threaded (see §4); newer-wins rests on the wall-clockdetermined_atstrictly later than the expedited determination’s. -
(g) Settle —
settle_if_basis_namesgains thein_cert_conversionarm (op idOption;None→MissingOperationId; total miss probe: same det →Replayed, unclaimed →NotClaimed, elseStale); a DENIED conversion settles identically (enrollment stages the termination; the episode stayscompleted, neverclosed); the record-back stampsdetermination_basis_kind = in_cert_conversionso the repeat gate reads NORMAL processing by two facts (pinned). Pre-existing lock-order inversion between the release (episode → program) and the record-backs (program → episode) is unchanged. -
(h) Second attempt (amendment D) — none exists user-side; staleness is pinned at the record-back; the e2e asserts the idempotent post-conversion state (§9.11).
-
(i) Saga codes (amendment F) —
conversion_window_lapsed,conversion_not_honoured; the expedited judge treats a conversion-named settle as non-naming (postponement_not_honouredwhile open); the conversion re-entry clears a stalelast_error/error_code;resumeaccepts acompletedepisode at the conversion step. -
(j) Pre-existing gap filed, not fixed: #1721 — a release before the expedited determination settles leaves the episode
completed+ unsettled and undispatched (the claim CHECK forbids a conversion for it by design). -
(k) #1133 narrowed on the issue: each further caller = a continuation-class basis member + a derivation arm; no new apply machinery.
-
(l) e2e placement — the release inside September: every conversion/enactment day stays inside FY2026,
mlands on the combined row’s last covered month, and the 14-day advance floor keeps the reduction’s enactment inside the month;determined_atis wall clock (the logical advance does not order anything). #1704: a September conversion of an August filer re-mints from the same FY2026 table; a 1–7 October conversion for a September month prices FY2027 (#1704’s accepted scope). No scenario-inventory flip (the lapse row stays U-EXP-C’s).
U-EXP — Expedited postponed verification (weight 13: A5 B5 C3, strict activation order)
Purpose + regulatory cites
7 CFR 273.2(i)(4) + PAMMS 3110: certify an expedited household with all verification except identity postponed; 1-month cert filed ≤ the 15th else 2-month; benefits end after the short cert absent the verification (no next-business-day hold, 3110:125); approval letter states items + deadline + benefits-end + the correct period if provided (3110:140-143); identity is the only pre-issuance VERIFICATION (3110:82) but the interview is a certification condition (3110:101); post-lapse late verification → normal standards (3110:103); combined initial allotment for post-15th filers (7 CFR 273.2(i)(4) / 274.2(c) — the unbound snap.issuance.combined-initial-allotment CATALOGUE ACTION (not a scenario row — the scenarios-audit +12 count is unaffected; its allowlist entry carries its own issue ref and flips as a 7th action flip) is co-bound here).
Sub-units and activation order (finding 24 — consumers/topology FIRST)
-
U-EXP-A (w5) — downstream consumers + money correctness. Renewals expedited-cert subscriber arm + at-cert NOE; enrollment expiry sweep; issuance/settlement cert-end predicates; combined initial allotment; initial-month proration on the event path. NOTHING produces expedited-basis events yet — the arm is DORMANT until U-EXP-B, so no window exists where short certs lack the NOE consumer.
-
U-EXP-B (w5) — the postponement state machine + gates + producer. Postpone/complete/revert operations, day-7 reversion drain, repeat gate, the approval-letter routing. Activates the basis producer.
-
U-EXP-C (w3) — post-lapse arc + rows + journey. Depends on U-CONT (in-cert continuation) + A + B.
U-EXP-A detail
-
Renewals subscriber consumes determination.completed.snap; on basis kind expedited_postponed: causal guard (event’s determination supersession chain vs existing certs — an older delayed event NEVER supersedes a newer cert: compare determined_at + previous_determination_id lineage BEFORE side effects), then the shared create-with-supersede store fn (extracted from the HTTP handler: supersede + PR-cycle cancel + create + certification_created event) with type 'expedited' (CHECK widened; ALL enum consumers updated: PR cohort predicate, interim-contact logic, NOE drain guard, web rendering, test fixtures — enumerated in the issue), + at-cert NOE staged in the same tx (#792 fence). U-EXP-A ALSO owns the NOE dispatch correlation (finding 19 replica): a notice.dispatched consumer stamps
noe_dispatched_aton the snap_certifications row (NEW column, migrated here); the lapse pins + journey assert DISPATCHED, not merely staged — the lapse’s lawfulness rests on the household actually receiving the NOE. Idempotency: unique index snap_certifications(determination_id) checked BEFORE any supersede side effect (SELECT-guard inside the tx, the index as belt). Manual ≤2-month HTTP certs stage the NOE too (recipient = the request’s head person id — the HTTP contract gains it; 422 without it). -
Enrollment expiry sweep (fenced daily + manual trigger, enact-sweep precedent): status IN ('active','suspended','pending_issuance') AND certification_end_date < today(legal) → status 'expired' + lifecycle_revision bump (kills in-flight fenced activation/settlement). Releases the one-live fence; parked post-expiry approvals unpark and land (integration pin).
-
Cert-end predicates: the HTTP issue path AND the settlement worker refuse benefit_month starting after certification_end_date (409 / settle-skip + WARN) — money can no longer issue past cert end even before the sweep runs.
-
Combined initial allotment (273.2(i)(4)/274.2(c)): auto-enroll’s first issuance, when basis = expedited_postponed AND legal_filed_date is after the 15th, mints ONE aggregated issuance = prorated filing month + full following month (single benefit_month row keyed on the filing month, amount = prorated + full; flagged combined = true, new column) within the expedited timeframe; the catalogue row snap.issuance.combined-initial-allotment flips bound here. Event-path initial-month proration generally: auto_enroll’s first issuance uses prorate_month_from(benefit_effective_date) instead of full-allotment (closing the disclosed gap for ALL event-path approvals — finding 31; the $10 suppression per 273.10(a)(1)(iii) initial-month rule).
-
auto_enroll threads expedited = true + the 7-day initial_issuance_due from the basis.
U-EXP-B detail
Postponed state: SINGLE state machine column on applications — expedited_postponement_state CHECK('none','postponed','completed', 'reverted') (no boolean pairs → no completed+reverted overlap) + columns postponed_items TEXT[] (derived SERVER-SIDE from the determination’s verification_items_required minus identity — never caller-selected), postponed_deadline DATE (= last day of cert month 1 or 2 per params), postponed_certification_months SMALLINT, postponement_generation INT (the CAS episode id riding the basis variant), completed_at/reverted_at, reverted_reason CHECK('identity_unverified','interview_not_completed', 'eligibility_proof_not_provided'). Transition guards: postponed→completed or →reverted only; any mutation after the program row is terminal-approved + cert created is rejected except completed (the release). Operations (auth: require_service_or_exchanged + claim-derived actor): * postpone: guards expedited_eligible; state none; identity gate = a COMPLETED identity verification row FOR THE APPLICANT/HoH person (person_id match — evidence semantics, not any member); interview gate (completed/waived); repeat gate (below). One LOCAL tx (columns + stamp event); verification rows for the postponed items are created via a SAGA step (durable postpone_saga_steps rows, retry, compensation = revert the state) — release is NOT finalized until the verification rows exist and their checklist letter (U-VER) is dispatched. * complete: allowed from postponed; stamps completed_at ONLY after the saga confirms all item verifications completed (evidence-derived, not attested); releases the repeat gate. * revert: SUPERVISOR-CLASS (origin-enforced role array — frame-assigned, not downgradeable), closed reasons; recomputes current_workflow_deadline back to the standard clock; forfeits postponement (state reverted). * Day-7 automatic reversion drain: postponed rows whose expedited_participation_deadline (U-FOUND) passed with identity still unverified or interview unsatisfied → revert(identity_unverified / interview_not_completed) automatically + WARN (3110:101; downgrade not denial — the standard clock continues). Repeat gate (3110:32): pure fn over the household’s application history: refuse postponement when a prior application has state postponed (never completed) and no later normal-processing approval; ordering = by legal_filed_date with id tiebreak; concurrent applications serialize on a household advisory lock in the postpone tx. Approval letter: routes on determination.completed.snap with composite discriminators status=approved AND effective_date_basis.kind= expedited_postponed (routing table gains the basis-kind flat field; precedence: most-specific wins so noa-approval is suppressed — exactly one letter, route pins prove it). Event carries upstream application_id + postponed_items + postponed_deadline + cert months (signed notice inputs via the U-PROV additive ritual). The catalogue expedited-approval-notice row rebinds to this route.
ALLOWLIST FLIP (owned here): expedited-postponed-verification → binding = the postpone endpoint.
U-EXP-C detail
Post-lapse: verification arriving after cert end → complete (evidence- derived) → the case appears on the worker determination queue (flagged "post-lapse expedited — run determination"); the worker runs the NORMAL determination; approval creates a standard cert via the EXISTING worker cert path (the named writer; no automation invented). If the household is still within the in-cert window instead, U-CONT’s continuation primitive applies (its first consumer). Rows owned by C: the lapse journey spec + walkthrough (letters → NOE → expiry sweep → no further issuance → post-lapse arc). The certification + reversion FLOW specs and the repeat-gate UNIT binding flip in U-EXP-B (their machinery is complete once the producer activates).
Params + citations (all 4 rulesets)
[snap.expedited] postponed_filing_day_cutoff = 15;
postponed_cert_months_through_cutoff = 1;
postponed_cert_months_after_cutoff = 2 (georgia cites PAMMS 3110:119-123 —
first 3110 pin; default/test cite 273.2(i)(4)). Combined-allotment needs no
new key (it keys on the same cutoff).
Tests
Proptest: cert-length/month-end math; repeat-gate ordering; state-machine transition totality. Pins: identity-gate person-match; saga compensation; day-7 reversion; causal-order cert guard; expiry sweep + lifecycle bump + unpark; issuance/settlement cert-end refusals; combined allotment amount math (prorated + full, single row); exactly-one approval letter; downgrade-never-denies.
Out of scope
Destitute-household income exclusions (not modeled anywhere); TANF/Medicaid expedited analogs; recert context.
FINDINGS RESOLVED
-
24: A-before-B activation; dormant consumer.
-
27: single state machine, server-derived items, evidence-scoped identity gate, deadline formula, day-7 drain, reversion effects, regain-proof token, repeat-gate ordering + locks.
-
28: composite (status, basis.kind) routing; upstream id + notice inputs on the event; exactly-one letter.
-
29: causal guard + pre-side-effect idempotency; manual-path recipient.
-
30: post-lapse writer named (worker path); expedited enum consumers enumerated.
-
31: combined initial allotment + event-path initial-month proration IN scope; agency-fault missed months are U-REOPEN/U-PROV’s benefit anchor + the issuance follows from it (multi-month restoration stays #1113-noted).
-
32: certification_end_date; pending_issuance included; lifecycle bump; both issuance paths guarded.
IMPLEMENTATION NOTES (#1661 U-EXP-A, living spec): (a) the expedited_postponed basis variant ships HERE (consumers first, finding 24), frozen by a signing KAT as { episode_id: PostponementEpisodeId (UUID v7 — canopy-verification already keys `episode_kind = 'expedited_postponement' on a UUID), generation: i64 (the CAS spine U-EXP-B stores as postponement_generation), postponed_deadline, certification_months }`; the notice-content fields the U-EXP-B letter needs (postponed_items, the upstream application_id) are NOT on the signed basis — B adds them as additive top-level event fields (with_* builders, the legal_filed_date precedent) so notices can address them flatly; (b) OBLIGATIONS FOR U-EXP-B: applications stores postponement_episode_id (UUID) beside postponement_generation; for this basis the producer sets effective_date = benefit_effective_date = legal_filed_date and expiration_date = postponed_deadline = canopy_common::expedited_postponement::certification_end(legal_filed_date, certification_months) — the CALENDAR-month end (7 CFR 273.10(f)(1); 3110:120/123), not benefit_period's anniversary−1 formula, which needs a basis-aware arm; the event must carry person_id, legal_filed_date and determined_at — renewals DLQs an expedited event missing any of the three; enrollment DLQs one missing legal_filed_date or whose dates contradict the shared formula (the #1014 posture) rather than guess; (c) the finding-29 causal guard’s inputs ride the event additively (determined_at REQUIRED on an expedited event; previous_determination_id may be None — a legitimate first determination): supersede iff no active cert, or the active cert’s determination is the event’s previous_determination_id, or the event’s determined_at is strictly later than the active cert’s stamped determined_at; otherwise WARN and ack with zero writes; (d) the per-determination idempotency belt is a PARTIAL UNIQUE snap_certifications(determination_id) WHERE active (the column is NOT NULL, active is the soft-delete flag every read filters on, and a total unique could not be fixed forward without deleting rows — ADR-016); a belt violation inside an inbox tx is Err → redelivery → the SELECT-guard answers Existing (no savepoint; the HTTP arm maps the same violation to 409 certification_exists_for_determination); (e) the ≤2-month "short cert" boundary is ONE predicate shared by the at-cert NOE and the >2-month drain (start + 2 months ⇐ end, the drain’s inclusive knife-edge), so a certification is owned by exactly one NOE path; the at-cert letter reuses the #792 event/type and the drain’s timely-filing-day deadline rule, which for a 1–2-month certification is provisional — 7 CFR 273.14(c)(1) gives 15 days from RECEIPT of the NOE — tracked as #1694 (the arm WARNs when the stated deadline already elapsed); (f) expired_at, determined_at and the NOE columns stay DB-only in this MR (the wire contract is GET /v1/enrollments/{id}.status = expired and the exported noe_evidence_dispatched predicate); U-EXP-C surfaces noe_dispatched_at additively on SnapCertification if its journey must observe dispatch over HTTP; (g) the cutoff loaders cap postponed_filing_day_cutoff at 27: a 28 February one-month certification would start and end on the same day, which renewals' end > start period CHECK refuses; (h) the pending-issuance disposition at expiry is a NEW terminal token cancelled (failed asserts an adapter attempt, reversed that money moved), terminal only for rows no adapter touched — when an EBT transfer succeeded but the lifecycle fence tripped mid-settle the settler returns the row to pending with a reconciliation error (the aged-pending alert is the operator surface); an entitled month cancelled at expiry is logged as a 7 CFR 273.17 restoration candidate; the sweep’s per-row tx locks the issuance rows BEFORE the enrollment row (the settler’s order) so the two never deadlock; scheduled adverse actions of an expired enrollment are mooted (enrollment_expired) in the same tx; (i) the event path now prorates the initial month for EVERY approval (finding 31) with the $10 rule mirrored from the HTTP path (under the minimum → the next full month, or no issuance when no later month sits inside the certification); the HTTP issue path anchors its initial month on benefit_effective_date (falling back to application_date) so both writers agree, and application_date on event-path enrollments becomes legal_filed_date when present — the standard-arm due-date anchor stays cert_start + standard_days (no silent change; the divergence is #1695); (j) the combined row (7 CFR 274.2(c)) is minted only for an approval filed after the cutoff INTO a two-month certification (both facts must agree — a one-month certification has no month+1 to combine and takes the standard initial-month rule); it is a single-month ledger fact keyed on the filing month with benefit_months_covered = 2 — per-month readers (canopy-snap overpayment sizing, the annual summary, QC batchGet, appeals continued-benefits billing, e2e sums) attribute it through the contract’s ONE rule SnapBenefitIssuance::covered_months since #1692 (the row persists its month+1 part as covered_next_month_amount; an EXCLUDE belt refuses overlapping coverage), which closed before U-EXP-B activates the producer; month+1’s full allotment is priced from the determination’s single monthly_allotment even across 1 October — #1693; the HTTP issue path refuses month+1 when a combined row covers it, and the (enrollment, benefit_month) unique plus the atomicity of auto-enroll’s insert tx (a combined row is visible iff its enrollment is) are the belt; (k) the sweep stages no event — #1691 adds enrollment.expired consumers-first; (l) the snap.benefits.combined-initial-allotment SCENARIO row (blocked_by #793, tier unit) is NOT flipped here — the family closure count is exact and the row belongs to #793 (related); only the catalogue ACTION binds; (m) the default ruleset’s citations use the adjacent [snap.expedited] siblings' authority = "federal_register" form (the plan text says "cite the CFR"; both validate); the Georgia pin is hand-derived from the synced 3110 page — the local pre-push battery runs policy drift WITH sync and blocks on any drift, so a moved 3110 page must be re-pinned before pushing; (n) the renewals period math is the shared canopy-common module, not a twin; (o) on the HTTP issue path the certification-window 409s sit AFTER the first-of-month 400 (a malformed month is refused as malformed before any window judgment) and before the initial-month figure — the plan’s "before the first-of-month check" ordering is not followed; both refusals are row-free; (p) a parked approval that lands after the sweep releases the one-live fence replays its ORIGINAL dates (the enrollment consumer carries no causal guard — the event’s determined_at is unread there); stale-approval landing semantics are out of scope (finding 31 / #1133).
+
Erratum (2026-09-08): note (k) is superseded — #1691 landed enrollment.expired, staged by expire_one in the per-row transaction after the action moots (canopy-security + worker-portal consumers; canopy-renewals does not consume it).
IMPLEMENTATION NOTES (#1662 U-EXP-B, living spec): (a) R1 home — the state machine is an EPISODE table application_postponement_episodes (+ postponement_sagas; the plan’s "columns on applications" is superseded because every clock/pointer it joins is a program-row fact) with a FOURTH state closed (the orchestrator’s C9 amendment): a record-back whose determination is a DENIAL moves postponed → closed (closed_at; a closed row always names its determination; the pointer clears; the repeat gate ignores it — a denied postponement is not an expedited certification, 3110:32; the context block never emits it), while an APPROVAL settles the episode (resulting_determination_id + settled_at) and leaves it postponed — delivered here, not deferred to U-EXP-C; the revert-reason vocabulary is the three 3110:101 household grounds + ONE system token verification_request_rejected — expedited_window_missed is NOT a revert reason (C12: an open episode always proves identity + interview were timely, so no lawful producer exists; it survives only as gate 1b’s refusal code); the program-row wire state expedited_postponement_state (none \| postponed \| completed \| reverted \| closed) is a DERIVED alias over the newest episode on every SELECT * / RETURNING * site, never a stored column; (b) R2 items = [snap.expedited] postponable_verification_types − every type with a completed batch-context row (ruleset order; identity never in the list; empty → 422 nothing_to_postpone), and the saga’s request step first SUPERSEDES every other open row of a postponed type (superseded_by_postponement, a new canopy-verification cancel reason) — the v2 natural key includes person_id, so a head-scoped request would never converge with a household-level intake/manual row, which would otherwise keep a checklist-dated eligibility_critical deadline the day-30 arm would read against the approval letter’s later one; (c) R3 gate 1 is SPLIT (C7: never screened → 422 not_expedited_eligible; downgraded → 409 expedited_window_missed) and gate 1b NARROWED to AU fault (C13): a downgraded row refuses only when the head’s identity completed_at legal day or the interview (a waiver is timely regardless of its instant) fell past expedited_participation_deadline — the stamp itself lands on any row whose deadline passed undetermined, pure agency lateness included, and 3110:101-102 strips the right only for the household’s own miss; the gate order is 1a → 7 (addressable head, BEFORE 1b — a headless household reads no_head_of_household, never a forfeited right) → 1b → 6 → 2 → 8 (conflicting_episodes, the fail-early mirror of the eligibility belt) → 3 → 4 → 5, ONE pure ladder the POST takes the first failure of and the GET renders every failure of; gates 6 / 8 / 2 are RE-RUN under the row’s FOR UPDATE inside the tx (the record-back handler takes no household lock); the 404 arms (unknown / inactive application, no active snap row) are uncoded like reopen’s; gate 3 binds identity to the HEAD only — PAMMS 3110:95 / 7 CFR 273.2(i)(4)(i)(A) also admit an authorized representative’s identity when an AR filed (#1702); (d) R4’s compensation SHAPE stands, its TOKEN is corrected (C14): a permanent verification-request refusal reverts with the system-origin verification_request_rejected (reverted_by nil, reverted_by_service = canopy-applications) — eligibility_proof_not_provided is the 3110:101 regain-proof HOUSEHOLD ground and would misstate the record; the right is not forfeited (a reverted prior is Allowed; the worker re-postpones at generation + 1); the cross-service cancel-open is a durable saga step advanced in the local tx and driven inline (C8 — an HTTP call cannot be atomic with a DB tx), the shape the compensation and the supervisor revert share; the notice.dispatched correlation needed three additive keys the ruling did not name (application_id, determination_id, program — C5) and an upstream_application_id-first precedence for the notices row, so EVERY snap NOA row now stores the upstream id; (e) R5 is evaluated over the LAST expedited certification (C15 — 3110:32 and 7 CFR 273.2(i)(4)(iv) key on "the last"): refuse iff the newest prior approved under expedited_postponed still has its episode postponed AND no later record is approved under a non-expedited basis ("some prior" would refuse P3 after P1 unresolved → P2 expedited-and-completed); determination_basis_kind is stamped on every snap record-back so "normal processing" is a recorded fact (NULL = pre-#1662 = normal); (f) R6 — no separate day-7 drain (R6(c)), and R6(b) is NOT applied (C12): the downgrade leg stamps and WARNs but never reverts an open episode — its population is fault-blind (expedited_participation_deadline < today), so the only open episodes it could touch are agency-side stalls (an outage, the #1693 refusal, a synthesized pending), exactly the households 3110:101 does not strip; row 9 (identity never verified → no episode → downgrade → postpone refused) is unaffected; (g) R9 — renewal_date = expiration_date under the expedited basis (the short cert’s "renewal" IS the postponed proof; portal-visible on the renewal hero); the basis prices EACH benefit month at its own parameter window — month 1 at first_of_month(legal_filed_date), month+1 at first_of_next_month — while as_of, evaluated_as_of and the snapshot as_of stay legal-today and SetWitness.as_of records the selection anchor (a deviation from #1467’s "selection at as_of" for this basis only and an extension of the U-PROV truth-table notes: a 24–30 September filing determined 1–7 October prices September from FY2026 and attests an effective_period that does not contain evaluated_as_of — the ADR-028 note forbids a future containment check; the five load-bearing selection comments were rewritten; the lawful footing is 7 CFR 273.9(a)/(d), 273.10(e)(4), 273.12(e)(1) and 3110:140, not the proration paragraph; the same defect on every NON-expedited back-dating basis is #1704); following_month_allotment is a SECOND, write-free, corpus-pinned dry-run rules evaluation at month+1’s window (C10 — the only figure the household would be certified at for that month, never the table’s scaled cell), SIGNED and PERSISTED as program_extension.following_month on snap_determinations (finding 32 option (a); the orchestrator’s own row still lacks it, #1709); the month+1 miss is CARRIED through the policy ladder and refused following_month_params_unstaged only once the month-1 verdict is eligible (C17 — an ineligible 16–30 September two-month filer is denied normally rather than waiting for FY2027; the ordering trade-off is deliberate); an INELIGIBLE (or $0) month+1 signs 0.00 and enrollment issues the filing month alone (C16 — a knowing policy reading, orchestrator-confirmed; the mass-change-notice question for that household is U-CONT’s, #1706); only an eligible verdict WITHOUT a figure is following_month_unpriceable; standard_certification_months (Option<u32> from params.certification_months) and a flat certification_months mirror ride the event because notices reads flat keys only (C3 / C4 — a manifest constant was rejected as policy in the wrong home; the per-category standard period is #1703); #1693’s STAGING half stays open (FY2027 is an FNS publication; until staged, 16–30 September two-month certs refuse loud, never a mispriced October); (h) C6 — canopy-snap has no verification posture (every pending_verification is orchestrator-synthesized), so the "suppression" is the orchestrator’s is_registrable_pending guard: a REFUSED dispatch (TerminalRejection / UpstreamConflict) registers no checklist item — a snap 422 is a designed outcome and must never tell a postponed household it owes proof because the agency’s table is unstaged; the transient-failure class still registers (#1701); identity stays required by the applications gate, never by rules; (i) notices — the reader never walks the nested basis (the producer mirrors effective_date_basis_kind flat), the composite tier keys on status AND kind, the status/bare tiers exclude kind-bearing entries, parse refuses a kind without a status, a new discriminator is a Rust change and a new value a manifest entry; item labels humanize unknown tokens (the vocabulary is jurisdiction-configured); the on-demand path renders with placeholders while the live path fails closed on a producer defect; the recipient-gate skip WARNs for kind-bearing routes; templates.snap.expedited / snap/expedited.typ retired; (j) canopy-web — FOUR BFF routes (C1: the resume backstop is a fourth mutating registration; a re-POST cannot resume because the BFF mints a fresh key) registered through a scanned builder so api/mod.rs stays under the B1 line, canary EXPECTED_MUTATING_TOTAL 76 → 80; the panel does no gate math (postponable / blocked_by are the server’s verdict) and the static default checklist is retired (it contradicted the identity gate); (k) compliance — row 10 binds as path::fn integration-test entries (the inventory has no unit kind; path::fn resolves to the unit tier) and the exactly-one-letter routing pin is bound BY NAME on row 8 (the catalogue checker strips ::name); the scenarios audit gains +3 covered (rows 8, 9, 10 — C2 corrects R12’s "+2"); (l) the decision-instant seam is api::interviews::decision_now() (the service’s one steerable read); the deploy order is consumer-first on the DISPATCH seam — notices + enrollment → snap → eligibility → applications → web (a new eligibility over an old snap would sign the anniversary period under the expedited basis; a new applications over an old eligibility lands incomplete postponement_not_honoured, safe; the CHANGELOG carries the note); (m) the e2e given library gained the lifted notice / verification / postponement helpers plus a shared pollUntil in given/http.ts; the two older flow specs keep their local copies (#1710); the data-model page headers were RECOUNTED rather than incremented (applications 27 tables / 43 migration files; snap 34 migration files); (n) OBLIGATIONS FOR U-EXP-C: bind postponement_letter_dispatched(episode) := approval_letter_dispatched_at IS NOT NULL (never enqueue); the lapse acts on postponed + approval-settled episodes ONLY — a closed episode was a denial and never lapses, and a determined row whose episode is not postponed + settled is "no live postponement" (the postponement_not_honoured residue is #1700); the U-EXP-A period contract (filing → calendar-month end) now has a live producer; FOR U-CONT-c: suppress = true on kind-bearing routes for the continuation kinds (#1696) and the mass-change / adverse-action question for a $0 month+1 (#1706). Tracking issues filed 2026-09-03: #1696 (notices suppress), #1697 (default manifest noa-approval program_data_keys), #1698 (created=false residue after the supersede), #1699 (HoH heuristic divergence), #1700 (postponement_not_honoured disposition), #1701 (transient-failure pending still registers a checklist), #1702 (AR identity at the postpone gate), #1703 (per-category standard certification months), #1704 (non-expedited bases price back-dated months from the as_of window), #1705 (open episode + incomplete saga before the request step), #1706 (mass-change notice for a $0 month+1), #1707 (a record-back naming a dead episode still lands), #1708 (the record-back handler takes no household lock), #1709 (the orchestrator row lacks program_extension), #1710 (migrate the older specs to given/notices.ts); #1693 (the staging half) and #1683 (the filing-path lock) stay open.
IMPLEMENTATION NOTES (#1663 U-EXP-C, living spec): the U-EXP-C detail above is the spec; this block records the decisions the post-lapse arc forced and what the unit deliberately leaves alone.
-
(a) The flag is DERIVED — no status mutation, no stored stamp, no leg:
Application.post_lapse_pending(thereopen_pendingshape) is computed on every read by one SQL fragment with a BOUND legal-today term. Two arms are post-lapse: the released-after-the-deadline episode (completed+ approval-settled + never claimed — an in-cert release ALWAYS claims, so unclaimed ⇔ post-lapse) and the in-cert claim whose window lapsed unsettled (conversion_window_lapsed/ a stalled claim — U-CONT §4 assigns it here). A settled conversion (approved or denied), aclosed/revertedepisode, a lapsed-but-UNRELEASED episode and the completed-unsettled #1721 race never match. The flag clears by itself when the normal determination records back (the program row’sdetermination_idmoves; a denial also flips its status). -
(b) Obligation (n) —
postponement_letter_dispatchedis EVIDENCE, not a queue gate: the banner shows the approval letter’s dispatch date (or a text warning when it never dispatched); the queue never hides a household whose late proof needs processing because the agency’s letter failed. The BFF reads the wire field; the store fn is the server-side spelling the pins exercise; the lapse pins + journey assert DISPATCHED. -
(c) Surfacing:
GET /v1/applicationsgains the additivepost_lapse_pendingfilter (a partial index on the approved-expedited program rows); canopy-web’s My Queue makes a second applications call for flagged rows and MERGES by application id (typed reads, no double listing; the two calls fold into the one applications outcome), chip "Post-lapse expedited — run determination", ordering(reopen, post-lapse, due); the/applicationslist floats flagged rows in two stable passes (reopened, then post-lapse); the merge trusts the payload’s flag (deploy applications before web); the queue row and the flagged list row open/applications/{id}/process(application-pinned — the case page’s top-bar form binds the household’s NEWEST application); the process page renders the banner from the server flag independent of the postponement-panel read./team-queueand the in-flight count are unchanged (supervisor scope). A snap+tanf application’s chip shows to a TANF-only worker exactly asreopen_pendingdoes. -
(d) Nothing else moves: no event or routing key; renewals, enrollment and notices untouched;
noe_dispatched_atstays DB-only (the journey observes NOE dispatch through notices); the post-lapse case has no processing clock (#1725); the lifecycle issuance refusal is uncoded (#1726 — the journey matches the detail text); verification rows staypendingpast the deadline until the release resolves them. Erratum (2026-09-12): "the post-lapse case has no processing clock (#1725)" is SUPERSEDED — #1725’s amended ruling gives it one: every postponement release stamps the active SNAP row’scurrent_workflow_deadline= the release’s legal day +snap_standard_daysin the release transaction (the immutablestandard_processing_deadlinenever moves), the listApplicationcarries it asworkflow_due_date, and the worker queues sort the post-lapse band by it and mark it Overdue past the jurisdiction’s legal day. Item (e)'s "the day-30 legs exclude the row by status" still holds: the row is disposed by the WORKER, and the day-30 enforce protocol is unchanged. -
(e) Journey placement — FY2027 SNAP parameters are unstaged and the expired-set switch is off, so the whole arc sits inside FY2026: a ONE-month cert filed 2026-08-10 (Monday) ending 2026-08-31, lapse 2026-09-01, release 2026-09-08, the normal determination and the standard cert (through 2027-03-07) in September. Every post-epoch move is a whole-day advance from a 15:00Z epoch (11:00 EDT). The one-month NOE is staged and dispatched regardless of the #1694 arm (its stated deadline 08-15 lands three days after the 08-12 dispatch — never asserted). The release day precedes the SOP but the day-30 legs exclude the row by status. The expiry sweep report is logged, never asserted (the hourly probe may run first); the oracle is the enrollment row.
-
(f) Row 11 flips with the journey (describe bound verbatim), an integration binding on the applications HTTP flag pin, and the walkthrough page; the row’s text stays (id/tier/title untouched) — "benefits stop" is the sweep plus no September issuance, no letter. The arrange the two expedited flows share is lifted into the given library behind a
Worldconstants object (no flow assertion loosened; the in-cert flow’s fresh-row oracle gainedcurrent_workflow_deadline).
U-REP — Program-scoped rep authority + SNAP rep disqualification (273.2(n)(4))
Sub-units: U-REP-a program scope + the ONE enforcement check (weight 5) · U-REP-b consumer substrate: notices recipient path + appeals third arm (weight 3) · U-REP-c disqualification lifecycle + fanout + BFF + row flip (weight 5). Family total 13.
Purpose + regulatory cites
Designations gain a program-scope dimension (rep-authority ruling); the SNAP disqualification bar (7 CFR 273.2(n)(4): false information / benefit misuse, up to one year, written notice before effect) blocks/suspends SNAP scope only. Org-backed reps — drug/alcohol treatment centers 273.11(e), group homes 273.11(f), PAMMS 3120:70 — are first-class and exempt from the (n)(4) bar. AU hearing right 273.15 + PAMMS 3120:81-82 (AU may appeal; the rep may not); letters to every represented household 3120:83.
Data model (canopy-applications)
authorized_representatives (ALTER; existing table verified — household-scoped, inclusive effective/expiration dates, soft-delete active):
| column | type | constraint |
|---|---|---|
rep_kind |
TEXT |
NOT NULL DEFAULT 'individual' CHECK (individual|organization) |
organization_kind |
TEXT |
NULL CHECK (drug_alcohol_treatment_center|group_home); CHECK rep_kind='organization') = (organization_kind IS NOT NULL AND organization_name IS NOT NULL |
organization_name |
TEXT |
NULL (paired CHECK above) |
authorized_representative_program_scopes (NEW):
| column | type | constraint |
|---|---|---|
designation_id |
UUID |
FK authorized_representatives(id); PK(designation_id, program) |
program |
TEXT |
CHECK (snap|tanf|medicaid|caps|wic) |
suspended_by_disqualification_id |
UUID |
NULL FK rep_disqualifications(id); suspension not deletion, so reversal restores exactly what it suspended |
suspended_at |
TIMESTAMPTZ |
NULL; CHECK paired with suspended_by |
Migration: backfill one scope row per (existing designation × all 5 programs) — all-programs coverage as data reality, same migration tx (volume = per-household designations, trivial).
rep_disqualifications (NEW; person-scoped — the bar binds the person across designations):
| column | type | constraint |
|---|---|---|
id |
UUID v7 |
PK |
representative_person_id |
UUID |
NOT NULL |
program |
TEXT |
NOT NULL CHECK ('snap') — dimensioned for portability; only the SNAP writer exists |
reason |
TEXT |
CHECK (benefit_misuse|false_information) |
evidence_kind / evidence_refs |
TEXT / UUID[] |
CHECK (overpayment_claim|documented_finding); cardinality(evidence_refs) ≥ 1 — closed reason→evidence, no free-text bypass (finding-10 spirit) |
status |
TEXT |
CHECK (noticing|pending|in_effect|expired|cancelled|overturned) |
noticed_on |
DATE |
NULL — stamped from the rep letter’s |
effective_from / effective_through |
DATE |
NULL until noticing completes; half-open [from, through) — barred iff from ≤ d < through |
rep_letter_enqueued_at / rep_letter_dispatched_at |
TIMESTAMPTZ |
enqueue ≠ dispatch, tracked separately |
cancel_reason / cancelled_by / cancelled_at / appeal_id |
— |
CHECK (entered_in_error|hearing_overturned); hearing_overturned requires appeal_id |
created_by |
UUID |
claim-derived actor (reviewer_uuid shape) |
— |
— |
partial UNIQUE (representative_person_id, program) WHERE status IN (noticing,pending,in_effect) — one open bar, idempotency anchor |
— |
— |
EXCLUDE USING gist (representative_person_id WITH =, program WITH =, daterange(effective_from, effective_through) WITH &&) WHERE status IN (pending,in_effect) — overlap belt; requires btree_gist |
Contracts
-
Create/Update designation contracts gain
programs: Vec<ProgramCode>,rep_kind, org fields; responses expose per-program scope + suspension state. Two-step per finding 7 (below). -
THE one shared check —
rep_authority::assert_permitted(&mut Tx, rep_person_id, rep_kind, requested_programs, as_of)in canopy-applications, the sole authority arbiter. Semantics: refuse any requested program with an open bar (status ∈ noticing/pending/in_effect and, when dated, as_of ∈ [from, through)) — new grants blocked from record creation (the 30-day advance protects existing arrangements, not new ones; stated rule);rep_kind='organization'exempt (3120:70). Active-designation predicate everywhere:effective_date ≤ today AND (expiration_date IS NULL OR expiration_date ≥ today) AND active— inclusive both ends (finding 34); active scope = row present AND suspended_by IS NULL. -
Person-level serialization:
pg_advisory_xact_lock(REP_AUTHORITY_NS, hash(representative_person_id))taken inside every granting tx (via the check) AND the disqualify/cancel writers — no create-vs-disqualify write skew. -
Callers of the ONE check (finding 34, all in-tx): designation create; designation PUT (store update COALESCE-swaps
representative_person_id— re-check the full post-image: person, scope, dates); application create/submit withauthorized_representative_idset orsubmitted_by_role='authorized_representative'(checked againstprograms_requested— the backdoor closed); finalize saga (re-check before finalize; fails closed with actionable error if suspended since assignment); every as-rep action authorization (portal as-rep filing, web attach).
IMPLEMENTATION NOTES (#1664 MR-a1, living spec): (a) the rep_disqualifications DDL ships in U-REP-a’s migration — the scopes FK needs its target, and the ONE check’s bar arm enforces from day one against an empty bar set (writers stay U-REP-c’s); (b) person-level serialization uses the house-style NAMED advisory lock (canopy-applications.rep-authority.{person_id} via advisory_lock_id) rather than the literal two-arg REP_AUTHORITY_NS form (mechanism-equivalent; the U-REP-c writers must take the same name); (c) the bar formula for NEW grants: refuse iff status open AND (effective_through IS NULL OR as_of < effective_through) — a dated-future pending bar refuses (new grants get no advance shelter) and a ran-out window permits before the expiry drain flips it (date-based fail-safe); (d) chip is rejected in scope sets (an ELE outcome of a Medicaid determination, never independently applied-for — the 5-set CHECK is deliberate); (e) portal as-rep filing and web attach surfaces do not exist yet — the wired callers are create, PUT, the application-intake backdoor, and the finalize saga (structurally live, vacuous until drafts carry designations); (f) OBLIGATIONS FOR U-REP-c: the disqualify/cancel writers MUST take the same named person lock (rep_authority::lock_name) BEFORE any row locks (the PUT locks old+new persons sorted, then the row); and c must decide whether a PUT that merely RETAINS a barred program on an existing designation counts as a new grant (today the post-image re-check refuses even relationship-only edits while a bar is open — fail-closed, but in tension with "the 30-day advance protects existing arrangements"); the org-designation filing exemption resolves the designation’s rep_kind at the gate (3120:70).
IMPLEMENTATION NOTES (#1666 U-REP-c, living spec): (g) the PUT-retained-scope question is DECIDED: the bar gate judges NEW grants only (post-image minus pre-image; a person swap makes every scope a new grant for the new person) — a retained scope is an existing arrangement, sheltered by the 30-day advance and, once the bar is in effect, SUSPENDED; the PUT replaces scopes by DIFF so a retained suspended row keeps its provenance (no laundering through re-listing), and a person swap clears the old person’s stamps once the gate admits the new person; (h) letter provenance lives in a NEW table rep_disqualification_notice_recipients (one row per staged fanout event: kind initial\|rescission\|corrected, recipient_kind, designation, household, recipient person, envelope id UNIQUE) — it is the dispatch-correlation key (the plan’s "rep letter’s notice.dispatched correlation" needs an event-id anchor the substrate lacked), the rescission/corrected recipient set (letter who WAS noticed), and the appeals ownership set exposed as noticed_household_ids; (i) the disqualify writer is HUMAN-only (an exchanged supervisor\|admin bearer; a pure service token is 403 — an automated bar has no lawful writer), while cancel additionally admits a pure service principal for the appeals overturn seam; (j) the fanout letters print a PROVISIONAL enqueue-anchored window (dispatch ≥ enqueue, never understating the notice period); the record’s window is fixed by the dispatch correlation, so the drain’s re-anchor arm is a belt for anomalies rather than the normal late-dispatch path; (k) the producer payload carries top-level person_id = the RECIPIENT + household_id (the notices subscriber gate) — the plan’s payload list omitted them; (l) the designation CRUD widened from service-only to require_service_or_exchanged(CASEWORKER_OR_ABOVE) so the worker BFF writes with the worker’s own bearer (the family auth contract); (m) params: duration is capped at 12 months by the loader (the 273.2(n)(4) federal ceiling) and advance notice must be ≥ 1 day; the georgia citations carry the FIRST PAMMS 3120 pin. (n) canopy-web had NO representative UI at all (U-REP-a shipped none), so the finding-40 slice here CREATES the panel — list, add-designation form, disqualify modal, timeline, cancel/overturn — rather than extending a form; (o) the appeals overturn is a post-commit best-effort call with a timeline receipt/failure trail; the reconciliation sweep for un-receipted overturns is #1679; e2e helper consolidation is #1680; first-attempt terminal refusals in notices remain #1678.
Endpoints + drains (auth per finding 2)
| Surface | Auth | Behavior |
|---|---|---|
POST /v1/authorized-representatives/{id}/disqualify |
|
422 on org-kind designation ( |
POST /v1/rep-disqualifications/{id}/cancel |
same supervisor contract |
closed reasons; overturned requires appeal_id; tx: lock → status cancelled/overturned → clear scope suspensions WHERE suspended_by = id (designations independently expired/revoked stay down) → stage rescission fanout |
GET /v1/rep-disqualifications/{id}; GET /v1/persons/{pid}/rep-disqualifications |
require_service_or_exchanged (worker-read class — they serve the BFF timeline) |
appeals hearing-view fetch; web listing |
Drain |
in-process |
pending AND effective_from ≤ today(legal) → in_effect + suspend the person’s snap scope rows on active individual designations (suspend-once via suspended_by). Guard: refuses unless rep_letter_dispatched_at set AND date(dispatched)+advance_days ≤ effective_from; else re-anchors from/through off the dispatch date, stages corrected letters, stays pending — the 30-day floor is dispatch-anchored, never enqueue-anchored |
Drain |
in-process |
in_effect AND effective_through ≤ today(legal) (half-open) → expired + clear its suspensions. Enforcement predicates are date-based — correctness never waits on a drain run (fail-safe) |
noticing→pending is event-driven: the notice.dispatched correlation consumer stamps noticed_on = dispatch legal date and fixes effective_from = noticed_on + advance_days, effective_through = from + duration_months.
Events + cutover order
-
NEW
application.rep_disqualification_noticed— one event PER household designation + one rep-recipient event, each with its own event id; payload: disqualification_id, reason token, program,recipient_kind (household_member|authorized_representative), effective dates, and an immutable designation snapshot {designation_id, household_id, representative_person_id, program_scope, effective/expiration} (all signed notice inputs). NEWapplication.rep_disqualification_rescinded, same fanout. Topology-allow entries; ADR-004 tokens. -
Designation CRUD is event-less today (verified) — no event migration. The finding-7 two-step lands on the HTTP
programsfield: MR-a1 tolerant (absent ⇒ all-programs, matching the backfill) + all callers (web, portal, test-lib, seeds, contracts roundtrip) start sending it → MR-a2 withdraws tolerance (required), #1487→#1014 precedent. -
Deploy order (finding 41 multi-MR shape): a1 → a2 → b (notices recipient_kind + templates/routes + appeals arm; consumers/topology first) → c (producer + drains last) — no window where letters or the appeal arm lag the writer.
Notices
-
Templates (both rulesets, routed in both manifests):
rep-disqualification-household.typ,rep-disqualification-rep.typ,rep-disqualification-rescinded-household.typ,rep-disqualification-rescinded-rep.typ. Routing on event type discriminated byrecipient_kind(the routing table’s flat-string discriminator mechanics, finding-28 precedent). Uniqueness (source_event_id, notice_type) holds because every recipient owns its event id. -
Work items gain
recipient_kind(additive, default household_member — no cutover). Rep kind: the worker replaces the household-membership check with the snapshot check (existence/person-match validated against the designation record — forged-event hard-fail; content rendered from the snapshot as of notice date, so a designation revoked between staging and dispatch still letters truthfully). Rep address = the rep person’s own mailing-first persons path — never the household ACP/confidentiality redirect; household letters keep the normal household path incl. ACP. -
Content: household — rep name, SNAP, reason class, window, appoint-a-new-rep, AU hearing rights; rep — reason + evidence class, window, "the AU may appeal; you may not" (3120:81-82).
Params + citations (all four rulesets, ADR-011)
| key | default | pin |
|---|---|---|
[snap.authorized_representatives] disqualification_duration_months |
12 |
7 CFR 273.2(n)(4); georgia cites PAMMS 3120 — first 3120 citation lands the 3120 citation in the COMMITTED rulesets/georgia/citations.toml (pin discipline per U-FRAME docs note) |
[snap.authorized_representatives] disqualification_advance_notice_days |
30 |
273.2(n)(4) written notice prior to effect; PAMMS 3120 |
BFF-UI slice (finding 40)
Exchanged-token web routes; disqualify/cancel BFF routes carry WritePermission + CSRF + ProgramScope(snap) (ADR-044 scope math); designation form gains the program-scope multiselect + org-kind fields with validation + recovery UI; disqualify is a supervisor-role-gated modal (reason/evidence pickers, notice preview), plus a disqualification timeline view and cancel/overturn action. A11y: keyboard-operable multiselect, modal focus trap + return, errors associated via aria-describedby, status changes announced via aria-live.
Tests
-
Proptest (mandatory): bar-interval math — arbitrary dispatch dates/params ⇒ month-end-clamped duration, half-open invariant barred(d) ⇔ from ≤ d < through, pins at through−1 (barred) / through (free); enforcement totality — arbitrary (designation state × bar status × program × rep_kind) lands in exactly one truth-table arm.
-
Truth table = the spec (bar status × requested program × rep_kind → permit/refuse): noticing+snap+individual refuse; pending/in_effect+snap+individual refuse; in_effect+tanf permit; any+snap+organization permit; expired/cancelled/overturned+snap permit.
-
Race + idempotency pins: concurrent designation-create vs disqualify serialized by advisory lock (no snap grant slips past the bar); double-POST disqualify → 409 + existing id; effect drain vs concurrent cancel (row lock, no post-cancel suspension); drain re-runs idempotent (suspend-once); replayed fanout event → exactly one letter.
-
Migration: pre-existing rows get 5 scope rows; all-programs behavior identical pre/post. PUT swap to barred person → 409. Backdoor: create with barred rep + snap requested → 422; without snap → 201. Finalize after mid-flight suspension fails closed.
-
Fanout: multi-AU rep → N household letters + 1 rep letter (and rescission mirror); snapshot immutability + forged-snapshot hard-fail; rep letter to rep’s own address under household ACP.
-
Re-anchor: late dispatch → dates move forward + corrected letters; effect drain never flips with < advance days from dispatch.
-
Appeals: AU (a noticed household) files → accepted; rep files → refused; hearing view renders the record; overturn → cancel + scope restoration + rescission letters.
-
Finding 42 per drain: fence behavior, keyset multi-page continuation, tick budgets, concurrent triggers, retry/terminal failure, query-plan regression, legal-clock (legal-tz) tests.
Deployment + index notes
btree_gist extension. Indexes: scopes PK (designation_id, program); authorized_representatives (representative_person_id) WHERE active (fanout + effect drain — missing today); scopes (suspended_by_disqualification_id) WHERE suspended_by IS NOT NULL (reversal/expiry clear); rep_disq partial (effective_from) WHERE status='pending' and (effective_through) WHERE status='in_effect' (drain keysets); the partial unique + gist exclusion above. Docs (finding 44): Antora api/canopy-applications.adoc, data-models/canopy-applications.adoc, api/canopy-appeals.adoc, notices pages under the Services nav group; citations.toml 3120 pin (per U-FRAME docs note). Row flip: authorized-rep-disqualification (flow) via flow-snap-authorized-rep-disqualify.spec.ts; allowlist flip authorized-rep-disqualify.
Out of scope
Org-entity registry in persons (designation-level org fields suffice; follow-up issue filed); 273.11(e) center-misuse claims/penalties; non-SNAP disqualification writers (table dimensioned, no writer); in-cert benefit effects (the bar suspends authority, never household benefits — nothing to continue, consistent with finding 13’s CB ruling).
FINDINGS RESOLVED
-
33 (ruling): program-scope dimension via the scopes child table; migration backfills every existing designation to all-programs; every consumer updated — designation create/PUT, application filing via rep, the
authorized_representative_idbackdoor, finalize saga, action authorization, portal as-rep, web rendering, seeds/test-lib. -
34: ONE
rep_authority::assert_permittedacross create / PUT-swap / assignment / filing / finalization / action-auth; person-level serialization via advisory lock + partial-unique + gist exclusion; "active" honors inclusive effective/expiration dates. -
35: full status lifecycle with closed reason→evidence model, overlap/idempotency constraints, cancellation/overturn reversal restoring exactly-what-was-suspended, expiry drain, half-open [from, through) interval; drug/alcohol centers AND group homes modeled first-class (
rep_kind/organization_kind) and bar-exempt with the disqualify endpoint refusing org targets. -
36: one event per household designation with per-recipient event ids preserving (source_event_id, notice_type) uniqueness; rep letter rendered/validated against the immutable designation snapshot as of notice date; rep-scoped address path with no household ACP/confidentiality redirect.
-
13 (third-arm clause, partial — union substrate is U-DENY’s): contested union gains the
rep_disqualificationarm on filing + hearing view, ownership = noticed household, rep-as-appellant refused, overturn wired to the cancel endpoint.
46-finding disposition (finding → resolving unit/section)
| # | Resolution | Unit |
|---|---|---|
1 |
15-row disposition (12 flips, 3 re-fence to F1); the Georgia intake On-Demand row flips at U-D30-B (spec authored U-INT-C) |
U-FRAME, U-INT-C, U-D30-B |
2 |
Family auth-contract table: require_service_or_exchanged + claim-derived actor; supervisor role arrays; service-only reads; web WritePermission+CSRF+ProgramScope |
U-FRAME (binding on all) |
3 |
Distinct immutable clocks; expedited screen never overwrites; day-30 keys on standard/current_workflow |
U-FOUND (consumed U-D30) |
4 |
evaluated_as_of never back-dated; distinct benefit_effective_date; programs=[snap] dispatch |
U-PROV |
5 |
Basis + operation id signed via the additive-field ritual + KATs; persisted at all three layers |
U-PROV |
6 |
Claimed operation id, context→signature→event→CAS record-back (bulk triple shape) |
U-PROV |
7 |
Two-step tolerant→require (#1487→#1014), consumer-first order, park/DLQ/replay rules, snapshot vN+1 |
U-PROV (+U-CONT, U-VER cutovers) |
8 |
legal_filed_date + basis persisted once; next-business-day rule; all clocks derive |
U-FOUND |
9 |
AdministrativeDenialReason (new name; DenialReasonCode untouched) |
U-DENY |
10 |
Procedural-only closed reason→evidence matrix; no worker_judgment/merits/other; withdrawal stays withdrawal |
U-DENY |
11 |
administrative_denial_id + episode uniqueness + idempotency + CAS + evidence-ownership rule + stale-state 409 |
U-DENY |
12 |
Per-program SNAP web action; server-side evidence resolution; fail-closed recipient |
U-DENY |
13 |
Three-arm contested union on filing + typed hearing-view union; ownership validation; CB/overpayment events stay determination-only |
U-DENY (+U-REP third arm) |
14 |
program/purpose/episode columns + natural-key v2 + scoped cancellation |
U-VER |
15 |
Exact-caller batch-context endpoint (minimal projection, no notes); portal route byte-frozen |
U-VER |
16 |
Written-request-anchored due dates: routed checklist letter, dispatch-date anchor, policy-version pin, 10-day floor |
U-VER |
17 |
Disjoint precedence truth table, default AGENCY fault, authoritative columns, critical-vs-deduction split |
U-D30 |
18 |
Reservation + conditional transition; active join; 3105:334-336 calendar shifts |
U-D30 |
19 |
Enqueue≠dispatch split; nomi_dispatched_at via notice.dispatched correlation; NOE/noticed_on replicas |
U-NOMI (+U-EXP, U-REP) |
20 |
cured_on server-derived from completion evidence; supervisor-authorized audited attestation fallback |
U-REOPEN |
21 |
Reopen episode table + episode-aware recompute + fresh clock + auto determination dispatch + queue predicates |
U-REOPEN |
22 |
reopen_sagas (claim_or_resume shape): durable steps, retries, compensation, incomplete state |
U-REOPEN |
23 |
Void = new terminal voided status on the later SNAP program row ONLY; distinct agency-void event + household letter; serialization |
U-REOPEN |
24 |
U-EXP-A dormant consumers/topology/NOE before the U-EXP-B producer |
U-EXP |
25 |
RULED: the general continuation primitive (in-place CAS adjust; reductions via adverse-action pipeline; #1133 narrows) |
U-CONT |
26 |
Postpone saga; release gated on acknowledged verification effects (batch create acks; no false completion) |
U-EXP-B (+U-VER primitives) |
27 |
Single postponement state machine; server-derived items; evidence-scoped identity gate; deadline formula; day-7 reversion drain; repeat-gate ordering/locks |
U-EXP-B |
28 |
Composite (status, basis.kind) routing; upstream id + notice inputs signed onto the event; exactly-one letter |
U-EXP-B |
29 |
Causal-order guard + pre-side-effect idempotency; manual-path NOE recipient |
U-EXP-A (+U-CONT guards) |
30 |
Post-lapse writer = the worker cert path, named; expedited enum consumers enumerated |
U-EXP-C |
31 |
Combined initial allotment + event-path initial-month proration IN scope; supplemental issuance on continuation |
U-EXP-A (+U-CONT-b) |
32 |
certification_end_date; pending_issuance in the sweep; lifecycle bump; both issuance paths cert-end-guarded |
U-EXP-A |
33 |
RULED: program-scoped authority (scopes child table; all-programs backfill; every consumer) |
U-REP |
34 |
ONE assert_permitted check across all five write paths; person-level serialization; date-honoring active |
U-REP |
35 |
Full lifecycle (reason/evidence, overlap, cancel/overturn, expiry drain, half-open interval); org reps first-class + bar-exempt |
U-REP |
36 |
One event per designation (per-recipient ids); immutable designation snapshot; rep-scoped address path |
U-REP |
37 |
Real agreed instant; per-mode NOT NULL location/dial-in/contact; distinct On-Demand notice + text |
U-INT |
38 |
Transition guards G1-G5; complete/waive close missed rows; non-branching supersession |
U-INT |
39 |
3105:240 encoded (NOMI for the initially scheduled appointment); headroom param + proptest timing guarantee |
U-INT + U-NOMI |
40 |
BFF/UI slice per unit with the four-point a11y line; test-lib excluded |
U-FRAME conventions, every unit |
41 |
Dependency graph, params-owned-before-consumed ledger, dormant activations, multi-MR shapes, numbered cutover |
U-FRAME |
42 |
8-point drain production-safeguard checklist copied into every drain unit |
U-FRAME → drain units |
43 |
Shadow rollout: shadow mode, durable findings, cutoff/backfill, canary, kill switch, rollback runbook |
U-D30 |
44 |
Per-service api/ + data-models/ Antora pages; actual nav group; committed citations.toml pin path |
U-FRAME |
45 |
Corrected baselines absorbed (existing eligibility DI; required determination_id untouched; status param widened not added) |
U-FOUND/U-PROV/U-VER |
46 |
SME inventory: all four flags resolved in-plan with owners |
U-FRAME |