Repository navigation
Correct the provenance of two replication anchors (CBO 2005; DYNASIM4) - #489
Merged
Merged
Conversation
Mermin (2005) Table 1's 75-year deficit/surplus row is Congressional Budget Office (2005) estimates that Mermin reports, not DYNASIM3 Runid 432 output; the table's benefit rows are DYNASIM3's. The Five Democratic Approaches report (Urban 103050) is DYNASIM4 ID980, not DYNASIM3 ID980. - scripts/replication_cost_ordering.py: MERMIN_ANCHOR_CITE and CAREGIVER_ANCHOR_CITE, the docstring, anchor comments and the T2-swap named delta. - scripts/replication_caregiver.py: docstring, paper field (with the report's subtitle and 2019 Trustees assumptions), Table 15 citation. - scripts/replication_mermin_rows.py: Table 1 citation and the payroll-row comment. - paper/paper.qmd: the cost-ordering paragraph names CBO's column. - docs/errata/2026-09-29-anchor-provenance.md: exact source quotes with file:line, the committed artifacts that keep the old labels (the erratum governs them), identifiers kept as aliases, and the unchanged T1-T3 results. - tests/test_anchor_provenance_erratum.py (unit tier, 9 tests) pins the corrected strings and fails on the old ones; tier counts updated. No numeric value, result or pass/fail status changes. Committed runs/*.json, gates.yaml, the engine and the benchmark registry are untouched. Fixes #488 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The cost-ordering paragraph joined two claims (the anchor column is CBO's 2005 scoring; DYNASIM3's own 2050 row orders the pair the same way) with ", and" and ran one line past the wrap. They are now two sentences, rewrapped. No number changes: 81.8 and 85.2 are the same Table 1 percent-of-scheduled values. tests/test_anchor_provenance_erratum.py gains a unit test that pins the corrected paper sentence (it fails on origin/master's paper). The unit tier rises from 4,988 to 4,989 and the total from 10,362 to 10,363 (pytest --collect-only -q -p no:xdist -m <tier>). The erratum notes that the test also pins the paper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Independent review (fresh Opus 5.5 agent, blind to the build): APPROVE at 484eed6. It checked every corrected label and erratum quote against the source texts (411260-benefit-reductions and 103050-five-dem, SHA-256 matched). It confirmed that no runs/*.json, gates.yaml, engine file, numeric value or status changed, and it proved the new pins fail on the old strings in a scratch copy. Tests, black and ruff pass. Merging on green CI at this head. 🤖 Generated with Claude Code |
This was referenced Sep 29, 2026
This branch was successfully deployed
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.
Two replication anchors carried the wrong model label. This PR corrects the labels in the scripts and the paper and adds an erratum that governs the committed artifacts, which keep their original bytes.
411260-benefit-reductions.txt:212-214) says the last row of Table 1 "presents Congressional Budget Office (CBO) estimates". The table's source line (:521) credits both DYNASIM3 (Runid: 432) and CBO (2005): the benefit rows are DYNASIM3, and the deficit row is CBO. This row is the T2 anchor of the cost-ordering synthesis, so T2 is a comparison against CBO's 2005 estimates. It was registered but not blind, because the five figures it uses were already in committed artifacts before the registration.103050-five-dem.txt:1052), Table 15 reads "Source: DYNASIM ID980." (:3299), and the report says its analysis "is based on DYNASIM4" (:906).What changed
scripts/replication_cost_ordering.py:MERMIN_ANCHOR_CITEnow attributes the row to CBO (2005) as reported in Mermin (2005). It also quotes the row label exactly ("percentage of", where the old string had "percent of").CAREGIVER_ANCHOR_CITEnow reads DYNASIM4 ID980. The docstring, the anchor comments and the T2-swap named delta were updated to match. The named delta now says the flip is against CBO's order, and that DYNASIM3's 2050 benefit row orders the pair the same way (it takes 81.8 and 85.2 fromMERMIN_PCT_SCHEDULED_2050).scripts/replication_caregiver.py: the docstring, thepaperfield and the Table 15 citation now read DYNASIM4 ID980. Thepaperfield also gets the report's actual subtitle ("Estimated Impact of Plans from the 2020 Presidential Campaign",:11-13) and its 2019 Trustees assumptions (:330-331).scripts/replication_mermin_rows.py: the Table 1 citation and the comment onANCHOR_TABLE1_PAYROLL_PCTnow name CBO (2005) for the payroll row. The citation now gives the page (PDF p.15), which the old string left blank.paper/paper.qmd: the cost-ordering paragraph said "DYNASIM ranks them the other way". It now says, in two sentences, that the anchor column is CBO's 2005 scoring, reported in the same table as DYNASIM3's benefits, and that DYNASIM3's own 2050 row for ages 62 to 67 orders the pair the same way (81.8 and 85.2 percent of scheduled, the table's existing values).docs/errata/2026-09-29-anchor-provenance.md(new) covers:runs/replication_cost_ordering_v1.json,runs/replication_caregiver_v1.json,runs/replication_mermin_rows_v1.json, and the benchmark registry, history and wall rowdynasim.mermin.four_reform_cost_ordering;tests/test_anchor_provenance_erratum.py(new,unittier, 10 tests):origin/master's scripts and paper; the other 3 test the erratum itself);scripts/,src/,paper/anddocs/outside the erratum for the old labels;~/PolicyEngine/dynasim-refswhen that directory is present, and skips the check otherwise.tests/tier_counts.jsonand thetests/README-tiers.mdtable:unitrises from 4,979 to 4,989 and the total from 10,353 to 10,363.What did not change
runs/*.json,gates.yaml,engine/loop.pyandengine/steps.pywere not touched.benchmarks/registry.jsonandbuild_registry.pywere not touched. The registry's append protocol needs a spec-revision note, andbuild_wall.pyrequires the latest history set to use the current registry SHA, so a relabel ofdynasim.mermin.four_reform_cost_orderinghas to ride on the next evaluation append. Until then the erratum governs.dynasim.mermin.four_reform_cost_ordering,T2_mermin_kendall_tau,mermin_cite,mermin_payroll_pctandseventy_five_year_payroll_pctkeep their names, and the erratum records them as aliases.docs/references.bibwas not touched. Itsmermin2005benefitreductionsnote ("DYNASIM3, Runid 432") correctly names the report's own run, andsmith2020fivedemalready read DYNASIM4.Verification
All commands used
.venv/bin/python -m pytest -p no:xdistwithOMP_NUM_THREADS=1, on macOS with the PSID data and~/PolicyEngine/dynasim-refsstaged:tests/test_anchor_provenance_erratum.py: 10 passed, including the exact-quote and hash check against the staged sources. Againstorigin/master's scripts and paper, with the erratum present, 7 of the 10 fail, as they should.tests/test_replication_cost_ordering.py,test_replication_caregiver.py,test_replication_mermin_rows.pyandtest_benchmarks.py, together with the new module andtest_paper_figures.py: 83 passed, 2 skipped. The skips are the policyengine-us revision pins in the caregiver and Mermin-rows reproductions; the local checkout is at e4363903f3 and the artifacts pin bf71be3b. The PSID reproduction pintest_ppi_delta_reproduces_committedran and passed.test_m2_pseudo_projection.py, the twotest_w2_seam_caregiver*.pymodules, the twotest_gate_w1_candidate1*.pymodules,test_gate_w1_candidate2.pyand the threetest_gate_w1_forensics*_reproduction.pymodules): 52 passed, 17 skipped. The skips are environmental: no PE-US directory variable, no certified frame export or pickle, and no MX23REL.pytest -p no:xdist tests -k test__given_collected_suite__then_tiers_match_policy_manifest): passed. The per-tier recounts withpytest --collect-only -q -p no:xdist -m <tier>were unit 4,989, artifact 3,331, integration_psid 1,341, reproduction_legacy 520 and oracle_policyengine 182, for 10,363 in total.black . -l 79 --check: 876 files unchanged.ruff check .: all checks passed.git grep -n "Runid 432\|DYNASIM3 ID980"outsideruns/finds only four kinds of hit:docs/references.bib, which is correct;documentstrings (benchmarks/registry.jsonand its builderbenchmarks/build_registry.py), which the erratum governs;Fixes #488
🤖 Generated with Claude Code