Plan: State Values and Narratives Compiled Beside Their Pack Keys (#2212)
- Context
- Scope
- Design
- D1 — The IEVS discrepancy threshold (canopy-snap)
- D2 — The periodic-report continued-benefits election (canopy-enrollment, canopy-renewals, the packs)
- D3 — The pipeline’s narratives and authorities (canopy-renewals)
- D4 — The appeals timeline notes (canopy-appeals)
- D5 — The parent-caretaker default (canopy-medicaid)
- Risks
- Units — one unit
- Verification
- Documentation Updates
- Review log
Status: Done (2026-11-03) — U1 (#2212) merged
Epic: &128
Issues: #2212 (one MR closes it)
Branches: fix/2212-pack-values-beside-keys
This is a Design + Scope plan: GitLab owns tracking, the issue carries the implementer brief, and the plan freezes when implementation starts.
Context
The 2026-09-21 ADR-003 / ADR-006 audit (&128) found six places where a service holds a Georgia value or sentence in Rust beside a pack key that should carry it (#2212, §1E and item 9). One of the six, the Georgia-named self-employment ruleset lookup that returned 500 under any other pack, landed as #3135 (se_deduction.rs derives {jurisdiction}-snap-self-employment-deduction; the default pack’s rulesets are renamed; the fixture boot guard covers it). Five remain:
-
services/canopy-snap/src/verification.rs:46:DISCREPANCY_THRESHOLD = $100, an unsourced constant deciding whether a verified income flags an IEVS discrepancy (discrepancy_figures). The pack’s[snap.verification](:457) carries the match sources beside it, and[snap.verification_thresholds]the PAMMS 3035 change triggers ($50 earned, $100 unearned); neither is this threshold. -
services/canopy-enrollment/src/adverse_actions.rs:1877-1905(freeze_policy):cb_available: … && !is_periodic_report && reason_cboverrides the pack’s per-reasoncb_availablefor any action with a periodic-report certification, andcb_ruleprints "PAMMS 3730:37". The pack already says it:periodic_report_nonfilingcarriescb_available = false(georgia :344). The override exists for #1128’s verification-failure path, which schedules underfailure_to_provide_verification(cb_available = true, :320) and relies on the override to make itfalse.MASS_CHANGE_CB_RULE(:1865) andMASS_CHANGE_EXEMPTION_AUTHORITY(:1982) persist "PAMMS 3705" for every jurisdiction. -
services/canopy-renewals/src/pr_pipeline.rs:263-274, 435-449: both pipeline arms post areason_narrative("not received by the 5th day of the report month (PAMMS 3730)") and an exemptionauthorityciting PAMMS.scheduled_event_payload(adverse_actions.rs:1456-1458) prefers the narrative to the pack’sdisplay_text, so every jurisdiction’s letter says "5th" whatever its[snap.periodic_reporting]day. -
services/canopy-appeals/src/cb_stay.rs:248andservices/canopy-appeals/src/api/mod.rs:509: the timeline notes say "5 working days" while the deadline is computed from[appeals].cb_adequate_reinstate_workdays. -
services/canopy-medicaid/src/determine.rs:467(MemberFlags::for_applicant):is_parent_caretakerdefaults toapplicant_age >= 19 && household_size > 1, ignoring[medicaid].parent_caretaker_min_age, whichdetermine.rs:1417and:1633already thread for the rules. The orchestrator never setsis_parent_caretakeron the context, so the default decides every production run.
The precedent for a threshold loaded beside its siblings is [snap.verification].wage_match_source (services/canopy-snap/src/params.rs:389, threaded ResolvedPolicy → DetachedVerification, services/canopy-snap/src/api/determine_handler.rs:133); for a pack reason row, #1156’s vocabulary; for a pack-cited string reaching a letter, the ABAWD warning’s terms (#2437). The periodic-report letters route on the scheduled action’s reason_code: rulesets/{georgia,default}/notices/manifest.toml route created_source = "periodic_report" with reason_code = "failure_to_provide_verification" to pr-vcl-termination (georgia :1318-1326), services/canopy-notices/src/event_routing.rs (:105, :632, :2607, :2635) and tests/e2e/specs/journey-snap-pr-verification-failure.spec.ts (:237, :244) assert that code, and api/canopy-notices.adoc documents it.
Scope
In scope: the five sites, each moved to the pack value the issue names, with one design point (D2’s reason row); the docs the 2026-09-17 correction left saying "a compiled constant"; a CHANGELOG entry.
Out of scope: the other &128 families (#655, #2210, #2211, #2215, #2216), each its own plan per the epic; any change to the PR pipeline’s clocks or the appeals deadline arithmetic, which already read the pack; the orchestrator setting is_parent_caretaker from a fact (#858).
Design
D1 — The IEVS discrepancy threshold (canopy-snap)
A new required key [snap.verification] ievs_discrepancy_threshold_cents (georgia 10000, cited as canopy’s own operating threshold, authority = "canopy", since PAMMS 3035 states no IEVS match threshold; the other packs mirror it as fixture), loaded by services/canopy-snap/src/params.rs beside wage_match_source into SnapParameterTable and ResolvedPolicy, threaded into DetachedVerification and VerificationRequest, and taken by discrepancy_figures as an argument. The constant and its pin test go. The caseworker guide’s passage that names DISCREPANCY_THRESHOLD as "a compiled constant, not a ruleset key" (docs/modules/ROOT/pages/guide/caseworker.adoc:317-320) names the key instead, and api/canopy-snap.adoc lists it with the verification keys.
D2 — The periodic-report continued-benefits election (canopy-enrollment, canopy-renewals, the packs)
The pack reason row decides CB. freeze_policy loses is_periodic_report and its arm: cb_available is (!exempt || cb_despite_exemption) && reason_cb, and a false reason reads "no CB: reason category (vocabulary cb_available=false)" with no manual cite. #1128’s path gets its own row, periodic_report_verification_failure (cb_available = false; georgia’s display_text "The verification requested with your periodic report was not provided by the deadline"), in all four packs, and pr_pipeline.rs schedules under it (REASON_VCL_FAILURE). The letter follows the code: the pr-vcl-termination routing row in rulesets/{georgia,default}/notices/manifest.toml changes its reason_code to the new one, services/canopy-notices/src/event_routing.rs's routing pin and its two fixture payloads (:105, :632, :2607, :2635) follow, as do the e2e journey’s two assertions (journey-snap-pr-verification-failure.spec.ts:237, :244) and the routing table in api/canopy-notices.adoc (:140) and data-models/canopy-renewals.adoc. A fresh grep for failure_to_provide_verification beside periodic_report must then find nothing: the generic row keeps its other users. MASS_CHANGE_CB_RULE and MASS_CHANGE_EXEMPTION_AUTHORITY move to two pack keys under [snap.adverse_action], mass_change_cb_rule and mass_change_exemption_authority (georgia cites 273.12(e)(6) and 273.13(b)(1) with its PAMMS 3705 lines; default cites the CFR alone), loaded by services/canopy-enrollment/src/params.rs into ActionPolicyParams (services/canopy-enrollment/src/api/adverse_actions.rs:35) and read where the constants were. The DB pair CHECK on the exemption is unchanged (it checks shape, not text).
D3 — The pipeline’s narratives and authorities (canopy-renewals)
Both arms post reason_narrative: None, so scheduled_event_payload falls through to the row’s display_text, and post authority from a new [snap.periodic_reporting] pair: nonfiling_exemption_authority and verification_failure_exemption_authority (georgia: the PAMMS 3730 lines; default: 7 CFR 273.12(a)(5) and 273.2(f)), loaded into PeriodicReportPolicy (services/canopy-renewals/src/periodic_reports.rs:31, which services/canopy-renewals/src/params.rs fills). The test fixture at pr_pipeline.rs:1774-1779 follows.
D4 — The appeals timeline notes (canopy-appeals)
Both notes interpolate cb_adequate_reinstate_workdays ("reinstate within {n} working days"), which services/canopy-appeals/src/cb_stay.rs and services/canopy-appeals/src/api/mod.rs already hold. A fixture assertion under a pack with a non-5 value (test-max set to 7) pins it.
D5 — The parent-caretaker default (canopy-medicaid)
MemberFlags::for_applicant (services/canopy-medicaid/src/determine.rs:461) takes parent_caretaker_min_age: i32 and defaults is_parent_caretaker to applicant_age >= parent_caretaker_min_age && household_size > 1; its one call site (:849) passes params.parent_caretaker_min_age(), the accessor :1417 and :1633 already use. Pending on the absent flag (ADR-034 §3) is rejected here: the orchestrator sets the flag on no run, so pending would stop every Medicaid determination; #858 owns the fact.
Risks
-
A PR verification-failure action loses CB in every pack (fail-closed, as 3730:37 requires). The new row’s
cb_available = falsereproduces today’s override; a pack that wants CB there flips its row. -
A jurisdiction’s PR letter changes text (silent). The letter now prints the pack’s
display_text; georgia’s row already says "5th", so Georgia’s letter is unchanged. The notices render test pins the default pack’s text. -
The discrepancy threshold has no manual source (silent). It is cited as canopy’s operating value, not a PAMMS figure, so a reviewer sees it is a choice; a jurisdiction sets its own.
Units — one unit
U1 (w5) — The five sites
Files: services/canopy-snap/src/{params,verification,api/determine_handler}.rs, services/canopy-enrollment/src/{adverse_actions,params,api/adverse_actions}.rs, services/canopy-renewals/src/{pr_pipeline,periodic_reports,params}.rs, services/canopy-appeals/src/{cb_stay,api/mod}.rs, services/canopy-medicaid/src/determine.rs, services/canopy-notices/src/event_routing.rs, tests/e2e/specs/journey-snap-pr-verification-failure.spec.ts, rulesets/{georgia,default,test-min,test-max}/jurisdiction.toml, rulesets/{georgia,default,test-min,test-max}/citations.toml, rulesets/{georgia,default}/notices/manifest.toml, docs/modules/ROOT/pages/{api/canopy-snap,api/canopy-enrollment,api/canopy-renewals,api/canopy-notices,api/canopy-appeals,data-models/canopy-renewals,rulesets,guide/caseworker}.adoc, CHANGELOG.adoc.
D1 to D5. Tests (regression, each failed by a mutation): a verified income differing by the pack threshold minus one cent is no discrepancy and by the threshold plus one is; a periodic-report nonfiling action and a verification-failure action each carry their row’s cb_available and no PAMMS text in cb_rule; a pipeline termination under test-max prints test-max’s display_text and authority; a verification-failure action still routes to pr-vcl-termination under the new code (the notices routing pin, and the e2e journey); the appeals note prints 7 under test-max; lowering parent_caretaker_min_age to 18 flips the inferred flag for an 18-year-old. Contract: the new reason row round-trips through the adverse-action vocabulary loader. Closes #2212.
Verification
-
cargo xtask test;cargo xtask validategreen. -
cargo xtask policy audit,policy drift georgia,neutrality-lint(the removed PAMMS strings lower no ratchet below its floor),quality-budgets. -
The MR carries
Closes #2212; on merge the plan moves toplans/archive/withDone.
Documentation Updates
-
api/canopy-snap.adocandguide/caseworker.adoc(the threshold key),api/canopy-enrollment.adoc(the CB rule from the row; the mass-change keys),api/canopy-renewals.adocanddata-models/canopy-renewals.adoc(the two authorities; the new reason row),api/canopy-notices.adoc(thepr-vcl-terminationroute’s code),api/canopy-appeals.adoc(the note),rulesets.adoc(the new keys and row) -
CHANGELOG.adoc: oneFixedentry under== Unreleased
Erratum (2026-11-03): the threshold citation uses authority = "operational", source_ref = "internal", the existing token for a canopy operating value (#955), not a new "canopy" token.
Erratum (2026-11-03): the pipeline’s actions are advance-notice exempt, so they freeze the exempt-category cb_rule; that text drops its PAMMS 3705 cite too, which the test asserting no PAMMS text in cb_rule needs. The P1 election text keeps its cite (#3222).
Erratum (2026-11-03): event_routing.rs:2635 is the worker payload, which keeps the generic failure_to_provide_verification (its point is that a worker action keeps the generic notice); only :2607 changes.
Review log
| round | vendor | resolved model | verdict |
|---|---|---|---|
1 |
anthropic |
claude-fable-5-1 (gadhs/pi plan review at exit_plan_mode) |
no-ship (fixed): D2 renamed the verification-failure reason without the |
2 |
gemini-4-argon (second-vendor review) |
no-ship (fixed): the same routing gap; |