Plan: Scenario Inventory & Human-Fidelity E2E (epic &61)
Status: In progress — MR1–MR3 and MR5–MR7 shipped; MR4’s journey family is still growing under epic &61
Epic: &61 (parent &58)
Implements ADR-031 §3 for epic &61 (parent &58), under the corpus architecture ratified by ADR-032: an engine corpus (synthetic test-min/test-max fixtures, universal + election-dependent scenarios, canopy CI) and per-jurisdiction conformance packs (Georgia first — the UAT suite and onboarding template). Consumes &60’s action catalogue (scenario steps reference catalogued actions; state-manual rows feed conformance scenarios) and &59’s currency assurance (conformance journeys assert against current values). Grounding below is code-verified (2026-06-09; ADR-032 amendments 2026-06-10). Issues are cut from the Status rows per ADR-013 once this plan lands.
Status
| MR | Scope | Status |
|---|---|---|
MR1 |
Inventory schema + the |
Done (2026-06-11) — !590 |
MR2 |
SNAP scenario inventory — engine rows + the Georgia conformance seed, runnability-mapped |
Done (2026-06-11) — !591 |
MR3 |
TANF / Medicaid / CHIP / CAPS / WIC inventories; journey-tier triage filed as #849–#854; the dangling-binding check made blocking |
Done (2026-06-11) — !592 |
MR4 |
Journey harness pattern — the |
In progress — slices 1–7 landed 2026-06-14; further journeys land as their |
MR5 |
Synthetic engine fixtures |
Done (2026-08-27) — !1259 |
MR6 |
Integration-test jurisdiction hygiene — |
Done (2026-08-27) — !1258 |
MR7 |
Journey walkthrough pairing gate + the UI-gap backlog (#972, ADR-031 Amendment 1) |
Done (2026-07-06) — !765 |
The per-MR specification and delivery notes live in the merge requests and CHANGELOG.adoc; the live coverage count is the output of cargo xtask scenarios audit, not a number on this page.
Erratum (2026-09-16): only the e2e container interpolates a default
(CANOPY_TEST__JURISDICTION: "${CANOPY_JURISDICTION:-georgia}"); every
service receives CANOPY_JURISDICTION through the x-canopy-shared-env
anchor as "${CANOPY_JURISDICTION:-}", and the shared loader treats the
empty value as unset so config/<svc>/default.yaml stands — one export
still switches the stack.
Design — grounded current state (code-verified)
-
E2E harness: Playwright projects (
tests/e2e/playwright.config.ts); auth-setup chains 9 users; on-demand visual-baseline projects (vb-*) key offCANOPY_E2E_VISUAL_BASELINE(set byxtask e2e --visual); full-stack projects (journey, worker-determination-ele) offCANOPY_E2E_DEVSTACK_PROFILE=full. The longest specs prove dual-context (:8090applicant +:8080worker) and cross-service-event journeys already work. -
Coverage today is default-seed-driven: the generative seeder’s random bulk +
phase1bscenario-targeted households + thephase14_castlogin-capable applicants (the demo dataset was retired into the default seed in #716); 19 JDM math fixtures (2 shells:snap-eligibility,medicaid-non-magi—crates/canopy-rules-client/tests/ruleset_happy_path_test.rs:52-53); the spec suite. No artifact links any of these to the scenario space; JUnit output lists spec names, not scenarios. -
Change-reporting surface: endpoints exist (
POST …/change-report+ program-parameterized variants,canopy-renewals/src/api/mod.rs:545,677) butchange_typeis a free string and onlyincome_changemarksrequires_redetermination— most of the 273.12 space is recordable but not actionable; the inventory makes that visible per-type. -
Jurisdiction: threaded per-service at startup via
CANOPY_*__JURISDICTION(single-tenant per ADR-006); seed/e2e hardcode georgia;rulesets/default/is a verbatim georgia copy; the test literals (23/19 at recon, 46/19 by MR6’s landing) now route throughcanopy_test_lib::test_jurisdiction()(MR6, #762). The per-jurisdiction artifact set is known (georgia: 34 files — jurisdiction.toml, citations.toml, theme, idp, composition x5, workflows x9, notices tree, param JSONs).
Design — decisions
-
The inventory tracks scenarios, not personas. Personas are seeded instances; a scenario is the policy-derived situation class. A scenario row may bind to a persona (via the demo seed) as its fixture, but the inventory axis is the CFR/PAMMS-derived space, so "what’s missing" is measured against policy, not against what we happened to stage.
-
Three complexity tiers with tier-appropriate coverage:
unitscenarios are satisfied by JDM fixtures (cheap, exhaustive math edges);flowby existing-style specs;journeyonly by multi-life-event specs. The gate’s "partial" status (journey bound only to a fixture) prevents tier-laundering; a row bound at its tier but fenced byblocked_byis likewise partial — the binding proves the test exists, the fence that it cannot run — and the audit line prints the fence (◐ partial [Flow] <id> — blocked_by #N). An unbound fenced row stays uncovered; a fenced journey is exempt from the walkthrough-pairing gate like any partial journey (ADR-031 Amendment 2). Erratum (2026-09-07):blocked_byshipped informational at MR1 ("never affects coverage status"); #1681 made it a status input and this bullet was corrected to as-built; the one-time re-label moved the audit from 125 covered / 55 partial / 392 uncovered to 118 / 62 / 392 (seven bound-but-fenced rows, uncovered unchanged). -
Uncovered is a report, dangling is an error. A binding that doesn’t resolve is a lie and fails CI; an honest gap is the burndown metric (mirrors quality-budgets philosophy — debt visible and monotonically shrinking, not hidden).
-
Journeys are full-stack-gated, not pre-push. The pre-push battery stays fast; journeys run on the full devstack in CI and locally on demand (
cargo xtask e2e --devstack-profile full — --project journey). -
Two corpora, one schema (ADR-032). The engine corpus (universal + election-dependent scenarios against synthetic
test-min/test-max) answers "does canopy implement the federal option space?" and runs in canopy CI; conformance packs (rulesets/{jurisdiction}/scenarios/) answer "does this configured deployment behave per its policy?" and are each jurisdiction’s ship gate — Georgia’s pack is the UAT suite and the onboarding template. Georgia policy is deliberately NOT the engine corpus: un-elected option arms would go permanently untested, and real-value churn would rot the goldens. -
Synthetic pair, not a second real state (supersedes the earlier single-
testlandsketch). Adversarially-electedtest-min/test-maxfixtures exercise both arms of every referenced election (a single fixture cannot); round numbers + federally-cited elections keep ADR-011 discipline without importing a second state’s policy-reading cost. A real jurisdiction onboarding later inherits the conformance-pack path instead.
Verification
-
Gate unit tests (fixture inventory + fixture spec tree: resolving binding, dangling binding → error, tier-mismatch → partial; shell-fixture binding rejected).
-
MR4’s journey runs green in the demo pipeline; screenshots + the journey’s step assertions reviewed against the design renders where UI is touched (project screenshot-verify convention).
-
MR5: test-min + test-max smokes green in their scheduled job; at least one asserted test-min-vs-test-max behavioral divergence per elected option arm (proves the elections actually flow);
policy auditgreen over both fixtures (election keys cite the option registry, values cite the fixture-design appendix,fixturesource kind rejected outsiderulesets/test-*). -
Each MR through the standard gate (validate + D1-D8 + force-merge squash=false).
Appendix — fixture design (MR5, #761; ADR-032 §2/§4)
The design authority every authority = "fixture" citation in
rulesets/test-min/citations.toml and rulesets/test-max/citations.toml
references (source_ref = "plans/scenario-inventory-e2e.adoc#fixture-design").
The VALUES themselves live in the fixture files (the audit’s ValueMismatch
check keeps citation and file in lockstep); this appendix records the rules
that produced them and the election matrix.
Personalities
-
test-min — the smallest legal deployment:
enabled_programs = ["snap"]only (its jurisdiction.toml carries the snap + shared/jurisdiction/ notices/appeals sections, plus the 13 cross-program keys two snap-only services load unconditionally — the ADR-005 degradation arm made concrete); every federal option DECLINED where law permits (no BBCE ⇒ live asset test, no simplified reporting, no heat-and-eat, no TSNAP, no ABAWD waiver, actual-cost self-employment, SUA mandatory, dependent care capped). Erratum (2026-09-11): "ONLY the snap + shared/jurisdiction/notices/appeals sections" was unbootable — canopy-applications reads all five[shared.application_processing]day keys and canopy-reporting reads[tanf.wpr]+[tanf].work_requirement_hours_per_weekwhateverenabled_programssays (ADR-011 fails loud on a missing key), and both run in the snap-only profile, so test-min could not boot it (#1836); the clause is corrected to as-built and the fixture gained those keys at test-max’s federal values, cited to this appendix. -
test-max — every program enabled, every optional surface on, most permissive elections (BBCE at the 200% lawful ceiling with the asset test eliminated, simplified reporting, statewide ABAWD waiver, standard self-employment percentage, MAGI adult expansion adopted).
Value rules
-
Round numbers only — auditable by inspection, immune to indexing churn (money in whole hundreds of cents; percentages in fives/tens; day counts from {5,7,10,14,15,30,45,60,90,180,270}; months from {3,4,6,12,24,36,48,60}).
-
Federal floors/ceilings are inviolable and identical in BOTH fixtures (expedited 7 days, expedited screening $150/$100, ABAWD 80h/3-in-36, IPV 12/24 months, CHIP floor 134% FPL, TANF federal 60-month limit, WPR 50/90, two-parent 35/55 hours, core-hours 20, processing SOPs 30/7/30/45/45 days, appeal window 90 + decision clock 60 days; the SNAP minimum benefit 2400¢ — 8% of the one-person max allotment, 7 CFR 273.10(e)(2)(ii)©, a floor the adversarial review caught the first draft violating; BBCE gross spans exactly the lawful 130→200 range across the pair). Erratum (2026-11-01): the TANF 30 in the processing list is no federal floor, since no federal TANF processing standard exists (42 USC 617); it stays a round fixture value, identical in both fixtures (#3167).
-
Wherever an election has an engine or service realization, the pair MUST differ on it — that difference is what the divergence assertions consume.
-
Identity strings are obviously synthetic (Test-Min/Test-Max Fixture Agency, 1-555-0100, Testville, fips 69/60 — real-but-unused territory codes (Northern Mariana Islands / American Samoa), UTC; holidays are six round dates as OBSERVED weekday shifts — the workday calendar refuses weekend entries at load);
[policy_source] type = "manual", no repos (fixtures have no PAMMS). Erratum (2026-09-10): the pair shipped with synthetic fips 00/99, which no reader can resolve — canopy-reporting’s federal-parameter loader and the portal’s jurisdiction-strings loader both fail closed on a code the canopy-reference FIPS table does not know (#1226/#1273), and canopy-caps had nosmi-2026.jsonblock for either slug, so three services could not boot either fixture (#1819); the fips clause is corrected to as-built (real-but-unused territory codes, readers untouched) and the fixtures gained synthetic round-number SMI blocks. -
Structure-preserving tables: money/limit arrays keep georgia’s LENGTH and monotonic shape with round values; the adverse-action reason vocabulary and the TANF work-activity vocabulary copy georgia verbatim (product surface, not policy values).
-
Federal-file-mirrored keys keep the shared federal files' EXACT values — the snap param-set loader refuses cross-source divergence (#1467 C5; single-sourcing is #1478):
minimum_benefit_amount_cents2400,homeless_shelter_deduction_monthly_cents19900 (both caught live by the divergence tests, not the citation audit). -
Copied JDM files carry the FIXTURE’s jurisdiction prefix in their embedded
namefield where georgia’s carriedgeorgia-(services look up{jurisdiction}-<ruleset>); the federal alien-eligibility file’s wrongly georgia-prefixed name is pre-existing debt, filed as #1613.
Election matrix (compliance/federal-options/ ↔ fixture arms)
| Registry option | Realizing jurisdiction key(s) | test-min arm | test-max arm | Realization |
|---|---|---|---|---|
|
|
not-elected |
elected |
engine/service |
|
|
not-elected |
elected |
engine/service |
|
|
not-elected |
elected |
registry-only |
|
|
not-elected |
elected |
registry-only |
|
|
no-waiver |
waiver-in-effect |
registry-only |
|
|
not-utilized |
utilized |
registry-only |
|
none (registry-only) |
not-elected |
elected |
registry-only |
|
|
actual-costs |
standard-percentage |
engine/service |
|
|
full-ban |
opt-out |
registry-only |
|
|
mandatory-sua |
household-choice |
registry-only |
|
none (registry-only) |
deduction |
income-exclusion |
registry-only |
|
|
snap-standard |
tanf-rule-substitution |
registry-only |
|
none (registry-only) |
not-elected |
elected |
registry-only |
|
|
default-125 |
approved-plan-threshold |
engine/service |
|
|
not-applicable (program not enabled) |
federal-60-months |
engine/service |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
|
not-applicable (program not enabled) |
graduated-partial-then-full-family |
registry-only |
|
|
not-applicable (program not enabled) |
elected |
engine/service |
|
none (registry-only) |
not-applicable (program not enabled) |
reduce-at-least-25pct |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
opt-out |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
required |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
mandatory-standard-filing-unit |
registry-only |
|
none (the |
not-applicable (program not enabled) |
gross-ceiling-and-standard-of-need |
engine/service |
|
none (the |
not-applicable (program not enabled) |
standard-work-deduction |
engine/service |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
covered |
registry-only |
|
|
not-applicable (program not enabled) |
elected |
engine/service |
|
none (registry-only) |
not-applicable (program not enabled) |
special-income-level-elected |
registry-only |
|
|
not-applicable (program not enabled) |
elected |
registry-only |
|
|
not-applicable (program not enabled) |
no-demonstration |
engine/service |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
none |
registry-only |
|
|
not-applicable (program not enabled) |
imposed-per-public-schedule |
engine/service |
|
|
not-applicable (program not enabled) |
85-pct-smi-maximum |
engine/service |
|
|
not-applicable (program not enabled) |
85-pct-smi |
engine/service |
|
none (registry-only) |
not-applicable (program not enabled) |
extended |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
waivers-elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
elected |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
extension-permitted |
registry-only |
|
none (registry-only) |
not-applicable (program not enabled) |
retail |
registry-only |
Erratum (2026-11-06): the snap.abawd-discretionary-exemptions row's pack key is now snap.abawd.discretionary_exemptions_per_year (#3220), whose empty table is the not-utilized arm; snap.abawd.discretionary_exemption_pct never had a reader and is gone from every pack (#3235).
Erratum (2026-11-01): #3203 replaced medicaid.pathways_enabled and medicaid.pathways_work_hours_per_month with the [medicaid.adult_demonstration] section, so the medicaid.section-1115-demonstration row’s keys are medicaid.adult_demonstration. and the remaining pathways_ income and age keys.
Erratum (2026-09-23): #936 realized snap.claims-establishment-threshold in
canopy-snap’s overpayment recompute, so its row is corrected to as-built — the
single minimum_claim_cents became the four [snap.overpayment] keys and the
realization is engine/service. The pair diverges on it (test-min 12500 / 0,
test-max 25000 / 20000), asserted by the in-crate canopy-snap test
fixture_pair_diverges_on_the_participating_floor.
not-applicable (program not enabled) rows are the program-subset
divergence itself: test-min proves the stack RUNS without those services
(ADR-005), which is the elected-arm assertion for every option of a
program test-min omits.
Divergence assertions (the "elections actually flow" proof)
Scoped to options with a live realization on BOTH sides of the pair — narrower than the MR row’s original "per elected option arm" phrasing, and deliberately so (a registry-only option has no realization to assert; recorded here per ADR-013 living-spec):
-
snap.self-employment-expense-method— the engine-registered SNAP divergence:SnapParameterSets::load(the REAL boot loader) yieldsstandard_deduction_enabledfalse/true and the elected 50% only under test-max (in-crate canopy-snap testfixture_pair_diverges_on_the_self_employment_election— battery-gated). These values feedse_deductionand thesnap-self-employment-deductionJDM. -
snap.bbce— runtime realization is the renewals gross screen:RenewalParams::loadyieldsgross_income_limit_pct130 (no BBCE, federal base) vs 200 (the lawful BBCE ceiling) — in-crate canopy-renewals testfixture_pair_diverges_on_the_bbce_gross_screen. (The engine’s asset-test thresholds come from the SHARED federal deductions file, not jurisdiction.toml — the loader REFUSES divergence on federal-mirrored keys, see value rule 6 — so the bbce booleans' remaining realization is the seed/scenario layer, as the matrix records.) -
Corpus bootability —
NamedFilesystemLoader::scanover[federal, test-*]scans clean and registers each fixture’s OWN jurisdiction-prefixed SNAP eligibility ruleset (in-crate canopy-rules testfixture_corpora_scan_clean_like_a_service_boot): exactly the load the rules service performs at boot. -
Program-subset options — existential: the scheduled fixture-smoke lane boots test-min snap-only and test-max full and both smoke green (sign-in, dashboard, one determination, one notice).
Erratum (2026-09-11): #1827 deleted canopy-renewals' local FPL table (its
130%-FPL screens now read the figures the determination scored with), taking
RenewalParams' gross_income_limit_pct and the snap.bbce assertion above
with it. The assertion is re-homed to the in-crate canopy-policy test
fixture_pair_diverges_on_the_bbce_gross_limit, which resolves the same
130-vs-200 divergence through PolicyParams::resolve — the election’s
remaining live reader, and the one the seed/scenario layer prices against.
Boot seams this MR added
-
docker-compose.yml: every jurisdiction consumer reads${CANOPY_JURISDICTION:-georgia}(one export switches the stack). -
cargo xtask e2e --jurisdictionparameterizes the SEED (default georgia; the bare battery is byte-identical). -
canopy-notices falls back to
rulesets/default/noticestemplates when a jurisdiction ships none — fail-closed outsideCANOPY_ENV=devbehindCANOPY_NOTICES__ALLOW_DEFAULT_TEMPLATE_FALLBACK(#1265 doctrine); the fixtures deliberately ship no template tree. -
Citation kinds:
fixture(this appendix; staleness-exempt; rejected outsiderulesets/test-*) andoption_registry(source_ref must be a livecompliance/federal-options/key) — both audit-enforced.