WIC lifecycle substrate: pinned federal text, routable events, program notice identity (epic &106, Plan B1)

Status: Done (2026-09-28) — !1526
Issues: #2389 (epic &106; split from #2360)
Branches: feat/2389-wic-lifecycle-substrate (carries this page)

This is a Design + Scope plan. GitLab owns tracking. It freezes when the first unit starts. One MR, one battery. It binds no catalogue row.

Erratum (2026-09-28): as built, D3’s floor check runs inside NoticeConfig::load, and a CHECK (notices_letterhead_complete) keeps the three letterhead columns all or none. The letterhead is read by a query in store.rs, off the wire Notice, and prepare's printing half moved into assemble_notice so the printed and stored halves are testable together. D2’s infra test is a child module of services/canopy-wic/src/api/persist.rs (the B1 line budget), and completed_at is the determination’s created_at.

Erratum (2026-09-28): the MR also fixes four related defects found while implementing, each as its own issue and commit: #2397 (the WIC denial route’s bare regulatory basis), #2398 (a re-render dropped its continued-benefits block), #2399 ([notices] ignored unknown keys) and #2401 (three texts called the appeals decision clock 90 days). The portal helpline’s program identity is follow-up #2400.

It lays the ground for four plans:

  • B2 (#2390): expiration;

  • B3 (#2391): termination;

  • B4 (#2392): breastfeeding cessation and mid-certification assessment;

  • B5 (#2393): temporary certification.

Context

  • Every WIC letter prints the SNAP identity.

    • canopy-notices holds one identity per jurisdiction: [notices] in rulesets/<pack>/jurisdiction.toml, which NoticeConfig loads (services/canopy-notices/src/config.rs ~181-188). Georgia’s values are SNAP-cited: a 90-day hearing window (7 CFR 273.15(g)), DHS letterhead and the OSAH hearing office.

    • Both paths that render WIC letters use it:

      • the application.denied.wic route (rulesets/georgia/notices/manifest.toml ~765-771);

      • the worker notices behind the bound rows wic.certification.written-decision-notification and …ineligibility-reasons-hearing-rights (compliance/action-catalogue/wic.toml ~306-330, POST /notices).

    • DPH says 60 days (CT-860.04 V) with DPH contacts (Notice of Termination, Rev Feb 2023).

    • The fields are read in services/canopy-notices/src/generator.rs, at prepare (~269-290), at persist (the stored hearing deadline and contacts, ~434-446) and at on_demand_context (~529-559). They are also read in services/canopy-notices/src/worker.rs sms_body (~266, ~338).

  • canopy-wic’s events cannot be routed.

    • wic.determination_completed carries neither household_id nor person_id, and wic.certification_created lacks household_id (services/canopy-wic/src/events.rs).

    • canopy-notices skips an event without both (services/canopy-notices/src/main.rs ~409-433). canopy-web’s case audit feed filters on household_id, and its SSE hub binds wic.determination_completed and reads household_id.

    • The payloads are untyped service structs, with raw Uuid ids.

  • The federal lifecycle text is not pinned.

    • docs/modules/ROOT/pages/federal-requirements.adoc has no rows for 246.7(g)(3), (h), (j)(6) or (j)(8).

    • It restates (j)(5) and 246.9(e) only as a paraphrase, inside the combined row at ~644-649.

    • The lifecycle rows cite a bare "7 CFR 246.7(j)".

  • #2360 is still cited by five allowlist entries, eight scenario fences, two CHANGELOG.adoc entries (~40, ~336) and about twenty doc and code comments.

  • Precedents:

    • RenewalSnapCertificationConvertedV1, a typed, notices-consumed event with a wire pin (crates/canopy-contracts-renewals/src/certifications.rs ~742, ~777), stamped with .with_programs (services/canopy-renewals/src/events.rs ~102-109);

    • DeterminationCompletedV1, whose version is the envelope’s (crates/canopy-contracts-eligibility/src/events.rs ~96);

    • [medicaid].chip_program_name pulled into NoticeConfig (config.rs ~218-230);

    • Plan A1’s split of the dual-participation row.

Rulings in force:

  • pre-1.0, no shims;

  • every jurisdiction without code changes;

  • ADR-004 (ids, codes and dates only on the bus) and ADR-011 (every pack key cited);

  • neutrality (no DPH or Georgia in the default or fixture packs, or in Rust);

  • the maintainer’s 2026-09-28 ruling that related defects found in a workstream are fixed there, each with its own issue and commit.

Scope

In scope: D1–D4.

Out of scope:

  • the [wic.lifecycle] table and federal floors file, which B2 (#2390) adds with its first key;

  • the temporary certification’s federal basis and trigger (B5, #2393);

  • routing wic.determination_completed to a WIC notice;

  • enforcing a WIC hearing-request window in canopy-appeals. Only enrollment-bound appeals are windowed (services/canopy-appeals/src/api/mod.rs ~411-430), and B3 decides the question for terminations.

  • [notices].advance_notice_days stays jurisdiction-wide. WIC’s 15-day notice under (j)(6) belongs to B3.

Related defects fixed here. Each has its own fix: issue, its own commit, and a Closes line in the MR:

  • 2395: compute_hearing_deadline (generator.rs ~1270) is dead code under [allow(dead_code)]. It is deleted.

  • #2396: canopy_typst::context::flatten_context (crates/canopy-typst/src/context.rs ~99-113) lets a program_data key override a configured identity field.

    • For the six identity keys (agency_name, agency_address, agency_phone, hearing_phone, hearing_address, appeal_deadline_days) and notice_date, the context’s value wins and a collision is logged at WARN. The hearing window printed "from the date of this notice" is therefore always the notice date persist computes the stored deadline from (~434).

    • Every other key, effective_date included (generator.rs ~584), keeps today’s program_data-wins overlay.

Design

# Decision

D1

Pinned federal text.

federal-requirements.adoc gets new rows in the four-column format. Each restates its paragraph verbatim and carries Checked <date> — eCFR:

  • in === Food Packages and Certification Periods:

    • 246.7(g)(3): the optional ±30-day adjustment for scheduling difficulty. The implementation column says it is not implemented and no extension surface exists.

  • in === Notices, Appeals, Records and Reporting:

    • 246.7(h) and (j)(6): the permitted mid-certification actions and the 15-day notice. Owned by B3 (#2391). The row records that DPH CT-860.05’s Authority block cites "(j)(7)" for its 15-day notice.

    • 246.7(j)(5) and 246.9(e): the notice of ineligibility and the 60-day request floor. The implementation column describes D3’s program identity, the application.denied.wic route and the bound worker notices.

    • 246.7(j)(8): the expiration notice. Owned by B2 (#2390).

  • The combined row (~644-649) becomes "7 CFR 246.7(f)(2); 246.9(a), (k)(3)". Its (j) and (e) clauses move to the new rows, and its implementation cell keeps only the processing-standard and appeals-clock facts.

Triggers become these exact strings. Rows outside the lifecycle keep theirs; for example rights-responsibilities-acknowledgment belongs to #2361.

row regulatory_trigger

catalogue …mid-certification-disqualification-notice, scenario …mid-certification-disqualification-advance-notice

7 CFR 246.7(h), (j)(6) (the scenario keeps its CT-840.01 suffix)

catalogue …certification-expiration-notification, scenario …certification-expiration-advance-notice

7 CFR 246.7(j)(8); DPH WIC CT-840.01 (the scenario keeps its edition suffix)

catalogue …ineligibility-reasons-hearing-rights

7 CFR 246.7(j)(5); 7 CFR 246.9(e); DPH WIC CT-860.01

catalogue …written-decision-notification

7 CFR 246.7(f)(2), (j)(5)

scenario …written-decision-notice

7 CFR 246.7(f)(2), (j)(5); 7 CFR 246.9(c); DPH WIC CT-860.01 (Rev Feb 2023)

catalogue and scenario …mid-certification-assessment

7 CFR 246.7(g)(1)(iii)-(v); DPH WIC Certification Period Guidelines (the scenario keeps its edition suffixes)

rulesets/federal/citations.toml cites only federal data files (crates/canopy-policy/src/federal.rs key_level_issues). D1 adds nothing there; D3’s floor file brings the one new citation.

D2

Routable, typed WIC events.

  • crates/canopy-contracts-wic/src/events.rs (new, pub mod events) holds two structs:

    • WicDeterminationCompletedV1 { determination_id: DeterminationId, application_id: ApplicationId, household_id: HouseholdId, person_id: PersonId, determination_status: DeterminationStatus, completed_at };

    • WicCertificationCreatedV1 { participant_id: WicParticipantId, determination_id, application_id, household_id, person_id, participant_category, status: WicCertificationStatus, certification_start, certification_end }.

  • Every id is a canopy_common::id newtype, serialized as a UUID string. services/canopy-wic/src/api/persist.rs converts the records' raw Uuids with From.

  • The structs have no schema_version field, since the envelope’s version covers it (the eligibility precedent).

  • They derive Serialize and Deserialize, with no deny_unknown_fields, because consumers accept unknown fields (crates/canopy-mq/src/envelope.rs ~18-27). Every field is documented (missing_docs).

  • canopy_reference::cross_program::WIC_CERTIFICATION_CREATED sits beside WIC_DETERMINATION_COMPLETED. It is kept out of ALL_DETERMINATION_COMPLETED, which SSE maps to determination_complete.

  • services/canopy-wic/src/events.rs publishes both with .with_programs([Program::Wic.to_string()]). The routing key stays the second argument of EventEnvelope::new, as a constant, for mq-topology.

    • services/canopy-wic/src/api/persist.rs fills them from out.internal and the participant (~67-76, ~99-109).

    • denial_reasons never goes on the bus: it is free text with income figures.

  • Consequences:

    • canopy-security audit rows gain household_id, and the determination event’s resource_id becomes person_id (services/canopy-security/src/event_parsing.rs ~64-82).

    • canopy-web’s case audit feed places both events on the household, and its SSE hub places wic.determination_completed.

    • The broker ACL already lists both keys (devstack/rabbitmq/definitions.json ~429-434). The two xtask/mq-topology-allow.toml entries (~80-81) stay, with truthful reasons.

D3

Notice identity per program.

  • [notices.program.<program>] is an optional, complete identity for one program, with deny_unknown_fields. It has the same fields and requiredness as [notices]:

    • agency_name, agency_address, agency_phone and hearing_phone are required.

    • hearing_address is optional. A table without one prints no hearing address, never the jurisdiction’s.

    • appeal_deadline_days is required.

  • It parses into NoticeConfig.program: HashMap<Program, ProgramIdentity>. An unknown slug or a missing required field refuses boot. There are no partial overrides, so one letter never mixes two agencies.

  • A federal floor, as data. rulesets/federal/hearing-request-windows.json (new; no nodes, so canopy-rules skips it) holds {"programs": {"wic": {"min_days": 60, "authority": "7 CFR 246.9(e)"}}}.

    • It gets a file-level federal_register citation in rulesets/federal/citations.toml, and joins [families.static] in rulesets/federal/indexing.toml and the README’s static list (the A2 precedent).

    • At boot, canopy-notices resolves the identity of every program the file lists, whether from the overlay or the [notices] fallback. It refuses a window below that program’s floor, naming the program, the window, the floor and the authority.

    • A program with no entry is unchecked, and another program’s bound is a data edit.

  • NoticeConfig::identity(Option<Program>) → NoticeIdentity<'_> returns the program’s table, else [notices]. It is the only source of the six fields for a new notice, in:

    • prepare (the program is parsed at ~228);

    • persist, for the hearing deadline and the appeal-rights contacts; PreparedNotice carries the resolved Program;

    • sms_body, for the agency phone.

    • The printed and the stored hearing deadline therefore come from one identity.

  • A regenerated notice reproduces what was stored.

    • A migration adds nullable agency_name, agency_address and agency_phone to notices. persist writes the letterhead it printed.

    • on_demand_context, which also serves the object-store-read fallback (services/canopy-notices/src/api/applicant_reads.rs ~107), takes the letterhead from the row. A row persisted before the migration has NULL there and gets [notices], which is what every notice printed before this plan.

    • It takes the hearing phone, the hearing address and the window from the notice’s stored appeal-rights row, with the window equal to the stored deadline minus notice_date. A notice with no rights row, such as a seed-loaded one, gets the [notices] hearing fields.

    • It never reads the current overlay, so a WIC notice issued with a 90-day window and DHS contacts regenerates with them.

  • Georgia [notices.program.wic], with authority = "manual", a source_ref per source and the provenance in notes:

    • agency_name "Georgia Department of Public Health" (Notice of Termination, Rev Feb 2023).

    • agency_address "200 Piedmont Avenue SE, Atlanta, GA 30334": DPH’s mailing address on dph.georgia.gov, verified 2026-09-28. The Feb 2023 forms print the superseded 2 Peachtree Street address.

    • agency_phone "1-800-228-9173" and hearing_phone "(404) 657-2900" (Notice of Termination).

    • hearing_address "Georgia Department of Public Health, c/o Office of General Counsel, Request for Participant Fair Hearing, 200 Piedmont Avenue SE, Atlanta, GA 30334". This is the maintainer’s 2026-09-28 ruling (recorded on &106): the form’s OGC routing at DPH’s current address.

    • appeal_deadline_days 60 (CT-860.04 V).

  • default: [WIC AGENCY NAME], [WIC AGENCY ADDRESS], [WIC AGENCY PHONE], [WIC HEARING OFFICE PHONE] and [WIC HEARING OFFICE ADDRESS], with 60 days citing 7 CFR 246.9(e) (federal_register).

  • test-max: agency_name "Test-Max Fixture WIC Agency", agency_address "3 Fixture Way, Testville, TX 00003", agency_phone "1-555-0103", hearing_phone "1-555-0104", hearing_address "Fixture WIC Hearing Office, 3 Fixture Way, Testville, TX 00003", and 60 days, all fixture.

  • test-min: no table, since it has no WIC. It exercises the fallback, which the floor also checks.

D4

Retire #2360 from the tracking.

  • Narrow the lifecycle rows, on the A1 split precedent. The new rows are unbound:

    • mid-certification-assessment drops the issuance cap. New row wic.benefits.missed-mid-assessment-issuance-cap:

      • actor = "system";

      • description: "When a scheduled mid-certification assessment is missed, cap further issuance (two months of benefits for a breastfeeding woman, three for infants and children) until the assessment is completed, and reschedule it at the next benefit pickup";

      • trigger: "DPH WIC Certification Period Guidelines";

      • manual_ref: the source row’s;

      • allowlisted to #826.

    • breastfeeding-cessation-transition drops priority and the benefit void. Priority is covered by mid-certification-priority-revision (#2362). New row wic.benefits.void-ineligible-remaining-benefits:

      • actor = "worker";

      • description: "When a breastfeeding woman becomes categorically ineligible after six months postpartum, void the remaining benefits she is not eligible to receive";

      • trigger: "DPH WIC CT-840.01";

      • manual_ref: "DPH WIC CT-840.01 (Updated Mar 2020)";

      • allowlisted to #834.

    • thirty-day-temporary-certification drops "issue one month of benefits", which wic.benefits.issue-food-benefits (#826) covers.

    • The five rows' GAP comments are restated as built and name their owners.

  • Allowlist:

    • disqualification-notice → #2391;

    • expiration-notification → #2390;

    • mid-certification-assessment and breastfeeding-cessation-transition → #2392;

    • thirty-day → #2393.

    • Each reason names the scope.

  • Scenario fences. A journey that still names issuance, priority or a void keeps those owners fenced, as A2 did:

    • breastfeeding-one-year-certification, child-annual-certification and Georgia woman-expiration-anchors → #2392;

    • mid-certification-assessment → #2392, #2362, #826;

    • breastfeeding-cessation-category-transition → #2392, #2362, #834;

    • mid-certification-disqualification-advance-notice → #2391;

    • certification-expiration-advance-notice → #2390, #826: its journey carries benefits on without interruption after requalification, which needs issuance;

    • Georgia thirty-day → #2393, #826.

    • Headers and comments follow.

  • Every other #2360 mention outside the archived plans moves to its owner:

    • The delivery revisit moves to #2394, the pregnant-end revisit at delivery. It appears in:

      • the rulesets/federal/wic-certification-periods.json _comment;

      • docs/modules/ROOT/pages/rulesets.adoc ~255;

      • federal-requirements.adoc ~636;

      • rulesets/federal/citations.toml ~163;

      • rulesets/georgia/citations.toml ~2075.

    • Breastfeeding cessation moves to #2392 (Georgia citations ~2102, federal-requirements.adoc ~636).

    • The status writers move to their owners:

      • temporary → #2393;

      • expired → #2390, including a lapsed temporary;

      • terminated → #2391, the mid-certification termination that B5’s proof-of-ineligibility path invokes, and #2392, cessation after six months.

    • They appear in:

      • the crates/canopy-contracts-wic/src/participants.rs docs, after which docs/modules/ROOT/openapi/wic.json is regenerated;

      • docs/modules/ROOT/pages/api/canopy-wic.adoc ~86, ~161-163;

      • docs/modules/ROOT/pages/data-models/canopy-wic.adoc ~13;

      • services/canopy-wic/tests/wic_test.rs ~1551;

      • the Unreleased CHANGELOG.adoc entries ~40 and ~336.

Invariants

  • A new notice for a program with a [notices.program.<p>] table prints and stores that identity alone, and any other notice uses [notices]. The printed and the stored hearing deadline match, and no program’s window falls below its federal floor.

  • A regenerated notice reproduces its stored letterhead and appeal rights, never the current configuration.

  • Both wic.* events are typed V1 payloads with newtype ids, carrying household_id and person_id.

  • No reference to #2360 remains outside the archived plans, and no lifecycle row claims issuance or priority capability.

Units — U-A ∥ U-B ∥ U-C, one MR

Commit 1: docs(plans): plan the WIC lifecycle substrate (#2389). Last: docs(plans): close the WIC lifecycle substrate plan (#2389).

U-A (w5) — feat(notices): give each program its own notice identity (#2389)

Files:

  • services/canopy-notices/src/{config.rs,generator.rs,worker.rs,store.rs,domain.rs,test_support.rs};

  • services/canopy-notices/src/api/applicant_reads.rs, if the fallback needs the rights row passed through;

  • a new services/canopy-notices/migrations/<next>_notice_letterhead.sql;

  • crates/canopy-typst/src/context.rs;

  • rulesets/federal/{hearing-request-windows.json,citations.toml,indexing.toml,README.adoc};

  • rulesets/{georgia,default,test-max}/{jurisdiction.toml,citations.toml};

  • docs/modules/ROOT/pages/api/canopy-notices.adoc (a new notice-identity section) and docs/modules/ROOT/pages/data-models/canopy-notices.adoc (the letterhead columns);

  • docs/modules/ROOT/pages/rulesets.adoc (the [notices] sample and the floor).

Tests. They compare against the loaded pack’s values, not literals, to satisfy neutrality-lint:

  • program_identity_parses_and_refuses_partial_or_unknown: the Georgia table, a missing required field and an unknown slug; all four packs load.

  • a_window_below_the_federal_floor_refuses_boot: a WIC overlay of 30 days, and a [notices] fallback of 30 days with no overlay.

  • a_wic_notice_prints_and_stores_the_wic_identity: the render context, the appeal-rights row and the stored letterhead carry the pack’s WIC values, with notice_date plus the window.

  • a_snap_notice_keeps_the_jurisdiction_identity.

  • on_demand_render_reproduces_the_stored_notice:

    • a WIC notice persisted before the overlay (NULL letterhead, a 90-day deadline, jurisdiction contacts) regenerates with exactly those after the overlay exists;

    • a notice persisted with a letterhead regenerates with it after the config changes.

  • sms_body_uses_the_program_agency_phone.

  • configured_identity_wins_over_program_data.

  • a_program_data_notice_date_moves_neither_the_printed_nor_the_stored_deadline: through both rendering and persistence.

The two related fixes are separate commits.

U-B (w2) — feat(wic): publish typed, routable WIC events (#2389)

Files:

  • crates/canopy-contracts-wic/{src/events.rs,src/lib.rs,tests/roundtrip.rs};

  • crates/canopy-reference/src/cross_program.rs;

  • services/canopy-wic/src/events.rs and services/canopy-wic/src/api/persist.rs;

  • xtask/mq-topology-allow.toml;

  • docs/modules/ROOT/pages/api/canopy-wic.adoc (Events published, ~221-227).

Tests:

  • a pinned wire form and a proptest round trip for each V1 struct;

  • event_type_constants_are_dot_delimited extended to the new constant;

  • persisted_events_carry_the_household_and_person, an infra test in services/canopy-wic/src/api/persist.rs that reads both outbox rows.

U-C (w2) — chore(compliance): pin the WIC lifecycle text and retire #2360 (&106)

Files:

  • docs/modules/ROOT/pages/federal-requirements.adoc;

  • compliance/{action-catalogue/wic.toml,action-coverage-allowlist.toml,scenario-inventory/wic.toml};

  • rulesets/georgia/scenarios/wic.toml;

  • rulesets/federal/{wic-certification-periods.json,citations.toml};

  • rulesets/georgia/citations.toml;

  • docs/modules/ROOT/pages/rulesets.adoc (~255);

  • crates/canopy-contracts-wic/src/participants.rs (docs) and docs/modules/ROOT/openapi/wic.json;

  • docs/modules/ROOT/pages/api/canopy-wic.adoc (~86, ~161-163);

  • docs/modules/ROOT/pages/data-models/canopy-wic.adoc;

  • services/canopy-wic/tests/wic_test.rs (a comment).

The CHANGELOG.adoc retargets land with this unit’s commit.

Checks: action-coverage, scenarios audit (offline and --online), policy audit, and git grep -n '#2360' — . ':!docs/modules/ROOT/pages/plans/' returning nothing. Plan pages, active and archived, record history.

CHANGELOG entries, one per unit:

  • Fixed: WIC letters print the DPH identity and a 60-day window, and a regenerated notice reproduces what was stored;

  • Added: the program identity overlay, the letterhead columns and the federal hearing-request floor;

  • Changed: the WIC event payloads, and the audit resource_id.

Verification

  1. Per unit, in isolated worktrees:

    • fmt, workspace clippy with the portal features, and cargo doc with broken intra-doc links denied;

    • the non-live lanes, and the ephemeral-schema tests filtered by name;

    • quality-budgets, neutrality-lint, the policy gates, scenarios audit, test-lanes-lint and machete.

  2. On the branch: CANOPY_CARGO_FEATURES=canopy-api/test-clock cargo xtask dev reload, then cargo xtask api-docs, then git push. The battery runs the notices tests, including the SNAP envelope snapshot, and the WIC tests.

Documentation Updates

  • The pages in the units.

  • GitLab:

    • file the two related fix: issues (#2395, #2396);

    • after merge, close #2360 (split; every reference retired) and repoint #2389’s plan link.

Review log

round vendor resolved model verdict

1 (2026-09-28)

Anthropic

claude-opus-5-5

no-ship — five blockers fixed: * D1 names each restated paragraph’s owner and the exact new triggers, drops (j)(7) (a claims notice) and (g)(2), and splits the combined 246.9 row; * the two new catalogue rows are fully specified; * the two CHANGELOG cites are retargeted; * event ids are newtypes; * paths are unambiguous. Observations folded in: the SSE claim, the protected identity keys, the fixture values, the multi-owner fences, and the out-of-scope advance_notice_days.

2 (2026-09-28)

OpenAI

gpt-6-astra

no-ship — all eight findings fixed: * a regenerated notice reproduces its stored letterhead (new columns) and appeal rights, never the current overlay; * notice_date is protected with the identity keys; * hearing_phone is required, as in [notices]; * Georgia’s letterhead address follows DPH’s current address, and the hearing destination follows the maintainer’s ruling; * each program’s window is checked at boot against a cited federal floor file, fallback included; * the expiration scenario keeps #826; * the #2360 check excludes plan pages; * B5’s termination path is named.

Edit this page · default