Repository navigation
Conversation
Rebuild the front page for a state SNAP director, budget office or legislative staffer. The research core, its numbers, caveats and SHA-256 pins are unchanged. - Open on the selected state (Colorado by default) in plain sentences: FY 2025 rate, tier and annual bill; the chance a fresh sample lands it in a different tier; the delay band; the FY 2026 option; and that FY 2027, open now, sets the FY 2030 bill. A rate strip shows the tiers, the delay band, both published rates and the 90% fresh-sample range. - Move the all-states table up, with state names, a sticky header and defined columns. - Collapse targeted review, the model scenario, the drift band, extra reviews and the rules-engine adoption panel into an "Analyst tools" section. - Retire or define jargon at first use: file rate is defined where the analyst tools begin; "oracle", "persistence-anchored", "deviation-carry" and "τ" are replaced with plain descriptions. - Fix stale copy: FY 2026 in the past tense, the tier-change line in the paper's framing (11 of the 18 tier changes sit inside the noise band), no "certified" claim, and "eligibility untested" wherever Axiom parity appears. - Charts draw at their container's width with width-aware ticks and labels, and the prose formatters never print "$1000 million" or "100%". - tests/test_front_page.py locks section order, the analyst grouping, copy tied to analysis/fy2025_movement.json and the app's drift tau, retired jargon, and property tests for the pure helpers run in node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The FY 2027 panel called the $1,029 four-person maximum an estimate pending FNA's notice and the $59 tolerance pending the June 2026 food-plan cost. Both are now published: FNA's August 21, 2026 COLA memo sets the 48-state four-person maximum at $1,023, and USDA's June 2026 reference- family Thrifty Food Plan cost of $1,023.20 gives floor(37 × 1023.20 / 632.30) = $59 under 7 U.S.C. 2025(c)(1)(A)(ii). The panel now quotes the published values, drops the unsupported CPI-U indexation claim, and marks the state's repricing range provisional while its artifact still carries the $1,029 projection. The adoption chart's value labels sat beside the range bar and collided with the official-rate label for nearly every state at desktop width; they now sit on their own rows at every width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 24, 2026
The answer's tier odds and 90% range count sampling noise only. The caveat now gives the backtest's numbers (analysis/ persistence_backtest_results.json): sampling-only 90% ranges caught the next year's rate 48% of the time over FY 2016–2024, and adding year-to-year movement raised that to 81–85%. The table key says the same in brief, and the lede names the law it describes, P.L. 119-21, since a pending farm bill would change the start year, election years, delay rule and tiers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…zy analyst loads - Delay-band lead and points follow the simulated FY 2026 delay odds; the first bill moves to FY 2030 when FY 2026 also tops 13.33%. - The all-states table sorts by the bill it shows (FY 2029 for delayed states, with its own spread); rows are keyboard-reachable. - Bills name their base: FY 2024 benefits as the QC sample weights them, with a method note against FNA's issuance tables. - FY 2027 copy cites 7 CFR 275.11(c) and 272.2(e)(4); the tolerance sentence states its rounding. - Every engine reproduction claim says eligibility is untested; "not yet independently verified" becomes "not yet replayed against its QC file". - The sustained targeted-review grid states its construction and is withheld for delayed states, which it would bill for FY 2028. - Drift copy, file-rate definition and the lede's delay mention. - The answer and table load without the 4 MB of analyst artifacts, which now load when the tools open; a failed artifact no longer blanks the page. - Resize re-renders only on width changes; the answer writes only changed markup, so the aria-live lead does not re-announce. - Tier labels fit their bands at every width. - Tests: render harness through the real app.js (answer vs table, delay wording, eligibility caveats), static locks on the issuance note, regulation cites and sort keys, and a band-label property test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…an rule The FY 2027 copy said most sample months were still ahead, which turns false in spring 2027; the count now comes from the reader's date. The sampling-plan sentence quotes 7 CFR 272.2(e)(4) without the inference that FY 2027 changes were due before it began, which the text does not support. Tests lock the SSI-CAP exclusion class in all seven replayed states, bound the bill spread, and give the render harness room for a full 53-state run. Assets move to 20261118a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Nov 18, 2026
…ds, sweep 600 and 768 px, render-test all 53 states Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… lock more in tests From the in-session review of bd329c1: - The lead now ends on the expected FY 2028 bill the table shows, counting the FY 2026 option and, near the line, the delay odds (NY read $1.08B in the lead against $630M in the table). - The delay rule names the FY 2025 and FY 2026 rates, the only ones 7 U.S.C. 2013(a)(2)(B)(iii) covers; tier 0 owes nothing "since it can use its FY 2025 rate", not "whichever year it uses". - FY 2026 stops being called unpublished from June 2027; the FY 2027 heading and the meta copy no longer go stale in October 2027. - The all-adoption total moves from the front-page takeaway to the adoption panel, beside its accounting caveat. - With the SMD scenario on, the targeted-review panels clear instead of keeping the previous state's numbers. - Copy: QC and the payment error rate defined in the lede; SSI-CAP defined; the CTA names Axiom's encoding and the seven states by name; the FY 2027 notice is linked. - Small fixes: modified clicks on "More on FY 2027" open a new tab; #analyst survives the URL rewrite; table focus survives rebuilds. - Tests: the harness records ids and fetches; new render tests check that analyst settings leave the answer alone, that analyst artifacts load only when the tools open, that every id exists in the page, and that the FY 2027 provisional note shows; eligibility locks require "eligibility untested"; node is required in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Nov 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ede and SSI-CAP wording - Restoring focus to a rebuilt table row no longer scrolls the page, so a row click's scroll to the answer is not pulled back while the table computes; the URL rewrite keeps the fragment the reader arrived with instead of adding #analyst. - Lede: the rate is the share of benefit dollars overpaid or underpaid, estimated from QC reviews (states run them; "federal" was wrong). - SSI-CAP wording follows paper/index.qmd: demonstration schedule outside the computed benefit chain. The FY 2027 notice links the dated memo. - Render harness re-checks the SMD box per state on ?smd=1 links, and the test checks the scenario runs exactly where model_scenarios.json has an ungated lever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Nov 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Applies the second in-session review of 906d8e9. - The delayed states' "How sure" point no longer says the FY 2026 rate is unsettled; it says the page simulates it, true on either side of June 2027. - The render harness can fix the app's clock (--today) and set the FY 2026 delay chance (--pdelay). New tests render the copy on both sides of June 1 and October 1, 2027, and on both sides of the 0.5% and 5% wording thresholds, which no state's odds fall between today. - The analyst-settings test covers gated states (SD, HI), checks that drift and extra reviews took effect, and compares the table rows. - The element test also checks every literal $("...") id in app.js. - An integrity failure stops the harness at once and names the artifact. - The national adoption total says it is computed at baseline with no drift, and drops the causal "would fall if adopted" wording. - The engine panel and adoption note credit the encoding as the verification note does and name the states from the same constant; SSI-CAP is spelled out there, and the NYSCAP note shows only for NY. - The FY 2027 chart's delay line stops above the FY 2027 row. - A mouse click no longer leaves a table row focused, so Space scrolls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…7 delay line Applies the third in-session check of f62b103. - test_adoption_total_stays_out_of_the_front_page_takeaway joins template pieces before matching, so "at baseline, with no drift" is found (CI failed on f62b103). - The keep-FY-2025 bill says it counts a small delay chance whenever that moves it off the lead's tier cost (Oklahoma: $225 million against $226 million). A render test checks the label on every state; OK joins the default render set. - The FY 2027 chart labels its delay line, as the adoption chart does, and its aria-label says the line covers FY 2026 rates only. - The engine panel says "whose encodings have been replayed" and spells out SSI-CAP in its catalog line; a test ties its "seven verified states" to the artifact. - The element test also checks ids the app selects with querySelector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Nov 18, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Independent review round 1 (job 20261118-144428-snapqc-pr100-r1d) found
9 P1 and 7 P2 issues plus 2 pre-existing items; an in-session pass
confirmed all 19. This fixes each:
- Keep a shared ?smd=1 link's setting while the model loads, and free
the cause-coded cut whenever the scenario is cleared.
- Restore the drift-adjusted FY 2026 election comparison in the analyst
tools.
- Give delayed states their tier and their chance of a different tier;
price their sustained grid from FY 2029 instead of withholding it.
- Round the table's chance column as the answer does ("<1%", ">99%").
- State the adoption panel's replay scope and the $59 tolerance's scope
(7 CFR 275.12(f)); cite USDA's error tolerance table.
- Carry the sampling-plan qualifiers (7 CFR 275.11(c), 272.2(e)(4)).
- State the delay test as the statute does (1.5 x rate reaches 20%) and
say "the delay line" for simulated rates; give the tier edges as the
code applies them.
- Replace the date-guessed FY 2026 status with the statutory deadline.
- Give all four backtest coverage figures and say the drift SD was not
backtested; label the strip "sampling noise only".
- Stop the adoption and FY 2027 artifacts from holding up the answer.
- Move focus with keyboard jumps; keep phone header links; print an
open Analyst tools section.
- Pre-existing: use drifted draws in the targeted paragraph, fix the
delayed tile's first-bill year, and reject prototype keys in ?state=.
- Tests compare rendered table cells, record URLs during load, bound
the bill spread from below, and stall side artifacts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The label sits in interventions-live, not the sustained grid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An adversarial pass on 917c62e (five lenses, each finding checked by a skeptic) confirmed four problems: - Delayed states were told a lower FY 2026 tier "would set a smaller FY 2029 bill". Against the likely outcome, a further delay and $0, it sets a larger one. The copy now says such a rate sets an FY 2029 bill at that tier instead of delaying the first bill again. - The grid note and hint said the figures overstate exposure. FY 2030 keys to the FY 2027 rate, which no delay touches, so they can understate it; both now say a figure can sit above or below. - While the drift estimate loaded, the analyst tools kept the previous state's figures. They now render without drift and say so, and say so too if the estimate fails to load. - No test ran the late-arrival paths. The harness gains --late=file and an at-load snapshot taken before it re-renders anything. Also: name 13.33% the delay line at first use; give the drift SD as the robust estimate beside the classical 1.62; say both drift-line bills count the delay chance; spell out SSI-CAP in the adoption note; widen the tall scroll margin to 379 px; test tierOf's edges; keep the spread lower bound off means that sit on a tier cost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Nov 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft for Max's review. Do not merge or deploy until Max approves (decision d3207).
This rebuilds the front page of the SNAP payment error simulator for one reader: a state SNAP director, a budget office analyst or a legislative staffer. The research core is unchanged: every number, caveat and SHA-256 pin. The order changes, and so do the words and which controls show by default.
Before and after
Screenshots are from branch
pr100-screenshotsat7c09378. They show this head (f54ca98) against main (682ff6c, which differs from this PR's base718fac9only inanalysis/LITERATURE.md), with Colorado selected.Full pages:
What changes
The selected state's answer leads, in sentences. Colorado is the default. The answer gives:
A state below 6% owes nothing for FY 2028, since it can use its FY 2025 rate. Delayed states get their own lead: the 15% tier their rate is in, that they owe nothing for FY 2028, and that the first bill comes in FY 2029, or in FY 2030 if FY 2026 also tops 13.33%. Their "How sure" point gives the chance a fresh FY 2026 sample lands in a different tier. Every other tier is below 10%, under the delay line, so such a rate would set an FY 2029 bill at that tier instead of delaying the first bill again.
Sampling-only ranges are labeled as overconfident. The backtest ran on reconstructed FY 2016–2024 state rates, with FY 2021 excluded (
analysis/persistence_backtest_results.json). There, 90% ranges built from one year's sampling noise caught the next year's rate 48% of the time. Counting both years' noise raised that to 64%. Adding a modeled year-to-year movement term raised it to 81%, and a model that also uses each state's history, to 85%. The answer gives these figures where it gives a range. It also says the drift option's 1.07-point figure is the robust estimate from one year's change (the classical estimate is 1.62 points) and was not backtested. The strip's legend and label say "sampling noise only".The all-states table moves up. It still opens sorted by the chance of a different tier. That column now rounds as the answer does: "<1%" and ">99%", never 0% or 100% (main printed 0% for Hawaii, Rhode Island and Virginia, where the answer says "less than 1%"). The bill column now sorts by the bill each row shows. Main sorted delayed states by their $0 FY 2028 bill while showing their FY 2029 bill. Rows can now be reached and opened from the keyboard, without leaving a clicked row focused. Opening a row moves focus to the answer, so Tab continues from there; "More on FY 2027" does the same for its section.
Research controls move into a collapsed "Analyst tools" section. These are the extra-QC-reviews slider, targeted review, the standard medical deduction scenario, the cause-coded cut, the rules-engine view, the drift band, the scenario tiles and charts, the adoption panel and the event studies. Main's separate election section and official-rate tile are folded into the answer. With drift on, the analyst tools restate the election under drift: for Colorado, $154M a year electing the better rate against $189M keeping FY 2025, a $35M saving. The answer above counts sampling noise only. If drift is checked before its estimate arrives, or the estimate fails to load, the analyst tools render without drift and say so.
Three analyst artifacts (
interventions_data.json,model_data.jsonandmodel_scenarios.json, about 4 MB) now load only when the tools open. The answer and table no longer wait on them, and a failed load of one of them no longer blocks the page. The adoption artifact (186 KB) and the FY 2027 artifact still load with the page. They no longer hold up the answer or the table: each panel says it is loading until its file arrives, and the national adoption total fills in after the table.That total moved from the front-page takeaway into the adoption panel, beside its accounting caveat. It now says it is computed at baseline with no drift. Main said the sum falls if every jurisdiction adopts a verified rules engine; it now calls the figures accounting scenarios, not effects of adoption. With the standard medical deduction scenario on, the targeted-review panels clear instead of keeping the previous state's figures. A shared
?smd=1link keeps its setting while the model loads. If the scenario is cleared for any reason, including a failed or gated load, the cause-coded cut it disables comes back on the next render.Jargon is defined or dropped.
Stale copy fixed.
New copy switches on its dates. This PR adds date-aware copy rather than fixing stale copy on main:
Tests render the page with its clock fixed before, between and after USDA's FY 2026 deadline and the end of FY 2027.
Axiom wording.
Grids that answer a different question are qualified. The sustained targeted-review grid now states its construction. It prices each year on its own simulated rate and does not model the election, the delay clause or third-preceding-year keying. For delayed states it shows FY 2028 as "$0 (delayed by statute)" and prices FY 2029–30. Neither the note nor the grid's hint claims the figures overstate exposure, since FY 2030 keys to the FY 2027 rate, which no delay touches. They say a figure can sit above or below what the state would owe. For Georgia at the default settings that is 14.327% and 14.207%, $908M over the two years. The targeted-review result no longer calls its figure the "expected statutory share". It is the cost share from the tier schedule alone, before the FY 2026 election and the delay clause. With drift on, that paragraph uses the same drifted draws as the scenario tile. Before, New York showed $1.06B in the paragraph and $932M in the tile. The delayed-state tile says when the first bill moves to FY 2030 instead of naming FY 2029 as the first bill year.
Bills name their base. A method note compares the QC-weighted FY 2024 benefits the bills use ($91.24 billion) with FNA's issuance tables ($93.48 billion). By state the gap runs from Minnesota (17% below) to Wyoming (7% above).
Layout. The new styles in
app.cssuse only@policyengine/ui-kitLayer-1 tokens fromtokens.css(--primary,--foreground,--muted-foreground,--borderand others) and add no colour literals, so light and dark mode follow the kit. Tier labels fit their band at every width. Resizing re-renders only when the width changes. The answer rewrites only changed markup, so screen readers don't re-announce it. On phones the standalone header wraps its Research, Model and API links instead of hiding them. Printing keeps an open Analyst tools section, results included, and drops a closed one. A?state=value that is not a jurisdiction, such asconstructor, falls back to Colorado.Invariants
These hold on the committed data for the 53 jurisdictions on the page. CI checks them on 13 states chosen to reach every branch of the answer, 4 of them with the analyst panels open (6 for the analyst-settings link). The 53-state render run and the browser sweep ran once for this PR, on the
pr100-screenshotsbranch; they are not part of CI.app.js(tests/test_front_page_render.py; the 53-state run is inrender-all.txt) and in a headless browser at four widths (sweep.json, which records how many comparisons ran).fmtM), unchanged from main, can print "$1000M" for a value just under $1 billion; no row is near that today. Tier labels fit their band, and a wider band never gets a shorter label. Edge labels stay inside the right edge. These are Hypothesis property tests at 5 examples each.smd=1, and that clearing the scenario frees the cause-coded cut.interventions_data.json,model_data.jsonormodel_scenarios.json. Opening the tools fetches all three; that half is checked on Colorado, since fetching does not depend on the state.$("…")id inapp.js(event handlers included) and every id it selects withquerySelector, must be inindex.htmlor in markupapp.jswrites.Verification
f54ca98: 476 passed, 23 skipped; ruff clean.SNAPQC_RENDER_ALL=1render tests onf54ca98: 30 passed (render-all.txt, GitHub Actions). The answer, analyst-panel and closed-page load checks cover all 53 jurisdictions. Some tests keep fixed states: the clock and synthetic-odds tests (four), the analyst-settings test (six), the stalled- and late-artifact tests (two), and the open-tools fetch check (Colorado).sweep.json). At each width it ran 53 tier-chance, 36 FY 2028 bill and 7 FY 2029 bill comparisons between the answer and the table cell. It found no mismatches, label overlaps, clipping, horizontal overflow or hidden header links.f54ca98, one worker:tests/test_front_page.py38 passed;tests/test_front_page_render.pyandtests/test_events_section.py33 passed.Review
Independent review, round 1 reviewed
e1acb6f. It was Subfleet job20261118-144428-snapqc-pr100-r1d(--task review --tier hard); the review is in~/reviews/snap-qc-sim-pr100-2026-11-18/review-r1.md. Verdict: request changes, with 9 P1 and 7 P2 findings and 2 pre-existing items. An in-session adversarial pass graded each item against the code (runs/lane-r1-verify/RESULTS.md). All 19 held at P1 or P2, five of them in code this PR did not touch.f54ca98fixes all 19:?smd=1link lost its setting if copied or reloaded while the model loaded.?state=constructorleft the app without a state.An in-session adversarial pass then checked
917c62e, the round-1 fix commit. It ran five lenses, and a skeptic checked each P0–P2 finding (runs/insession-r1fix/CONFIRMED.md). It confirmed four problems the fixes introduced or left, andf54ca98fixes them:Independent review, round 2 is a full review of
f54ca98, run as Subfleet job20261119-233024-snapqc-pr100-r2with brief~/reviews/snap-qc-sim-pr100-2026-11-18/review-r2-prompt.md. It has not returned yet. This PR is in the review-before-merge class, so merge and deploy wait on that review even after a design approval.Supporting in-session review, before the independent review (three rounds)
Supporting review, not the independent one, came in three in-session rounds. Each finding was checked by an adversarial verifier. Counts are findings as filed; a few restate one another.
Round 1 reviewed
bd329c1in four lenses (claims against sources, app logic, reader copy, tests). It confirmed 9 P2 and about 25 P3 findings.2452d09and906d8e9fix every P2 and most P3s. The P2s:Among the P3s, the delay rule had been stated for any year's rate; it now names FY 2025 and FY 2026.
Round 2 checked this description's claims and the fix commits (
bd329c1..906d8e9). It confirmed 9 P2 findings (8 distinct) and 36 P3s.f62b103and this description fix the P2s:e1acb6f, ids read withquerySelectortoo.f62b103ande1acb6falso fix these P3s:On the screenshot branch,
66c153dmakes the sweep record its comparison counts and fail if none ran.Round 3 checked
f62b103and this description. It confirmed 3 P1, 2 P2 and 19 P3 findings. The three P1s were one defect: a static test onf62b103searched for a phrase that the source splits across two lines, so CI failed.e1acb6ffixes it. The P2s:e1acb6fand this description also fix most of round 3's P3s:querySelector.Confirmed findings left as they are:
paper/snapshot/certopens the folder that holds a report titled "CO SNAP QC certification: CERTIFIED". That is repo text, not page copy (open question 4).data.jsonload still leaves an empty page, as on main.setup-nodestep. The render tests fail, rather than skip, when Node is missing in CI.Open questions for Max
paper/snapshot/cert/CERT_REPORT.mdis titled "CERTIFIED", which Axiom's writing guardrails avoid. Should it be renamed?pr100-screenshotsafter merge. It is the only home of the screenshots,render-all.txtandsweep.jsonthis description cites, so deleting it breaks those links.Deploy, after approval
The deploy procedure is in #99, which is still open. Its render fix is not on main, so merge #99 first, or follow the procedure from its branch. In short: render both papers in a fresh worktree of
origin/main, sync the gitignoredsite_libs/andindex_files/asset folders, runvercel deploy --prodfromapp/public, then verify both hosts. Deploying fromapp/404s the policyengine.org path. The asset version is20261118a, new in this PR and not yet deployed.🤖 Generated with Claude Code