SNAP event-path issuance residuals on the back-dated bases (F2 of the #788 family)

Status: Done (2026-09-07) — !1324
Epic: &81
Issues: #1635 (closure) · #1749 U-F2-FRAME (w1) · #1750 U-F2-A (w8) · #1751 U-F2-B (w3) — stream weight 12
Branch: feat/1635-event-path-residuals — one MR (Closes #1749, Closes #1750, Closes #1751, Closes #1635), separate commits: the template v2026.5 resync, the frame, A-1…A-7, B-1…B-5.
Why one MR: the units share one migration and one devstack reload, B’s chain test asserts A’s landing rule, and the maintainer directed a single branch; the template resync rides along because this page is written under the rules it brings (covered by #1749, no separate issue).

This is a Design + Scope plan under the v2026.5 plan rule: GitLab owns tracking, the child issues carry the implementer detail (file:line facts, per-group acceptance criteria), and the plan freezes when A-1 starts — a deviation is a one-line erratum under the Review log.

Context

F2 (#1635) follows F1 #1634 in the tier-order burn-down of epic &81. Finding 31 of the #788 family narrowed it to the event-path issuance paths no flipped #788 row depends on, on the non-family bases order_effective and mass_change_cola: (1) first-issuance semantics when benefit_effective_date precedes the landing month; (2) the single missed intervening month (multi-month restoration stays #1113); (3) settlement-worker parity with the HTTP issue path. Constraints from the issue: each path pinned or proven no-behaviour-change; the family-owned surfaces (U-EXP-A = services/canopy-enrollment/src/issuance.rs, api/issue_guards.rs::issuance_figure and the row-free refusals; U-CONT = services/canopy-enrollment/src/continuation/) are consumed, never modified; proptests on new month math; no flipped row may gain a dependency on #1635.

The mapping against main established four defects in canopy-enrollment:

  • A parked back-dated approval replaying after the prior enrollment leaves the live set is created born-expired; the settler pays its first row within seconds.

  • A mass_change_cola approval with no live enrollment originates a certification; 7 CFR 273.12(e) never does.

  • No household-level month guard exists on any writer, and the settler’s EBT call runs outside any transaction, so a row the sweep cancels mid-call is briefly invisible as coverage while its money is moving.

  • The event path stamps the expungement clock from the benefit month, the HTTP path from the issuance day; the settler reads its day after the EBT call, the HTTP path before it.

Everything else on these bases is already correct and needs pins. The one ruling: the residual bases never mint more than the anchor month’s row — the back span behind a back-dated anchor is restoration (273.17) and belongs to #1113; F2 names the uncovered months loudly and mints nothing for them.

Regulation (verbatim; eCFR 2026-09-01, uscode.house.gov)

  • 7 CFR 273.10(a)(1)(ii) — "As used in this section, the term “initial month” means the first month for which the household is certified for participation in SNAP following any period during which the household was not certified for participation, except for migrant and seasonal farmworker households." Proration: "(A) The State agency shall use a standard 30-day calendar or fiscal month …" / "(B) The State agency shall prorate benefits over the exact length of a particular calendar or fiscal month."

  • 273.10(a)(1)(iii)© — "If after using the appropriate formula the result ends in 1 through 99 cents, the State agency shall round the product down to the nearest lower whole dollar. If the computation results in an allotment of less than $10, then no issuance shall be made for the initial month."

  • 273.12(e)(1)(ii) — "A notice of adverse action shall not be used for these changes." 273.12(e)(3)(i) — "These changes shall be reflected no later than the second allotment issued after the month in which the change becomes effective."

  • 273.15(c)(1) — "Within 60 days of receipt of a request for a fair hearing, the State agency shall assure that the hearing is conducted, a decision is reached, and the household and local agency are notified of the decision. Decisions that result in an increase in household benefits shall be reflected in the household’s EBT account within 10 days of the receipt of the hearing decision …"

  • 273.15(s) — "The State agency is responsible for insuring that all final hearing decisions are reflected in the household’s SNAP benefit allotment within the time limits specified in paragraph (c) of this section. (1) When the hearing authority determines that a household has been improperly denied program benefits or has been issued a lesser allotment than was due, lost benefits shall be provided to the household in accordance with § 273.17."

  • 273.17(a)(1) — "The State agency shall restore to households benefits which were lost whenever the loss was caused by an error by the State agency … benefits shall be restored for not more than twelve months prior to whichever of the following occurred first: (i) The date the State agency receives a request for restoration from a household; or (ii) The date the State agency is notified or otherwise discovers that a loss to a household has occurred." (a)(2) — "The State agency shall restore to households benefits which were found by any judicial action to have been wrongfully withheld. …" (a)(3) — "Benefits shall be restored even if the household is currently ineligible."

  • 273.17(b) — "… the State agency shall automatically take action to restore any benefits that were lost. No action by the household is necessary. … The State agency shall notify the household of its entitlement, the amount of benefits to be restored, any offsetting that was done, the method of restoration, and the right to appeal through the fair hearing process …" (d)(1)(i) — "If an eligible household’s application was erroneously denied, the month the loss initially occurred shall be the month of application, or for an eligible household filing a timely reapplication, the month following the expiration of its certification period."

  • 274.2(i)(1) — "On a daily basis, the State agency shall expunge benefits from EBT accounts at the monthly benefit allotment level in accordance with either paragraph (i)(1)(i) or (ii) of this section. State agencies must designate which approach will be used in its State plan and use the same approach for all households within the State." (i)(1)(i)(A) — "… as each benefit allotment ages to nine months since the date of issuance or since the last date of account activity, whichever date is later." (i)(1)(ii) — "The State agency shall expunge individual benefit allotments, or portion thereof, that remain in a household’s EBT account nine months (274 days) after the date the allotment was issued to the household, regardless of any account activity that may have taken place."

  • 7 USC §2016(h)(12)©(i) — "Subject to clause (ii), a State agency shall expunge benefits that have not been accessed by a household after a period of 9 months, or upon verification that all members of the household are deceased." (The repo’s (h)(9) cites are drift — #1746.)

  • Georgia PAMMS 3805 (inactivity-based expungement with an activity reset) and 3810 (the $24 floor, even-dollar rounding, the 30-day table) are the state manual behind #1744 and #1742; expungement_days is 274 in rulesets/georgia/jurisdiction.toml and 270 in test-max.

Scope

In scope

  • canopy-enrollment (U-F2-A): the subscriber’s apply date threaded into the create path; the two typed refusals and the COLA park under the live row’s lock; the uncovered-month WARN + counter; household coverage dropped from the plan’s own rows; the settle claim lease; the HTTP household 409; the issuance-day expungement anchor on every writer; pins P1–P4, P7, S3; the api + data-model lines.

  • Producers and the chain (U-F2-B): the canopy-snap OrderEffective period pinned; the bulk cas_claim COLA mint pinned; test-lib determine_with_order + jurisdiction_issuance_params; one clock-free back-dated order chain test; the #1635 closure gates.

  • The frame (U-F2-FRAME): this page, the nav line, the roadmap link, the CHANGELOG bullets, the three child issues under &81, the verification of the six filed follow-ups #1741–#1746, the relations, #1635 → weight 12.

Out of scope (each owned elsewhere)

  • Minting any month behind the anchor, multi-month restoration and its writer — #1113 (273.17), #794; the recurring monthly scheduler — #793.

  • Re-determination of an enrolled household on a non-COLA basis (the one-live park stays) — #1133; the COLA dispatcher’s own idempotency, notices and in-place application — #806, #1213, #776.

  • The 274.2(i) approach designation, the inactivity reset and any EBT-activity clock — #1744 (a go-live gate), #1553; the reconciliation of a terminated enrollment’s pending row — #1112.

  • The follow-ups this plan files: #1741 (D7 floor-ownership hole), #1742 (D12 Georgia proration figures), #1743 (F6 fence-trip posting day), #1744 (F7 inactivity reset), #1745 (F8 cutover re-anchor of issued balances), #1746 (F15 statute paragraph drift).

  • Any change to the family-owned services/canopy-enrollment/src/issuance.rs, services/canopy-enrollment/src/api/issue_guards.rs or services/canopy-enrollment/src/continuation/ beyond the disclosed test-only call-site edits; any scenario, action or allowlist row. Rows this plan must not touch (compliance/scenario-inventory/snap.toml): snap.intake.reopen-within-60-days, snap.change.periodic-report-late-file-proration, rows 13–14, snap.benefits.initial-month-proration; relate-only: the mass-change COLA rows, recert-agency-delay-restoration, combined-initial-allotment, the hearings/integrity restoration rows.

Design

Decisions (with the review findings each resolves)

# Decision Lands in

D1

Apply month = the subscriber’s jurisdiction legal-today, read once per message in main.rs and threaded as today: NaiveDate into create_from_inputs; tests pass a fixed date.

main.rs, auto_enroll.rs, 13 call sites

D2

order_effective on a not-enrolled household is an initial month (273.10(a)(1)(ii)); today’s proration and the $10 floor are pinned, not changed.

pins P1a/b/c

D3 (F1)

mass_change_cola never originates a certification: a live row — checked UNDER its lock (lock_enrollment_row FOR UPDATE) — makes the guard return the park itself, never the INSERT conflict; no live row is a typed refusal (DLQ). Deterministic interleaving pin.

enroll_guards.rs

D4 (F10)

No intervening month minted. Uncovered months — the months strictly between the first minted month and today’s month that no enrollment of the household covers (combined expanded) — are WARNed + counted (reason = uncovered_months); no WARN when zero.

enroll_guards.rs, metrics.rs

D5 (F3, F4)

G1: resolved cert_end < today → typed refusal. G2: household coverage → covered months DROPPED from the plan’s own rows, never shifted or re-priced — a single-row plan becomes FirstMonthCovered (no first row; the enrollment stays pending_issuance for the monthly path), a combined plan keeps only its uncovered half at the plan’s own figure. Coverage counts every non-cancelled regular row of the household, claimed pending included.

enroll_guards.rs, store query

D5b (F2)

Settle claim lease settle_claimed_at, stamped before the EBT call and cleared at landing; the sweep never cancels a row under a live lease (10 min).

migration, store.rs, issuance_settlement.rs, expiry_sweep.rs

D5c (F5)

HTTP row-free 409 benefit_month_covered_by_household (other enrollments of the household), called after the existing refusals.

services/canopy-enrollment/src/api/household_coverage.rs (new), services/canopy-enrollment/src/api/mod.rs

D6 (F7, F9)

One expiry anchor for every writer: the issuance day. Each writer reads today ONCE before its EBT call and passes it to the landing (expiry + activation); the mint stamps today + expungement_days provisionally and the landing overwrites it. Anchor alignment only — not an inactivity clock (#1744). Resolves #1723’s open decision; its pins stay #1723’s.

store.rs, settlement spine, services/canopy-enrollment/src/api/mod.rs, auto_enroll.rs

D7

Floor-ownership hole → filed (#1741), not fixed (family-owned).

—

D8

Denial leg → pinned no-op (P4) + a docs sentence + a note on #1133.

pins

D9

Parity → unit pin + proptest of outside_certification_window (P7b ≡ the HTTP predicate); an in-crate pin that a past in-window month settles (P3).

tests

D10 (F11, F12)

One clock-free chain pin: previous-month anchor (first_of_month(today) − 1 month), jurisdiction params read from the ruleset TOML by a test-lib helper.

canopy-eligibility/tests

D11, D12

Regulation verbatim (above); the Georgia $24 table filed (#1742).

frame

D13

Relations on #1635: #1133, #1113, #1723, #1553, #793, #794, #797, #1704, #1695, #1726, #1112, #806, #776 + the six follow-ups.

frame

D14

No COLA day-1 guard: the create-time cola_as_of_mismatch refusal exists; P8 pins the mint.

U-F2-B

D15–D17

Fixtures inside one FY window; order trigger ChangeReport, source f2-order-test; the stale OrderDispatchContext::as_of doc fixed.

U-F2-B

F6, F8, F15

Deferred explicitly: the fence-trip posting-day discrepancy (#1743); pre-#1635 issued balances keeping their mint-time expiry (#1745, before go-live); the (h)(9) cites (#1746).

issues

F13, F14

The COLA write-once pin re-arms by test SQL and changes the run’s as_of before the second claim; the HTTP pin’s arrange helper gains a basis parameter and passes order_effective.

tests

S1–S4

The snap proptest gains an approved OrderEffective arm; metrics.rs lands in the group that first bumps the counter (A-3); the date-independence property is stated exactly (empty coverage, cert_end ≥ today → the identical planned row for every today ∈ [anchor, cert_end]); the order chain is end-to-end, COLA has a store-level mint pin only.

tests

Steps (units and commit groups)

Every commit group is gated (cargo fmt; cargo clippy -p <crate> --all-targets — -D warnings; the unit lane; the live lane CANOPY_TEST_INFRA=required in a .ports.env subshell against a devstack reloaded from the branch; cargo xtask quality-budgets --fail-on-regression; rustdoc with -D rustdoc::broken_intra_doc_links), J1–J8-reviewed by a fresh subagent, then a token-gated signed commit (subject ≤ 72 chars; a Co-Authored-By: trailer naming the committing session’s actual model). No group references a symbol a later group introduces. Fn-length judgment (clippy 40): create_from_inputs ≤ 25 lines, new helpers ≤ 35; every store call takes &mut **tx and is awaited before the next. No wire change; rollback = revert, including the additive migration’s column.

U-F2-FRAME (weight 1) — docs(plan): add the F2 event-path issuance residuals frame (#1749)

  1. This page; nav.adoc — the third * line of the SNAP Intake Completion (#788, epic &81) group; roadmap.adoc — the #1635 sentence links the page; CHANGELOG.adoc == Unreleased — an === Added bullet for the frame and a === Changed bullet for the template resync (the CHANGELOG entry lands once per MR, at MR-open).

  2. GitLab: the three child issues (weights 1/8/3; labels type::feature, priority::medium, program::snap, planning::has-plan, workflow::ready, ONE scoped service:: — service::enrollment on FRAME/A, service::eligibility on B; epic_id &81; epic task-list lines); #1635 → weight 12, planning::has-plan, the scope note; the six follow-ups #1741–#1746 verified filed with the D/F meanings above; the relations applied.

  3. Gates: asciidoctor --failure-level WARN, cargo xtask plan-lint, cargo xtask check-docs; no #<…> placeholder remains once the children are numbered.

U-F2-A (weight 8) — canopy-enrollment, seven commits

Detail + acceptance criteria: #1750. One commit per group, in this order.

  1. A-1 refactor(enrollment): thread today into create_from_inputs — create_from_inputs(tx, params, inputs, today: NaiveDate); main.rs reads legal_today(<the subscriber’s legal tz>) once before validate_for_enrollment; the 13 call sites pass a fixed date (auto_enroll.rs ×3; expiry_sweep.rs ×6 — stale seeds pass today = end; issuance_settlement.rs ×1; services/canopy-enrollment/src/continuation/infra_tests.rs ×2, call-site only, disclosed). Behaviour identical.

  2. A-2 feat(enrollment): refuse born-expired and COLA-originated enrollments — new enroll_guards.rs (SPDX):

    • pub enum EnrollDefect (thiserror): CertificationEndedBeforeLanding { determination_id, certification_end, today } — "certification end {certification_end} precedes the landing day {today} — determination {determination_id} refused (certification_ended_before_landing; 7 CFR 273.17 restoration territory; 1635)"; MassChangeWithoutLiveEnrollment { household_id, determination_id } — "household {household_id} has no live enrollment — mass_change_cola determination {determination_id} cannot originate a certification (mass_change_without_live_enrollment; 7 CFR 273.12(e); #1635)"; Db([from] sqlx::Error).

    • pub(crate) enum PreInsert { Proceed, Park(canopy_mq::ParkEvent) }; guard_before_insert(tx, inputs, cert_end, today) → Result<PreInsert, EnrollDefect>: G1 first; then for kind mass_change_cola: peek_live_enrollment_id → Some(id) → lock_enrollment_row(id) → live under the lock → Park(ParkEvent { reason: the #1130/#1133 text + "(mass_change_cola)", min_schema: None }), not live → refuse; None → refuse.

    • create_from_inputs ≤ 25 lines (resolve end → guard → insert enrollment → plan → insert first issuance; keeps anyhow::Result<()>) returns the park as its error, top-level, so canopy-mq acks + parks and the lock releases with the rollback.

    • Pins: G1 refusal, zero rows; COLA with no live row → refusal; COLA with a live row → ParkEvent; the interleaving pin — connection B runs store::expire_enrollment on the live row WITHOUT committing, A runs the COLA create (the peek sees live; the lock blocks), B commits after 200 ms → A’s re-check under the lock finds it not live → refusal, no enrollment row; the R7 unpark pin re-fixtured (stale seed today = end; a fresh second approval parks → sweep → lands; a stale third replay → CertificationEndedBeforeLanding); the provenance pin re-fixtured to OrderEffective.

  3. A-3 feat(enrollment): warn + count uncovered months behind a back-dated row:

    • metrics.rs (SPDX): OnceLock<EnrollmentMetrics>, global::meter("canopy_enrollment"), u64_counter("canopy_enrollment_backdated_first_issuance_total"), labels basis_kind, reason ∈ {uncovered_months, first_month_covered}; Cargo.toml opentelemetry = { workspace = true }; mod metrics;.

    • store::list_household_covered_months(exec, household_id, from, to) → Vec<NaiveDate> (SQL in a const): non-cancelled regular rows of ALL the household’s enrollments over [from − 1 month, to], combined rows expanded to {m, m+1}; rides idx_snap_enrollments_household + idx_snap_issuances_enrollment_month_all; EXPLAIN pin.

    • enroll_guards::uncovered_months(first_minted, today, covered) → Vec<NaiveDate> — months strictly between, minus covered; pure; proptest: empty for same/adjacent months, never contains a covered month, ⊆ the open interval.

    • WARN tracing::warn!(determination_id, household_id, basis_kind, first_row_month, landing_month, uncovered_months = ?months, restoration_pending = true, "back-dated first issuance: {n} uncovered month(s) between the first row and the landing month — 7 CFR 273.17 restoration candidate (#1113; #1635)") + the counter; nothing when the list is empty. Pins: P2 in-crate (anchor 07-01, today 09-06, no other coverage → one July row; the WARN names August); a July+September prior names August only; the proptest.

  4. A-4 feat(enrollment): drop household-covered months from the first issuance:

    • FirstIssuancePlan::FirstMonthCovered { month } (new variant; insert_first_issuance mints nothing, INFO like NoneWithinCertification; the enrollment stays pending_issuance and the monthly HTTP path issues later months).

    • enroll_guards::apply_household_coverage(plan, covered) → FirstIssuancePlan (pure): a single covered row → FirstMonthCovered; combined {M, M+1}: M covered → full_month_row(M+1, covered_next_month_amount) if > 0 else FirstMonthCovered, M+1 covered → prorated_row(M, …) from the plan’s own figures, both → FirstMonthCovered; nothing covered → unchanged. Proptest: never a covered month; every amount and month comes from the input plan; a combined plan never survives partially combined.

    • plan_first_issuance(tx, params, inputs, cert_start, cert_end, today): the unchanged pure first_issuance_plan → ONE coverage query over [planned month, planned month + covered − 1] ∪ [first minted + 1, today − 1] (to = max(cert_end, today)) → apply_household_coverage → uncovered_months → WARN/counter — the counter bumps once per landing: first_month_covered when the plan was dropped, else uncovered_months when the list is non-empty; the WARN names the uncovered months either way.

    • The lease (D5b): migration 20261231000000_issuance_settle_claim.sql — ALTER TABLE snap_benefit_issuances ADD COLUMN settle_claimed_at TIMESTAMPTZ; + a column comment.

    • store::claim_for_settlement(pool, id) → bool (UPDATE … SET settle_claimed_at = now() WHERE id = $1 AND issuance_status = 'pending' AND (settle_claimed_at IS NULL OR settle_claimed_at < now() - interval '10 minutes')); settle_one claims before the adapter call and skips the row when the claim fails.

    • The landing mark also sets settle_claimed_at = NULL; cancel_pending_issuances_for gains AND (settle_claimed_at IS NULL OR settle_claimed_at < now() - interval '10 minutes').

    • The HTTP guard (D5c): new services/canopy-enrollment/src/api/household_coverage.rs (SPDX), pub(super) async fn refuse_covered_by_household(pool, enrollment, req) → Result<(), ApiError> → 409 benefit_month_covered_by_household ("another enrollment of this household already covers {month} (7 CFR 273.10(a); #1635)") using the same store query with e.id <> $enrollment (own-row duplicates keep their existing codes); called in services/canopy-enrollment/src/api/mod.rs right after refuse_past_cert_end_and_covered.

    • Coverage pins: issued July on an expired prior → new anchor 07-16 → FirstMonthCovered, no row, WARN; a combined prior covering July+August → new July anchor → FirstMonthCovered; a combined candidate with September covered and following = 0 → FirstMonthCovered, with following > 0 → one October row at following; the U-RC-C-b reinstatement pins unchanged.

    • Lease pin: claim → run the sweep → the claimed row stays pending (enrollment expired, revision bumped) → land_settlement fence-trips → the row stays pending for reconciliation and G2/HTTP count it as coverage meanwhile; a lease older than 10 min is cancellable (SQL back-dates the claim).

    • HTTP pins: after FirstMonthCovered for July, issue_benefits(July) → 409 coded and issue_benefits(August) → 201 full; services/canopy-enrollment/tests/enrollment_test.rs arrange_event_path_shape_via_sql gains a basis parameter (F14).

  5. A-5 fix(enrollment): stamp the expungement clock from the issuance day:

    • store::mark_issuance_issued_fenced(.., expiry_date: NaiveDate) sets expiry_date = $5, settle_claimed_at = NULL.

    • The settlement spine takes issuance: &IssuanceParams (replaces tz; land_settlement also gains today): settle_one reads today = legal_today(issuance.timezone) ONCE before the adapter call and passes it to land_settlement(.., today) → benefit_expiry_date(issuance, today) and activate_if_first(tx, row, today); HTTP passes its pre-call today's expiry and activation date.

    • insert_first_issuance stamps benefit_expiry_date(params, today) provisionally (the drains read issued rows only).

    • Callers: every caller of the mark and of settle_once/settle_one (the compiler finds them); the three mint-expiry pins assert the issuance-day rule (a changed spec, explained in the commit).

    • Pins: a row minted for 2026-03-01 settles with expiry_date = today + N and ≠ the mint value; land_settlement with an injected today ≠ wall clock → both stamps equal the injected day.

    • Docs: docs/modules/ROOT/pages/data-models/canopy-enrollment.adoc (the issuance-day anchor + #1744) and its ERD; docs/modules/ROOT/pages/api/canopy-enrollment.adoc (the landing rule + the #1743 discrepancy); the migration-file recount.

  6. A-6 test(enrollment): pin back-dated bases P1-P4, P7 + window predicate — P1a/b/c (OrderEffective: 07-16 → 07-01 row 150 prorated 16/31; day-1 → full; 07-31 $29 → 08-01 full); P3 (a July order_effective row settles in September; cert_window_skipped empty); P4 (a denied event against an enrolled household: Ok(None), counts and lifecycle_revision unchanged, no enrollment_pending_terminations row, the pending first row still settles); the outside_certification_window unit pin (three arms) + proptest P7b (is_none() ⇔ !(month > end) && !(month < first_of_month(start))); the S3 property; helper arrange_subscriber_pending_from(pool, evt, today).

  7. A-7 docs(enrollment): document the F2 api and data-model lines (#1750) — docs/modules/ROOT/pages/api/canopy-enrollment.adoc: the household 409 + the request-time-only floor caveat (#1741); the landing rule, the claim lease, the fence-trip note; the apply month, the two typed refusals, FirstMonthCovered, the uncovered-month WARN + counter, restoration = #1113; the phantom benefit.issued / benefit.expunged line dropped; the refusals + the denial no-op. CHANGELOG === Added (guards, refusal arm, lease, HTTP 409, WARN/counter) and === Fixed (every issuance writer stamps the expungement clock from the issuance day).

U-F2-B (weight 3) — producers, chain, closure; five commits

Detail + acceptance criteria: #1751. One commit per group, in this order.

  1. B-1 test(snap): pin OrderEffective to the legacy period (loop + proptest) — the determine.rs denial loop gains Some(OrderEffective{..}); the legacy_kind selector 0..=3; the new approved arm (S1): benefit_period_for_basis(true, Some(&order), anchor, Some(start), &params) == benefit_period(true, anchor, cert_months, renewal_months) and ≠ the conversion result when anchor != start.

  2. B-2 test(eligibility): pin cas_claim’s mass_change_cola mint at run as_of — bulk_store_test.rs: seed_run (as_of 2026-10-01) + seed_case + cas_claim(.., "preview", 1) → MassChangeCola, anchor 2026-10-01; re-arm by test SQL (UPDATE cohort_cases SET attempt_started_at = NULL, state = 'dispatched' WHERE id = $1) and UPDATE cohort_runs SET as_of = '2026-11-01'; the second claim returns Some with basis and anchor UNCHANGED (F13).

  3. B-3 feat(test-lib): add determine_with_order + jurisdiction params — crates/canopy-test-lib/src/given/mod.rs determine_with_order(application_id, household_id, as_of, source) → Option<DetermineResponse> (eligibility service token; order: Some(OrderDispatchContext { origin: RequestOrigin { source, ref_id: Uuid::now_v7() }, as_of, trigger: ChangeReport, program_epoch: 1 })); jurisdiction_issuance_params() → JurisdictionIssuanceParams { timezone: chrono_tz::Tz, expungement_days: i64 } parsed from rulesets/{test_jurisdiction()}/jurisdiction.toml (F12); the orders.rs doc + docs/modules/ROOT/pages/api/canopy-eligibility.adoc (the order’s BENEFIT anchor; evaluation is legal-today since #788).

  4. B-4 test(eligibility): pin one first row for a back-dated order — services/canopy-eligibility/tests/order_backdated_enrollment_test.rs: a real household + application; as_of = first_of_month(legal_today(tz)) − 1 month (F11); poll EnrollmentClient::list_enrollments / list_issuances_for_household → one enrollment, basis kind order_effective, benefit_effective_date == as_of < first_of(today); exactly one row for as_of, full allotment, prorated = false; after settlement (devstack tick 500 ms) expiry_date == date_in(issued_at, tz) + expungement_days from the helper. Skips loudly without a devstack (infrastructure_available() + canopy_test_lib::skip_or_panic, the project convention until the visible-skip sweep lands); no clock pins.

  5. B-5 docs(eligibility): document F2 and record the closure (#1751) — docs/modules/ROOT/pages/api/canopy-eligibility.adoc ("the order arm is pinned end to end; the bulk COLA mint is pinned at the store" — S4); docs/modules/ROOT/pages/api/canopy-snap.adoc; CHANGELOG === Added; this page’s Status; the closure gates recorded on the MR.

Files Touched

Area Files

canopy-enrollment (new)

services/canopy-enrollment/src/enroll_guards.rs, services/canopy-enrollment/src/metrics.rs, services/canopy-enrollment/src/api/household_coverage.rs, services/canopy-enrollment/migrations/20261231000000_issuance_settle_claim.sql

canopy-enrollment (changed)

services/canopy-enrollment/src/main.rs, services/canopy-enrollment/src/auto_enroll.rs, services/canopy-enrollment/src/store.rs, services/canopy-enrollment/src/issuance_settlement.rs, services/canopy-enrollment/src/expiry_sweep.rs, services/canopy-enrollment/src/api/mod.rs, services/canopy-enrollment/Cargo.toml; tests in auto_enroll.rs, expiry_sweep.rs, issuance_settlement.rs, services/canopy-enrollment/tests/enrollment_test.rs; call-site-only edits in services/canopy-enrollment/src/continuation/infra_tests.rs

canopy-snap / canopy-eligibility / canopy-test-lib

services/canopy-snap/src/determine.rs (tests), services/canopy-eligibility/tests/bulk_store_test.rs, services/canopy-eligibility/tests/order_backdated_enrollment_test.rs (new), crates/canopy-test-lib/src/given/mod.rs, crates/canopy-contracts-eligibility/src/orders.rs (doc)

Docs

docs/modules/ROOT/pages/api/canopy-enrollment.adoc, docs/modules/ROOT/pages/data-models/canopy-enrollment.adoc, docs/modules/ROOT/pages/api/canopy-eligibility.adoc, docs/modules/ROOT/pages/api/canopy-snap.adoc, nav.adoc, roadmap.adoc, CHANGELOG.adoc, this page

Must not change

services/canopy-enrollment/src/issuance.rs, services/canopy-enrollment/src/api/issue_guards.rs, services/canopy-enrollment/src/continuation/ (beyond call sites); compliance/, rulesets//scenarios/**

Verification

Property Layer

The planned row is independent of today under empty coverage (S3)

proptest, auto_enroll.rs

uncovered_months; apply_household_coverage (never a covered month; amounts only from the plan; no partial combined)

proptests, enroll_guards.rs

P1a/b/c: the order_effective anchor prorates / day-1 full / floor → next month

infra, auto_enroll.rs

P2: one row + the WARN names the uncovered month; a July+September prior names August only

infra + SpanCapture

G1 born-expired refusal, zero rows; D3 COLA: no live row → refusal, live row → park, expire-under-lock interleaving → refusal

infra (concurrency)

The provenance pin on OrderEffective; the R7 unpark pin re-fixtured; the U-RC-C-b pins unchanged

infra, expiry_sweep.rs

G2 drops (issued prior; combined prior; combined candidate with following = 0 / > 0) + EXPLAIN

infra

D5b lease: the claimed row survives the sweep as pending; a stale lease is cancellable; coverage counts it

infra (concurrency)

D5c: HTTP 409 for the dropped month; the next month 201

black-box, services/canopy-enrollment/tests/enrollment_test.rs

D6: mint = consume day + N; landing = pre-call today + N; the injected-today boundary

infra, issuance_settlement.rs

P3 a past in-window month settles; P4 the denial leg writes nothing

infra

outside_certification_window three arms; P7b ≡ the HTTP predicate

unit + proptest

snap: an approved OrderEffective = the legacy period from the anchor; the denial loop covers it

unit + proptest, canopy-snap

P8 bulk mint + write-once under a changed as_of

infra, canopy-eligibility/tests

Chain: a previous-month order → one full row, kind, jurisdiction-derived expiry

black-box, canopy-eligibility/tests

Every existing U-EXP-A / U-RC-C-b / settlement / HTTP pin

unchanged assertions

Per commit group: the gates above, live lanes against a devstack reloaded from the branch (the migration lands on reload), a fresh J1–J8 review, a token-gated signed commit. Per MR: the pre-push battery green → bare merge (squash=false) → one-line closing comments → workflow::done → epic ticks. Concurrency pins run two real connections against the ephemeral schema (the D3 interleaving: B holds the uncommitted expiry while A blocks on the row lock, then commits after 200 ms); every clock-dependent pin passes a fixed today.

Closure condition for #1635 (run on the stream MR)

(a) no row in either scenario file carries blocked_by ["#1635"] and no binding names it (rg -n '#1635' compliance/ rulesets/ is empty; the bare 1635 matches only the PAMMS TANF 1635 cites); (b) cargo xtask policy action-coverage unchanged; (c) cargo xtask scenarios audit = the frame baseline (125 on 2026-09-06); (d) check-docs, mq-topology, plan-lint, quality-budgets --fail-on-regression (B8 9, B1 18, B2 126) and rustdoc clean; (e) #1635 closed with a one-line comment (merge SHA + anything deferred). Then the archive commit: the nav entry rewritten in place, a docs/modules/ROOT/pages/plans/archive.adoc row, the roadmap line.

Deferred and residual risks

  • #1743 (F6): the expiry after a fenced-out accepted transfer is stamped from the retry’s day (bounded by the retry delay; already an aged-pending reconciliation case).

  • #1744 (F7): the inactivity reset of the expungement clock (the 274.2(i) designation; PAMMS 3805) needs EBT activity (#1553) — a go-live gate.

  • #1745 (F8): pre-#1635 issued rows keep their mint-time expiry (no production balances yet; inventory + re-anchor before go-live).

  • #1746 (F15): the live 7 USC §2016(h)(9) cites (the count is #1746’s) to correct to (h)(12)©. #1741 (D7): the floor-ownership hole. #1742 (D12): the Georgia proration figures.

  • Lease crash window: a settler that dies mid-call leaves a 10-minute lease; after it lapses the sweep may cancel and the existing re-assert reconciles as today.

  • Budgets: B8 unchanged (legal_today( is not a counted read); B1 unchanged (services/canopy-enrollment/src/api/mod.rs is already counted; the new module is small). Disclosed test-only edits: the services/canopy-enrollment/src/continuation/infra_tests.rs call sites; the changed-spec pins (R7, the three mint-expiry pins).

Documentation Updates

  • Antora canonical docs: docs/modules/ROOT/pages/api/canopy-enrollment.adoc + docs/modules/ROOT/pages/data-models/canopy-enrollment.adoc (A-5, A-7); docs/modules/ROOT/pages/api/canopy-eligibility.adoc + docs/modules/ROOT/pages/api/canopy-snap.adoc (B-3, B-5); services.adoc stays a thin index.

  • CHANGELOG.adoc == Unreleased: the frame (=== Added) + the template resync (=== Changed); U-F2-A === Added + === Fixed; U-F2-B === Added.

  • This page: Status → Done (YYYY-MM-DD) — !N on merge; the nav entry → Archive; a docs/modules/ROOT/pages/plans/archive.adoc row; the roadmap sentence → "delivered <date>".

Review log

round vendor resolved model verdict

1

Anthropic

claude-fable-5-1

no-ship — three Q1 blockers (commit metadata: trailer model, imperative subjects, single-MR justification), fixed in-plan the same day; Q2/Q3/Q4 yes

Erratum (2026-09-07): B-3 adds the toml dependency to crates/canopy-test-lib/Cargo.toml (and Cargo.lock) for the ruleset read — two files outside the plan’s Files Touched list; no design change.

Edit this page · default