Skip to content

Lead the simulator with the selected state's answer - #100

Draft
MaxGhenis wants to merge 13 commits into
mainfrom
state-first-front-page
Draft

MaxGhenis wants to merge 13 commits into
mainfrom
state-first-front-page

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

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-screenshots at 7c09378. They show this head (f54ca98) against main (682ff6c, which differs from this PR's base 718fac9 only in analysis/LITERATURE.md), with Colorado selected.

Before (main) After (this PR)
Phone, first screen
Desktop, first screen

Full pages:

What changes

The selected state's answer leads, in sentences. Colorado is the default. The answer gives:

  • the FY 2025 rate, the tier and what the state would pay at that tier, with the benefit base it applies to;
  • the expected FY 2028 bill the table shows, counting the option to use the FY 2026 rate and, near the line, the chance of a delay;
  • the chance a fresh sample of the state's size lands in a different tier;
  • where the state sits against the delay line (1.5 times the rate reaching 20%, which for a published two-decimal rate means above 13.33%), and the chance a fresh FY 2026 sample reaches it;
  • the FY 2026 option, with the expected FY 2028 bill set against keeping the FY 2025 rate;
  • FY 2027, which is open now and sets the FY 2030 bill.

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.json and model_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=1 link 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.

  • "File rate" is defined where the analyst tools begin.
  • "Oracle bound" became "perfect hindsight … the ceiling any targeting method can reach".
  • "Persistence-anchored" and "deviation-carry" are replaced by plain descriptions of what the code does.
  • "τ" became "a 1.07-point standard deviation".
  • The lede defines the payment error rate and QC; the verification note and the engine panel spell out SSI-CAP.

Stale copy fixed.

  • FY 2026 is in the past tense. The page does not guess from the date whether USDA has published FY 2026 rates. It says the law gives USDA until June 30, 2027 to determine them (7 U.S.C. 2025(c)(8)(C)), that the page simulates that rate, and that the published rate settles what the odds estimate.
  • The tier-change line uses the paper's framing: 11 of the 18 changes sit inside the two-year noise band.
  • The FY 2027 section quotes FNA's August 21, 2026 notice ($1,023 four-person maximum). It cites the $59 tolerance from USDA's error tolerance table (Policy Memo 26-05) and states its scope as 7 CFR 275.12(f) does: small over- and underissuances to eligible households are left out of the rate, while an ineligible household's whole allotment still counts. The same $59 follows from the June 2026 Thrifty Food Plan cost.
  • The count of FY 2027 sample months still to come is computed from the reader's date, so it does not go stale. The sampling-plan sentences carry the regulations' qualifiers. Under 7 CFR 275.11(c), about one-twelfth of the sample is drawn each month unless FNA has approved other monthly numbers. Under 7 CFR 272.2(e)(4), the plan is signed by the head of the state agency. Initial plans, major changes and changes from general procedure changes go in at least 60 days ahead, and minor changes to an approved plan at least 30 days ahead.
  • The lede gives the tier edges as the code applies them: 5% from 6% to under 8%, 10% from 8% to under 10%.
  • The lede names 13.33% "the delay line" at first use. The delay rule states the statute's test, 1.5 times the rate reaching 20%. At the two decimals USDA publishes, that means above 13.33%. Simulated rates are continuous, so the copy about draws says "the delay line". The rule names the FY 2025 and FY 2026 rates, the only ones 7 U.S.C. 2013(a)(2)(B)(iii) covers. The FY 2027 chart's delay line stops above the FY 2027 row, with a label.

New copy switches on its dates. This PR adds date-aware copy rather than fixing stale copy on main:

  • The FY 2027 heading and answer point change when FY 2027 ends on September 30, 2027.
  • The meta descriptions name no year as "still open".

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.

  • "Certified" and "independently verified" are gone from reader copy. A static test bans "certifi", and a render test checks unreplayed states' text for "independently".
  • Every claim that the engine reproduces a QC file says the replay leaves eligibility untested. Tests check the static copy and the rendered pages: in CI, the verification note on 13 states and the analyst panels on 4; all 53 in the one-off full run.
  • The verification note credits the encoding to Axiom, not to the state. For unreplayed states it reads "an encoding of its rules has not yet been replayed against its QC file", followed by the seven replayed states by name. The engine panel and the adoption note use the same attribution, and the engine panel names the same states.
  • The note names the SSI-CAP cases excluded in NY (38), AZ (3), MD (23) and TX (49). The adoption panel's reproduction claim now gives the same scope. For Texas it reads "for all 906 replayable reviews, 906 of the file's 955; the other 49 are SSI-CAP standardized-benefit cases". Colorado's reads "every case in its file".

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.css use only @policyengine/ui-kit Layer-1 tokens from tokens.css (--primary, --foreground, --muted-foreground, --border and 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 as constructor, 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-screenshots branch; they are not part of CI.

  • Answer and table agree. The answer and the all-states row run the same baseline draws. The tests compare the table cells as rendered (not the internal row) with the answer's words: the tier chance in the same rounding, the expected FY 2028 bill, and delayed states' FY 2029 bill, marked FY29. This is checked through the real app.js (tests/test_front_page_render.py; the 53-state run is in render-all.txt) and in a headless browser at four widths (sweep.json, which records how many comparisons ran).
  • The bill spread is bounded both ways. Each draw bills 0, 5, 10 or 15% of the base, so the standard deviation is at most 7.5% of the base. It is at least the spread of the two tier costs either side of the mean, so a spread of zero fails wherever the mean sits between tiers. It is exactly 0 where the FY 2026 delay is certain.
  • Delay wording follows the delay odds. For states not already delayed, the "reaches it X of the time, which would move its first bill to FY 2030" clause appears exactly when the FY 2026 delay chance reaches 0.5%. The near-the-line sentence appears exactly when it reaches 5%. No state's simulated chance falls between those thresholds today, so a test also renders the answer with the chance set at 0.49%, 0.5%, 4.9% and 5%. Reader copy about simulated rates never says "tops 13.33%".
  • The FY 2027 month count follows the calendar. It is 12 before October 2026, falls by one at each month start, is 0 from September 2027, and the year reads as ended from October 1, 2027 (property test). The date-dependent copy also renders with the clock fixed at November 18, 2026, July 15, 2027 and October 2, 2027, and the FY 2026 status reads the same on all three.
  • The formatters stay in range. Prose money never prints "1000 million", and prose chances print "less than 1%" or "more than 99%", never 0% or 100%. The table's chance column uses the same rounding in short form ("<1%", ">99%"). The short money format (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.
  • Side artifacts never hold up the answer, and still arrive late. With the adoption or the FY 2027 file's fetch held open forever, the answer and the table still render, and the panel says it is loading. With either file held until the all-states pass has finished, the page the app itself shows, before the test harness re-renders anything, has the FY 2027 panel, the adoption panel, the national adoption total and drift.
  • Analyst settings leave the answer alone. A link carrying every analyst setting (engine view, drift, 500 extra reviews, the SMD scenario) renders the same answer and table cells, word for word, as the plain page. The test covers states with and without an ungated model scenario. It checks that drift and the extra reviews took effect, and that drift restates the election. It also checks that every URL the app writes while the model loads keeps smd=1, and that clearing the scenario frees the cause-coded cut.
  • Analyst artifacts load only when the tools open. The plain page never fetches interventions_data.json, model_data.json or model_scenarios.json. Opening the tools fetches all three; that half is checked on Colorado, since fetching does not depend on the state.
  • Every element the app reads exists in the page. Each id the harness sees the app request, plus every literal $("…") id in app.js (event handlers included) and every id it selects with querySelector, must be in index.html or in markup app.js writes.
  • Copy matches its sources. Copy numbers are locked to their artifacts: the tier-change counts, the backtest coverage, the drift standard deviation, the issuance comparison and the SSI-CAP class in all seven replayed states. The FY 2027 published values ($1,023, $1,023.20 and $59) are pinned in the tests from FNA's notice; no committed artifact carries them yet (open question 3).

Verification

  • CI on f54ca98: 476 passed, 23 skipped; ruff clean.
  • SNAPQC_RENDER_ALL=1 render tests on f54ca98: 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).
  • Browser sweep of all 53 jurisdictions at 390, 600, 768 and 1280 px, analyst tools open (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.
  • Locally on f54ca98, one worker: tests/test_front_page.py 38 passed; tests/test_front_page_render.py and tests/test_events_section.py 33 passed.

Review

Independent review, round 1 reviewed e1acb6f. It was Subfleet job 20261118-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. f54ca98 fixes all 19:

  • A shared ?smd=1 link lost its setting if copied or reloaded while the model loaded.
  • A failed or gated model load left the cause-coded cut disabled.
  • The drift-adjusted election comparison was gone from the analyst tools. It is back.
  • Delayed states' lead dropped their tier and their chance of a different tier.
  • The table printed 0% where the answer said "less than 1%".
  • The sustained grid was withheld for delayed states. It now prices FY 2029–30.
  • The targeted-review result called a pre-election tier share the "expected statutory share".
  • The adoption panel's reproduction claim lacked the replay scope (Texas: 906 of 955).
  • "QC disregards errors of that size or less" overstated the $59 tolerance.
  • The strip's legend and the backtest copy overstated what the ranges cover.
  • The sampling-plan summary dropped the regulations' qualifiers.
  • The tier edges at 8% and 10% were ambiguous, and "tops 13.33%" was applied to continuous draws.
  • The FY 2026 status was guessed from the date.
  • A slow adoption or FY 2027 fetch held up the answer and table.
  • Tests that would pass if what they lock broke: internal rows instead of rendered cells, a hand-checked SMD box, a spread test that accepted zero.
  • Keyboard jumps scrolled without moving focus.
  • The phone header hid its links, and printing dropped the analyst tools even when open.
  • Pre-existing: with drift on, the targeted paragraph and the tile used different draws; the delayed tile named FY 2029 as the first bill year when the draws moved it to FY 2030; ?state=constructor left 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, and f54ca98 fixes them:

  • The new delayed-state copy said a lower FY 2026 tier "would set a smaller FY 2029 bill". Against the likely outcome, a further delay and a $0 FY 2029 bill, it sets a larger one.
  • The new 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.
  • While the drift estimate loaded, the analyst tools kept the previous state's figures.
  • No test ran the late-arrival paths.

Independent review, round 2 is a full review of f54ca98, run as Subfleet job 20261119-233024-snapqc-pr100-r2 with 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 bd329c1 in four lenses (claims against sources, app logic, reader copy, tests). It confirmed 9 P2 and about 25 P3 findings. 2452d09 and 906d8e9 fix every P2 and most P3s. The P2s:

  • The lead gave the tier cost ($1.08 billion for New York) while the table gave the expected bill ($630 million). The lead now ends on the table's figure.
  • "Not yet published" (FY 2026) and "still open" (FY 2027) were hard-coded next to date-aware text.
  • The all-adoption total sat on the front page without its "not causal" caveat.
  • With the SMD scenario on, the targeted-review panels kept the previous state's numbers.
  • Five test gaps: no check that analyst settings leave the answer alone, of the lazy loads, that element ids exist, or that the FY 2027 repricing is labelled provisional; and eligibility locks that matched the bare word.

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. f62b103 and this description fix the P2s:

  • The delayed states' "How sure" point would still have called the FY 2026 rate unsettled after June 2027. It now says the page simulates that rate, which is true on either side of the date.
  • No test could tell the 0.5% and 5% delay-wording thresholds apart. Synthetic-odds renders now do.
  • No render test checked which FY 2026 sentence shows on which side of June 1, 2027. Clock-fixed renders now do.
  • The analyst-settings test never reached a state without an ungated model scenario. It now includes SD and HI.
  • The element test missed ids read only in event handlers. A static scan now covers them, and since e1acb6f, ids read with querySelector too.
  • The adoption-total test checked one phrase. It now checks the total's placement and that the takeaway carries none of its sums.
  • This description overstated what loads lazily and said the FY 2027 parameters were locked to artifacts. Both are corrected above.

f62b103 and e1acb6f also fix these P3s:

  • The engine panel and adoption note use the verification note's attribution, and the engine panel its state names.
  • The engine panel spells out SSI-CAP, and shows its NYSCAP note only for New York.
  • The national adoption total is labelled no-drift and non-causal.
  • The keep-FY-2025 figure says when it counts a delay chance.
  • The FY 2027 delay line stops above the FY 2027 row and is labelled.
  • The harness stops at once on an integrity failure.
  • Every "seven" beside the replayed states is tied to the artifact.
  • Space no longer re-picks a clicked row.

On the screenshot branch, 66c153d makes the sweep record its comparison counts and fail if none ran.

Round 3 checked f62b103 and this description. It confirmed 3 P1, 2 P2 and 19 P3 findings. The three P1s were one defect: a static test on f62b103 searched for a phrase that the source splits across two lines, so CI failed. e1acb6f fixes it. The P2s:

e1acb6f and this description also fix most of round 3's P3s:

  • Oklahoma's keep-FY-2025 bill ($225 million) differed from its tier cost ($226 million) with no explanation.
  • The engine panel's "whose encodings have been" lacked "replayed", and its catalog line used SSI-CAP bare.
  • The FY 2027 delay line had no label.
  • The element test did not check ids the app selects with querySelector.
  • This description's test counts, its attribution and table sentences, a paraphrase set in quotation marks, and the fix lists are corrected.

Confirmed findings left as they are:

  • The "48% of the time" backtest figure uses the backtest's sampling-only construction. Its average spread is narrower than the page's ranges, and at published design SEs the same construction covers 78%. The copy quotes the artifact's headline figures (48%, 64%, 81%, 85%), and a test locks them.
  • "Chance FY 2026 beats FY 2025" (analyst tile, and the FY 2026 option point) is near 50% for every state by construction. The answer pairs it with the bill comparison, which shows when it doesn't matter.
  • "Verified rules engine" stays in the adoption heading, inside the analyst tools.
  • The provenance link to paper/snapshot/cert opens the folder that holds a report titled "CO SNAP QC certification: CERTIFIED". That is repo text, not page copy (open question 4).
  • On phones, the 5% and 10% tier labels drop "share" when the band is narrow.
  • While the table fills in, which takes a few seconds, a keyboard-focused row is re-focused on each rebuild.
  • The adoption artifact and the national adoption pass still run with the page, as on main. The pass adds two simulations per state to the table's work.
  • Once USDA publishes FY 2026 rates, the page says it simulates them, and that the published rate settles the odds, until someone wires in the published figures.
  • A failed data.json load still leaves an empty page, as on main.
  • Minor wording in the analyst tools: "mechanical FY 2027 rate", "federal re-review integration", "locked FY 2025 rate" and "/yr".
  • Test nits: the NaN scan covers reader paragraphs only, and the property tests run 5 examples each.
  • CI relies on the runner's preinstalled Node; there is no setup-node step. The render tests fail, rather than skip, when Node is missing in CI.

Open questions for Max

  1. Which bill leads. The brief asked for the "annual bill". The lead now gives the cost at the FY 2025 tier ($190 million for Colorado) and then, in bold, the expected FY 2028 bill the table shows ($159 million, counting the FY 2026 option). Lead with one figure instead?
  2. Bill base. Bills use the QC-weighted FY 2024 benefits ($91.24 billion nationally) rather than FNA's issuance tables ($93.48 billion). By state the gap runs from Minnesota (17% below) to Wyoming (7% above). The method note discloses this. Issue Bill dollars at forecast-year levels, not FY2024 issuance #31 already proposes anchoring bills to forecast-year levels. Keep the base here, or take it up under Bill dollars at forecast-year levels, not FY2024 issuance #31?
  3. FY 2027 repricing. The repricing still runs on projected parameters (a $1,029 maximum allotment). The page labels it provisional against the published $1,023. A rerun on the published values would also commit those values as an artifact and fix the paper's CPI-U/$1,029 sentence. That follow-up is not filed as an issue yet; it is proposed as a separate session.
  4. CERT_REPORT title. paper/snapshot/cert/CERT_REPORT.md is titled "CERTIFIED", which Axiom's writing guardrails avoid. Should it be renamed?
  5. Disclosure. For unreplayed states, the verification note and the analyst engine panel send readers to hello@policyengine.org about Axiom's encodings, and the engine panel puts that address beside Axiom's links. Should the page say how PolicyEngine and Axiom are related?
  6. Screenshot branch. Keep or delete pr100-screenshots after merge. It is the only home of the screenshots, render-all.txt and sweep.json this 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 gitignored site_libs/ and index_files/ asset folders, run vercel deploy --prod from app/public, then verify both hosts. Deploying from app/ 404s the policyengine.org path. The asset version is 20261118a, new in this PR and not yet deployed.

🤖 Generated with Claude Code

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>
github-actions Bot added a commit that referenced this pull request Oct 24, 2026
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>
MaxGhenis and others added 3 commits November 18, 2026 12:01
…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>
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
… 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>
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
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>
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
…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>
github-actions Bot added a commit that referenced this pull request Nov 18, 2026
MaxGhenis and others added 2 commits November 19, 2026 22:47
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>
github-actions Bot added a commit that referenced this pull request Nov 19, 2026
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>
github-actions Bot added a commit that referenced this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant