Demo Runbook: driving the SNAP journey walkthroughs live
For a facilitator standing the devstack up once and driving any published journey walkthrough on demand — applicant portal and worker portal side by side — and resetting cleanly between journeys. This page owns bring-up, reset and credentials; each journey walkthrough owns its click-by-click steps.
cargo xtask e2e or cargo xtask validate during a live
demo. Both reseed the running devstack, which wipes the golden snapshot
mid-session; if you must run one, re-run cargo xtask migrate snapshot afterwards.
One-time bring-up
CANOPY_CARGO_FEATURES=canopy-api/test-clock cargo xtask dev start --profile full # every service + the applicant portal, test-clock build
cargo xtask seed --seed 42 --households 50 # deterministic fixtures + the login-capable applicant cast
cargo xtask migrate snapshot # optional — only for the full snapshot restore below
cargo xtask dev status # the EPHEMERAL host ports and URLs (they change every bring-up)
-
The test-clock build (
CANOPY_CARGO_FEATURES=canopy-api/test-clock) is the one bring-up that serves every tier below: the Clock-driven journeys replay their specs against the/test/clockendpoints only this build compiles in (crates/canopy-api/src/lib.rs), andcargo xtask e2erefuses a journey-lane selection without it (Testing › the journey-lane gate). The feature is sticky — laterdev refresh/dev reloadkeep it; only a set-but-emptyCANOPY_CARGO_FEATURES= cargo xtask dev reloadreverts to a production-shaped stack (xtask/src/devstack_guard.rs). -
Cross-program journeys (TANF, Medicaid, ELE, TSNAP) need
--profile full; asnap-onlystack has no TANF or Medicaid services. -
cargo xtask dev statusprints the Worker Portal origin (https://web.canopy.test:<port>) and one URL percanopy-service: open the *Worker Portal origin for the caseworker and thecanopy-portalURL for the applicant, in two browser windows. Never hardcode a port — they are sampled fresh on every start (.ports.env). -
The worker portal is reachable only through the devstack’s TLS ingress, so the demo browser needs, once per machine, the hosts entry
127.0.0.1 web.canopy.test web.canopy-xsite.test idm.canopy.testand the devstack CA.devstack/idp/kanidm-ca.pemtrusted;dev startanddev statusprint both (Local Development › canopy-web’s origin and the ingress).
Reset between journeys
A reset is usually NOT required: every journey files (or its harness builds)
its own household, and each live /apply filing mints a fresh HH-…
credential, so journeys run back-to-back. Reset only to re-run the same journey
or to clear accumulated cases from the worker queue.
Fast reset (recommended)
cargo xtask seed --seed 42 --households 50
seed always TRUNCATEs the seeded tables before reloading (the dynamic
per-database reset in xtask/src/cmd/seed.rs; there is no --reset flag) and
preserves the table structure, so the running services keep working — no
restart. It restores the seed cast (HH-ca570001…04) and clears the journey
applications you filed. Then open a fresh browser context or incognito window:
session stores and cookies are not touched by a DB reset.
Full restore from a snapshot
If you took a cargo xtask migrate snapshot and want a byte-identical restore
of every database (Devstack Migration Snapshot & Rollback):
cargo xtask migrate rollback # pg_restore --clean per database
cargo xtask dev reload --profile full # recreate the containers, data kept; then re-run `dev status` for the new ports
migrate rollback drops and recreates each table, and the running services
hold pooled prepared statements against the old ones — the first request after
a rollback fails with a 500 (cached plan must not change result type) until
they reconnect. dev reload (xtask/src/cmd/dev.rs) is the supported restart:
it takes the compose project down and up again with the data volumes kept and
a no-op rebuild when nothing changed, but it re-samples every host port, so
re-read cargo xtask dev status and reopen both windows. Do NOT use
dev restart here — it wipes every data volume. Prefer the fast reset unless
you specifically need the snapshot.
Cold, pristine start (a wedged stack)
cargo xtask dev clean --confirm
CANOPY_CARGO_FEATURES=canopy-api/test-clock cargo xtask dev start --profile full
cargo xtask seed --seed 42 --households 50
cargo xtask migrate snapshot # optional golden snapshot
dev clean also removes the devstack CA and the cast’s credentials
(xtask/src/cmd/dev.rs); the next start generates new ones, so trust the new
CA in the browser and read the new credentials below.
Credentials
-
Caseworker (worker portal). The cast person
jane.caseworker./loginshows the jurisdiction’s AC-8 system-use notice (jurisdiction.toml[sign_in] system_use_notice) and a Continue link to the devstack Kanidm, which asks for the username, then a TOTP code, then the password, and returns to canopy-web signed in. Each cast person’s password and TOTP seed are in.devstack/idp/kanidm.json(mode 0600, underpersons), generated at provisioning — there is no fixed password. The seed is base64, for RFC 6238 codes with HMAC-SHA-256, 6 digits and a 30-second step (crates/canopy-test-lib/src/upstream/kanidm/mod.rs). The full worker cast, with each person’s roles and programs as Kanidm group memberships, isdevstack/kanidm/migrations/00-canopy.hjson(Local Development › Upstream IdP: Kanidm). -
Applicant — live front door. A fresh
/applyfiling shows an Application ID (HH-…) and a 12-digit passcode on submit (and again on the start screen). Write them down: they are how the applicant signs back in at/lookupto view/homeand/letters. Minted per run — there is no fixed value. -
Applicant — pre-filed seed cast. For a case that already exists, sign in with a cast member from Applicant Portal Seed Credentials (
HH-ca570001…04and their passcodes).
Reproducibility tiers
Each walkthrough declares one of four tiers on its own page:
-
Fully manual — the applicant files the whole case live through
/apply, the caseworker records every fact and acts, and the applicant signs back in to view the outcome. The richest side-by-side demo. -
Worker-driven — the applicant files the SNAP front door live and can view
/home//letters, but the substantive mid-journey beats (appeals, a second program, decisions) are caseworker-only: there is no applicant self-service UI for them yet. -
Harness — the case needs an aged precondition (a prior determination, earlier issuances) that cannot be hand-built live; a one-command harness builds it and you demo the caseworker beats live. No applicant
/lookupview: a harness-built case carries no portal credential. -
Clock-driven harness — the journey is calendar machinery: its beats are scheduler passes under an advancing fleet logical clock (the ADR-033 test-clock endpoints), not worker clicks. A live demo replays the paired spec and narrates the worker-portal screens it captures at each beat; there is no hand-followable path through weeks of wall-clock time, and the clocks exist only in the test-clock build above.
Per-journey index
| Journey | Tier | Start here |
|---|---|---|
Fully manual |
Applicant files SNAP at |
|
Fully manual |
Applicant files; worker approves + certifies, records winnings → denial. |
|
Fully manual |
Applicant files; worker approves + certifies, records a material increase → recert nudge. |
|
Fully manual |
Applicant files (size-3); worker records the move + higher rent → benefit rises. |
|
Fully manual |
Applicant files (2 children, no ELE opt-in); worker approves (defers) → records ELE consent → re-determines. |
|
Fully manual |
Applicant files SNAP at |
|
Siblings screened Medicaid-first → one on Medicaid, one on PeachCare |
Fully manual |
Applicant files SNAP (2 children); worker records the wage, files Medicaid, determines → three NOAs. |
SSI ends → change report re-determines under every other COA → denial |
Fully manual |
The SSI-recipient journey to its approval; worker records the SSA benefit, keys the SSI-termination CMD update → automatic re-determination → denial NOA. |
Worker-driven |
Applicant files (size-3); worker files two hearings around a shelter change. |
|
Worker-driven |
Applicant files SNAP; worker files TANF + records a shared change → both deny. |
|
Worker-driven |
Applicant files SNAP (2 children); worker files + closes TANF for earnings → TSNAP freeze. |
|
Worker-driven (clock-driven contested arc) |
Applicant files; worker enrolls + issues continued benefits, files a timely appeal, records Upheld; the arc plays a couple of days into the next logical month. |
|
Worker-driven |
Applicant files SNAP; worker approves, backdates a certification to lapse it, reapplies + recertifies forward; applicant signs back in. |
|
Harness |
Harness builds an aged determination + prior issuances; worker records a retroactive correction + recomputes the claim. |
|
Clock-driven harness |
Replay the spec; the worker application process page shows the appointment chain and the NOMI staged/dispatched chips at every beat. |
|
Expedited postponed verification lapses → NOE → expiry → post-lapse determination |
Clock-driven harness |
Replay the spec; the postponement panel, the Notices and Determination tabs, My Queue and the process-page banner show each beat. |
Clock-driven harness |
Worker creates the certification + enrollment; the spec advances the clock through the 15th, the 5th and month-end. |
|
Timely periodic report dies on verification, reopens on the cure |
Clock-driven harness |
Replay the spec; letters are polled on the Notices tab and the reopen lands on the verification-cure arm. |
Missed periodic report reopens on a late filing, prorated from receipt |
Clock-driven harness |
Replay the spec; the nonfiler calendar closes the case and a late Form 528 reopens it prorated from the receipt date. |
Clock-driven harness |
Harness builds an approved + enrolled household; worker schedules the termination live and watches the NOA dispatch; the refused in-window sweep, the clock advance and the enacting sweep replay from the spec. |
|
Clock-driven harness |
Applicant files SNAP at |