Skip to content

Fiscal Lab: 15 line claims with fiscal-lab-comparison results - #269

Draft
MaxGhenis wants to merge 4 commits into
mainfrom
sources/fiscal-lab-lines-20261129
Draft

MaxGhenis wants to merge 4 commits into
mainfrom
sources/fiscal-lab-lines-20261129

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

What this adds

Max's ruling on decision d3472 was to "publish the 15 line figures" in their own PR after #267. This PR does that:

  • 15 Fiscal Lab line claims. They sit beside H.R. 4849's and H.R. 1428's totals, one for each line that PolicyEngine/fiscal-lab-comparison computes, in each case:
    • H.R. 4849 has 3 lines, each with low, central and high cases (9 claims).
    • H.R. 1428 has 6 lines, central only (6 claims). Its page shows no line ranges.
    • Each claim takes its bill's total's reform, period and conditions, and adds the comparison's line name as conditions.provision. Its source_column names Fiscal Lab's score-table line, or the lines it sums.
  • One PolicyEngine result per line claim. Each result is the comparison's FY2027-2036 sum at commit 3894b8ca (its PR Oracle harness doctrine: maximally parallel external comparisons, published #1 head):
    • concept_mismatch where the same-input verdict is "no", and constructed where it is "partly";
    • policyengine-us 2.2.2 on populace-us-2024-spm-20260915, with every simulation run at 9f854e6;
    • dated at the commit's time, 2026-11-27T00:16:32Z.
  • pe_lines.py / pe_lines.json. The script reads compare.py's line matching from its syntax tree, without running it, and reads tables/policyengine_by_fiscal_year.csv. Both blobs are pinned by SHA-256. It checks that every output file records the same versions, data build and run commit. Where a comparison note quotes a Fiscal Lab figure, it rewords that phrase by pattern, so no committed file holds the figure.
  • Adapter QC 11. It finds each named line on the bill's score table by its exact label, checks that the line's years add to its total, and writes one figure per case, or the sum of the lines. --release also checks that these lines are the same in the November 21 build.
  • Reruns. A rerun replaces the comparison's own rows (fiscal-lab-comparison-<12 hex>) on the line claims, so a later pin leaves no rows from an earlier one. Any other result on a line claim survives.

No other Fiscal Lab component is committed, and no raw Fiscal Lab file is.

What changes on the site

  • The feed gains exactly 15 rows. No existing row changes.
  • The Fiscal Lab lane moves from ingested to computed ("15 of 1363 claims computed").
  • comparison.json and the PMD archives are unchanged.
  • On H.R. 1428's premium tax credits, PolicyEngine shows a cost (+$44.1bn) where Fiscal Lab shows a saving (−$49.3bn). The grid prints the divergence the way it already does for opposite-sign constructed rows.

Checks

  • tests/test_fiscal_lab_memo_scores.py passes (137 tests). New tests cover:
    • the line-claim mapping, and that the extract and pe_lines.json name the same lines;
    • each result against its sum, the status mapping and the sign;
    • rerun idempotence, a later pin replacing an earlier one, and a run id off the rerun pattern being refused;
    • one mutation test for each line and pe_lines check;
    • QC 11 on synthetic data, and the rebuild of pe_lines.json from the pinned commit, which is skipped when no checkout of the comparison is present.
  • tests/test_export_populations.py, plus the app's bun test src, tsc -b and lint, all pass.
  • The data was regenerated by an in-place ingest of a database built from main. Before the ingest, that database's export matched main's committed feed and lanes byte for byte. A second ingest changed nothing. CI does the fresh double build.

🤖 Generated with Claude Code

Stage the 15 Fiscal Lab score-table line figures that
PolicyEngine/fiscal-lab-comparison computes, on H.R. 4849 (three lines,
low, central and high) and H.R. 1428 (six lines, central only), each
keyed by the comparison's line name in conditions.provision beside the
bill's totals. Each gets one PolicyEngine result: the comparison's
FY2027-2036 sum at commit 3894b8ca, concept_mismatch where its
same-input verdict is no and constructed where it is partly.

- pe_lines.py reads compare.py's matching (without running it) and the
  fiscal-year table at the pinned commit, checks every output file's
  versions and data build, and writes pe_lines.json. Notes that quote a
  Fiscal Lab figure are reworded by pattern, so no file holds one.
- adapter.py QC 11 writes one figure per case per line, or the sum of
  the matched lines, and the release check compares them with the
  November 21 build.
- The ingest replaces the comparison's own rows on a rerun, so a later
  pin leaves none of an earlier one's; the lane reads 15 of 1,363
  computed.

Decision d3472.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-scorecard Ready Ready Preview Dec 1, 2026 3:39pm UTC

Request Review

- pe_lines.py: "well above" now needs a gap of at least 20 percent in
  the comparison's note, or the build fails, so a later pin cannot
  overstate it; the comment names 1.97 as Fiscal Lab's estimate of the
  new line's national average, not a figure in the bill.
- source.json and NOTES.md say the line labels are committed, and that
  the comparison's notes describe Fiscal Lab's method in its own words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 1's P2 on the terms wording: NOTES.md, source.json, the adapter
and ingest docstrings and one test docstring described what Fiscal
Lab's Terms of Use allow and reserve. Each now cites section 5 and its
URL, and says which figures to publish is Max's call, with his
decisions as recorded. source.json drops the selective quote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Independent review, round 1 (Codex cloud task): REQUEST_CHANGES on d1526a4.

  • Chat: https://chatgpt.com/local/6b0ca5cd-0a78-83ea-a742-beb1510420d5 (account codex-1). The hub's send script sets effort to the page's top setting (Extra High or Ultra); the model name on the page was not recorded.
  • Findings: one P1 and six P2s.
    • P1: a rerun could delete other writers' results on line claims.
    • QC 11: it accepted a duplicate yearly label and a partial range.
    • pe_lines.py, three guards: the Medicare Savings Programs rewrite, abbreviated dollar amounts, and the syntax-tree reader.
    • H.R. 4849 counterpart text: it miscounted the claims, saying three instead of nine.
    • Terms wording: the docs paraphrased the provider's terms.
  • Confirmed correct:
    • All 9 PolicyEngine sums and all 90 fiscal-year values match the comparison's table.
    • The 15 Fiscal Lab figures rebuilt independently.
    • A fresh double build matched every committed feed file and all 85 PMD shards.
    • 146 Python tests, 75 app tests, tsc and the build passed.
  • Not run in its Linux container: the macOS filesystem branches of two fetch tests, which macOS CI covers, and adapter.py check --release against the November 21 build.
  • Fixes:
    • 5b9baa3 answers the P1 and the first five P2s.
    • 34f535e answers the terms wording. It replaces every paraphrase of the terms with a citation of section 5 and keeps the publishing decisions as recorded.
  • Round 2, a full review at 34f535e, is queued as a Codex cloud task.

🤖 Generated with Claude Code

This branch was successfully deployed

1 active deployment
Preview — 34f535e3 Deployed Dec 1, 2026 by vercel[bot]
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