SNAP certification categories, fixed-income types and the period ceiling are pack data (#2209, epic &128)
- Context
- Scope
- Design
- Units (weights by complexity) — U-A → U-B → U-C → U-D, one MR
- U-A (w8) —
fix(snap): read the certification categories from the pack (#2209) - U-B (w5) —
fix(renewals): validate the category token against the pack (#2209) - U-C (w3) —
fix(web): render the certification select from the pack (#2209) - U-D (w2) —
chore(compliance): drain the #2209 neutrality-gate entries (#2209)
- U-A (w8) —
- Verification
- Documentation Updates
- Review log
Status: Done (2026-09-22) — !1485
Epic: &128
Issues: #2209
Branches: fix/2209-certification-vocabulary (carries this page)
This is a Design + Scope plan: GitLab owns tracking, #2209 carries the brief, the plan freezes when U-A starts. One MR — page + nav, U-A, U-B, U-C, U-D, the Done flip — one battery.
Erratum (2026-09-22): the manual POST’s period bound is the jurisdiction’s ceiling [snap.certification].max_certification_months (422 certification_period_exceeds_ceiling), not the row’s months — the row’s months is the JDM’s assignment, a worker-declared period is an operator action bounded by the jurisdiction’s maximum, and the fixture corpus certifies 12-month standard households for the periodic-reporting scenarios; the default pack’s elderly_disabled label is "Elderly or disabled" (its 273.10(f)(1) row carries no earned-income condition); the JDM description prose paraphrases the thresholds path so the sync checkers do not read it as a reference. Renewals' CategoryPolicy carries no separate convertible field — convertibility is converts_to.is_some() (the pack row still declares both; the loader enforces their agreement). Verification step 3 ran as unit pins only: the default pack does not boot canopy-renewals (no [snap.materiality], pre-existing on main — #2220); the georgia and test-max stacks ran live.
Context
#1703 (plan &96) made the certification period a jurisdiction decision — the length and the category come from each pack’s {slug}-snap-certification-period JDM decision — but pinned the VOCABULARY in Rust and SQL:
-
crates/canopy-contracts-snap/src/certification.rs:25-41closesCertificationCategoryto Chart 3105.1’s four tokens (standard,elderly_disabled,senior,abawd);crates/canopy-contracts-renewals/src/certifications.rs:171-207re-enumerates them asCertificationTypeon the public certification POST. -
services/canopy-snap/src/certification_period.rs:620compilesMAX_CERTIFICATION_MONTHS = 36(Georgia’s Senior SNAP ceiling; 7 CFR 273.10(f) allows 24);:559-569compiles the PAMMS 3725:36 fixed-income set into thefixed_income_onlyfact. -
Four token parsers:
services/canopy-renewals/src/continuation/rules.rs:18-47,services/canopy-renewals/src/store.rs:1813-1835,services/canopy-eligibility/src/enrollment_state.rs:178-184, plus the enum’s ownFromStr. -
Six SQL CHECK lists (renewals
snap_certs_type_check,snap_cert_adj_new_type_vocab_chk,snap_cert_adj_category_vocab_chk,snap_renewal_decisions_type_check, the inline CHECKs onsnap_universe_snapshot_rows.certification_typeandenrollment_continuations.certification_category), aDEFAULT 'standard'onsnap_certifications.certification_type(services/canopy-renewals/migrations/20260401000000_create_renewals_tables.sql:12) and the D13 SQL == Rust pin (services/canopy-enrollment/src/continuation/infra_tests.rs:462-468). -
The worker select with Georgia’s months in the labels (
services/canopy-web/templates/cases/_det_action_form.html:84-90,docs/modules/ROOT/pages/guide/caseworker.adoc:247), the e2e union (tests/e2e/lib/helpers.ts:846-848), two e2e reads of the flat standard length (tests/e2e/lib/given/determine.ts:437,tests/e2e/specs/journey-snap-timely-recert.spec.ts:180) and the seed tool’s reads and emissions of the legacy keys and names (tools/canopy-seed/src/jurisdiction.rs:193-201,tools/canopy-seed/src/datagen.rs:4420). -
Behaviour keyed on the
Seniorname — the periodic-reporting waiver (services/canopy-renewals/src/periodic_reports.rs:176-185), the convert endpoint (services/canopy-renewals/src/api/mod.rs:477-486, writing a hard-codedstandard,services/canopy-renewals/src/store.rs:223) — and onStandardfor interim contact (services/canopy-renewals/src/certification.rs:52-67); two ESAP-only inputs REQUIRED of every pack (crates/canopy-contracts-snap/src/determine.rs:428-442), sotest-mincarries a senior length it never uses.
The neutrality gate (#2208) holds all of this under 17 allowlist entries and six declarations that fail as stale the moment the #2209 MR lands.
What is already right stays: the assignment is a per-pack JDM decision with a row per category and a cited length; the five facts canopy-snap derives (CertificationFacts, certification_period.rs:85-100) are the inputs; the event carries certification_category beside assigned_certification_months; the token rides the in-cert conversion and the recert successor; every approval arm already prices its period from the JDM’s assigned months (services/canopy-snap/src/determine.rs:453-456,520-523), so the flat [snap.determination].standard_certification_months only rides the policy bundle (:183,217) and the seed tool.
Rulings in force: no in-code policy fallback (#1147) and no silent policy-material default (ADR-034 §3 — an absent ESAP table makes its facts unknown, never a value); pre-1.0, forward-only, the devstack reseeds; the neutrality rule (packs declare vocabularies; shared Rust validates against the pack; a CHECK never pins a pack vocabulary; a template never names a state); expedited is the ONE Rust-minted certification type (federal, 7 CFR 273.2(i)); the neutrality gate’s N3 treats a ~ / LIKE CHECK on a declared column as unsupported, so the replacement CHECKs are length-only; the seed tool under tools/ is dev fixture generation outside the gate’s shared scope.
Scope
In scope
-
The pack schema (D1) in all four packs with citations; the JDM threshold path; the fixture divergence (
test-maxnames its ESAP rowelderly_simplified). -
canopy-snap: the table-driven
CertificationPolicy, validation of the decision against the pack ROW, the ESAP table optional, policy-bundle v9 and the shared snapshot cap, the threshold-sync checker, the seed tool (D3). -
The two contracts newtypes with validating deserialization and the enrollment contract check (D2); renewals, enrollment and eligibility write-time validation or pass-through, the flag-driven behaviour, the convert target, the manual-creation ceiling, the two migrations dropping six constraints and one default (D4); the worker select, the e2e helpers and a new relational spec (D5); the gate drain with per-entry dispositions, OpenAPI, docs, CHANGELOG (D6).
Out of scope
-
New facts or new inputs for a category a pack might want (a pack whose rows need a fact canopy-snap does not derive is the #2216 extension avenue).
-
The expedited postponed-verification lengths (
[snap.expedited], 7 CFR 273.2(i)(4)) — federal, untouched. -
The periodic-reporting model itself (#956 lineage) beyond keying the waiver on a row flag; the conversion reasons (already pack data, #1800); the ABAWD clock vocabulary (its gate entry is re-homed, D6); renaming the seed tool’s reserved rows (D3).
-
Medicaid/TANF vocabularies (#655, #2210) and the other &128 families.
Design
Decisions
Invariants
-
No certification-category token is enumerated in Rust or SQL;
expeditedis the only Rust-known certification type; a conversion writes the pack row’sconverts_to, which is never a waived row. -
A decision’s category AND months are validated against the booted pack’s row at signing; a manual certification fits its row’s months; a token reaches enrollment, renewals or the portal only after membership in THEIR booted pack; an unknown token is a typed refusal that names the pack’s codes, never a default — on the wire, in the database column (no default) or in code.
-
The ESAP election is one table: absent → the ESAP facts are
unknownand no row may waive or convert; present → both inputs exist and at least one row is waived. -
The bundle a snapshot freezes carries exactly the keys the decision read (v9, accepted by the shared cap); replaying v5–v7 history reads none of them.
-
The neutrality gate is clean with zero #2209 entries.
Units (weights by complexity) — U-A → U-B → U-C → U-D, one MR
U-A (w8) — fix(snap): read the certification categories from the pack (#2209)
Files: rulesets/georgia/jurisdiction.toml, rulesets/default/jurisdiction.toml, rulesets/test-min/jurisdiction.toml, rulesets/test-max/jurisdiction.toml and the four citations.toml, the four snap-certification-period.json, crates/canopy-test-lib/fixtures/rulesets/certification-period.json, crates/canopy-test-lib/src/threshold_sync.rs, services/canopy-rules/src/certification_period_tests.rs, crates/canopy-contracts-snap/src/certification.rs, crates/canopy-contracts-snap/src/determine.rs, crates/canopy-contracts-snap/src/events.rs, crates/canopy-contracts-snap/src/lib.rs, crates/canopy-contracts-snap/tests/roundtrip.rs, crates/canopy-contracts-eligibility/src/snapshot.rs, crates/canopy-reference/src/enums.rs (doc), services/canopy-snap/src/params.rs, services/canopy-snap/src/certification_period.rs, services/canopy-snap/src/determine.rs, services/canopy-snap/src/derivation.rs, services/canopy-snap/src/main.rs, services/canopy-snap/src/se_deduction.rs, services/canopy-snap/tests/snap_test.rs, services/canopy-eligibility/tests/dry_run_degradation_test.rs, tools/canopy-seed/src/jurisdiction.rs, tools/canopy-seed/src/datagen.rs.
Tests: the loader refuses an empty table, a duplicate code, expedited, months above the ceiling, an unknown or other income type, a converts_to naming an undeclared, convertible or waived row, a convertible row without converts_to, an ESAP table missing a key, a waived row without the table, the table without a waived row; georgia’s four rows and default’s two round-trip; parse_assignment accepts every declared (code, months) pair and refuses senior under default, abawd / 36 under georgia (row says 4), standard / 24 under default (row says 6), standard / 25 under default; fixed_income_only and the senior-floor fact are Unknown without the table and unchanged with it; the thresholds JSON carries exactly certification_months.<code> for the rows; the threshold-sync checker resolves the nested leaves and fails on a missing category key; bundle v9 pins (CERTIFICATION_KEYS; verify_certification_keys_at refuses an incomplete v9 and a Some ESAP missing a field, leaves v5–v7 as today); SCHEMA_VERSION_MAX accepts 9 and refuses 10; the thresholds and input-key drift gates (services/canopy-snap/src/determine.rs:3899-3979) restated per pack; the test-max decision assigns elderly_simplified / 36 to an all-elderly fixed-income household; the proptest table (:3445-3456) reads the pack; the seed tool reads the two reserved rows and refuses a pack without them. Property tests (proptest): for any String, CertificationCategory::from_str and its Deserialize never panic and accept iff the D1 regex matches and the token is not expedited; every accepted token round-trips through serde and Display; CertificationKeys::load never panics on an arbitrary TOML table and accepts iff every row satisfies the D1 constraints.
U-B (w5) — fix(renewals): validate the category token against the pack (#2209)
Files: crates/canopy-contracts-renewals/src/certifications.rs, crates/canopy-contracts-renewals/src/universe_snapshots.rs, crates/canopy-contracts-renewals/tests/roundtrip.rs, crates/canopy-contracts-enrollment/src/events.rs, crates/canopy-contracts-enrollment/tests/roundtrip.rs, crates/canopy-test-lib/src/given/snap.rs, services/canopy-renewals/src/params.rs, services/canopy-renewals/src/periodic_reports.rs, services/canopy-renewals/src/certification.rs, services/canopy-renewals/src/cert_create.rs, services/canopy-renewals/src/store.rs, services/canopy-renewals/src/api/mod.rs, services/canopy-renewals/src/continuation/rules.rs, services/canopy-renewals/src/continuation/adjust.rs, services/canopy-renewals/src/continuation/infra_tests.rs, services/canopy-renewals/src/determination_subscriber.rs, services/canopy-renewals/src/renewal_decisions.rs, services/canopy-renewals/migrations/<new>, services/canopy-renewals/tests/renewals_test.rs, services/canopy-enrollment/src/main.rs, services/canopy-enrollment/src/continuation/arm.rs, services/canopy-enrollment/src/continuation/payloads.rs, services/canopy-enrollment/src/continuation/infra_tests.rs, services/canopy-enrollment/migrations/<new>, services/canopy-eligibility/src/enrollment_state.rs, services/canopy-eligibility/src/derivation.rs, services/canopy-eligibility/src/bulk/worker.rs, services/canopy-eligibility/tests/bulk_pipeline_test.rs, services/canopy-applications/src/api/mod.rs, the tests under services/canopy-applications/tests.
Tests: manual POST with elderly_simplified under test-max inside its months → 201; with senior under test-max → 422 certification_type_unknown naming the codes; a period beyond the row’s months → 422 certification_period_exceeds_category; expedited → 422 certification_type_not_manual; a non-declarable row → 422; an INSERT omitting certification_type fails; the waiver follows periodic_reporting_waived (a waived non-senior token waives; senior under a pack whose row is not waived reports); interim contact follows interim_contact; convert refuses a non-convertible row 422 certification_not_convertible and writes the row’s converts_to; the reinstatement and recert arms mint the event’s token; enrollment DLQs an undeclared token and applies a declared one; eligibility’s expedited refusal and the COLA admission exclusion hold on is_expedited() and pass any other token; the infra test asserts the six constraints and the default are gone and the length checks present; certification_category absent from the D13 pin. Property test: for any String, CertificationType::from_str and its Deserialize never panic, accept iff the shape regex matches, round-trip through serde, and is_expedited() holds iff the token is expedited; rejected JSON values ("", "Senior") fail deserialization.
U-C (w3) — fix(web): render the certification select from the pack (#2209)
Files: services/canopy-web/src/certification_categories.rs (new), services/canopy-web/src/main.rs, services/canopy-web/src/api/actions_snap.rs, services/canopy-web/templates/cases/_det_action_form.html, docs/modules/ROOT/pages/guide/caseworker.adoc, tests/e2e/lib/helpers.ts, tests/e2e/lib/given/determine.ts, tests/e2e/specs/journey-snap-timely-recert.spec.ts, tests/e2e/specs/flow-snap-certification-vocabulary.spec.ts (new).
Tests: the loader refuses a missing table and keeps declarable rows only; the rendered select carries each declarable row’s label and months (georgia four; a fixture with one row renders one option); an undeclared code posts 422; the route test pins no month figure; the timely-recert journey’s expected period comes from jurisdictionCategoryMonths('standard'); the new relational spec passes on georgia in the container.
U-D (w2) — chore(compliance): drain the #2209 neutrality-gate entries (#2209)
Files: compliance/neutrality-gate.toml, rulesets/default/notices/snap/senior-conversion.typ, docs/modules/ROOT/openapi/renewals.json, docs/modules/ROOT/openapi/snap.json, the Antora pages in D6, compliance/federal-options/snap.toml, CHANGELOG.adoc, this page’s Status.
Tests: cargo xtask neutrality-lint clean with zero #2209 entries and declarations and the two re-homed entries at their exact counts; cargo xtask policy audit clean; the OpenAPI drift stage clean.
Verification
-
After
cargo xtask dev refresh(georgia): an all-elderly, fixed-income, no-earned-income household approves withcertification_category = senior, 36 months; a household with earned income →elderly_disabled12 orstandard6 per the facts; the letter and the enrollment row carry the token;cargo xtask seed-verifyclean; the new relational spec passes (cargo xtask e2e --no-refresh --devstack-profile full — specs/flow-snap-certification-vocabulary.spec.ts --project caseworker). -
Fixture stack (the fixture-smoke CI lane’s recipe,
.gitlab-ci.yml:825-888):CANOPY_JURISDICTION=test-max cargo xtask e2e --devstack-profile full --jurisdiction test-max — specs/fixture-smoke.spec.ts specs/flow-snap-certification-vocabulary.spec.ts --project caseworker(the refresh boots every service on test-max from the exported variable; the seed follows the flag) — the relational spec proveselderly_simplified/ 36, the manual refusals, the waiver and the conversion tostandardon the fixture; then the same underCANOPY_JURISDICTION=defaultwith--jurisdiction default(elderly_disabled24, no waived row, no convertible row); thencargo xtask dev refreshrestores georgia. -
cargo xtask neutrality-lintclean;cargo xtask policy auditclean;git push— the battery is the gate.
Documentation Updates
-
docs/modules/ROOT/pages/api/canopy-snap.adoc,api/canopy-renewals.adoc,api/canopy-enrollment.adoc,data-models/canopy-renewals.adoc,data-models/canopy-enrollment.adoc,federal-requirements.adoc,rulesets.adoc,guide/caseworker.adoc,walkthroughs/journey-snap-timely-recert.adoc,openapi/renewals.json,openapi/snap.json;compliance/federal-options/snap.toml. -
CHANGELOG.adoc—== Unreleased=== Changed. -
GitLab: #2209’s closing comment names the drained and re-homed gate entries; #1703 gets the one-line pointer.
Review log
| round | vendor | resolved model | verdict |
|---|---|---|---|
1 (2026-09-22) |
Anthropic |
claude-fable-5-1 |
no-ship — eight blockers fixed in-plan: two commit subjects over 72 chars; no proptests for the two new shape parsers and the table loader; |
2 (2026-09-22) |
OpenAI |
gpt-6-astra |
no-ship — 15 findings (2 P1, 12 P2, 1 P3), each verified against |