Repository navigation
Conversation
The uprating viewer linked every row to policyengine-us's master branch under policyengine_us/parameters, so all 23 variable links pointed at the wrong folder, and one parameter file has since moved. Every row in public/data/uprating_analysis.csv matches policyengine-us 1.413.0 (commit 971e191, 9 October 2025): the file exists and shows the uprating the row reports. The links now open that commit, which keeps all 317 resolving whatever the repository moves later. The intro names the release and takes its counts from the table. tests/fixtures/policyengine-us-files.txt lists every file under the parameters and variables folders at that commit, written from GitHub's tree API by scripts/snapshot-policyengine-us-files.mjs. Vitest checks every row's link against it offline, and a render test checks the links the viewer shows. No post ever had the slug autumn-budget-2024-policy-reform-impacts. "UK government" in Approach now cites the No 10 Downing Street post, and the UK example card shows the combined Autumn Budget 2025 analysis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The Approach card's "UK government" no longer links a post. Both posts that could back it, No 10 and the HM Treasury pilot, credit Nikhil Woodruff, and gov.uk's record says HMT does not currently use PolicyEngine. Decision d2686 asks Max what the claim should cite. The uprating viewer's intro now says it lists some of the parameters and variables that PolicyEngine-US 1.413.0 grows over time. At that release, 306 parameter files and 60 variable files set uprating, and the model gives 69 more input variables a default; the table lists 294 parameters and 23 variables. The snapshot script reads the pinned commit's version and date from GitHub and writes them into the snapshot file and the file list's header, and a test checks that the two agree. Vitest now runs in America/Los_Angeles, so the release-month test fails if the formatter drops its UTC time zone. The viewer test checks that each item a card shows carries one link, to its own row's file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Explore 294 parameters and 23 variables that PolicyEngine-US 1.413.0 grows over time" claims only what the table holds. It drops the "the" that said the table lists all of them, without an "of the" that points readers at the rest. "In line with" replaces the dangling "based on", and the link sentence says each file opens as it stood in that release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 10, 2026
Draft
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.
Fixes the broken links in the uprating viewer (
/research, Interactive Uprating Explorer), in Approach, and in one UK example card.Uprating viewer source links
The viewer built every "View source" link as
github.com/PolicyEngine/policyengine-us/blob/master/policyengine_us/parameters/<file_path>. Of the 317 links, 24 returned 404:policyengine_us/variables/, notparameters/;gov.irs.deductions.itemized.reduction.agi_threshold, which Consolidate itemized deduction limitation parameters policyengine-us#8046 folded intolimitation/applicable_amount.yaml(that file already has its own row).policyengine-us names
mainits default branch, and GitHub redirectsmasterlinks there.#3 added
public/data/uprating_analysis.csvin October 2025 without recording which policyengine-us release it describes. When #3 merged, policyengine-us'smainstood at release 1.413.0 (commit971e191, 9 October 2025, the 1.412.0 → 1.413.0 version bump). At that commit every file the table names exists, and 315 of its 317 rows match their file's uprating. The other two,social_security_dependentsandsocial_security_survivors, listgov.ssa.uprating. PolicyEngine/policyengine-us#4054 commented out that line in both files on 2 March 2024, and PolicyEngine/policyengine-us#8220 replaced it withcalibration.gov.irs.soi.social_securityon 4 May 2026. At 1.413.0 both sit on the input list intools/default_uprating.py, soadd_default_upratinggrows them withcalibration.gov.cbo.income_by_source.adjusted_gross_incomeinstead.Against
mainat61d9e85(9 November 2026), 65 rows don't match:*_reportedinputs, Use canonical SPM measurements and immutable population default policyengine-us#9428 movedspm_unit_spm_thresholdinto the spm-calculator package, and Consolidate itemized deduction limitation parameters policyengine-us#8046 moved the Pease threshold.So each link now opens its file at commit
971e191. All 317 resolve for good, and each file shows its uprating as it stood in that release.src/data/policyengineUsSnapshot.jsonholds the pin, andsrc/utils/policyengineUsSource.jsbuilds the URLs.The intro
The intro read "Explore the 294 parameters and 23 variables in PolicyEngine-US that grow over time", as if the table listed all of them. At 1.413.0, 306 parameter files carry an
upratingkey and 60 variable files setuprating, andadd_default_upratinggrows 71 more input variables with CBO's AGI projection. The table lists 294 parameters and 23 variables, two of them from that default group.The table leaves out
employment_income,self_employment_income,qualified_dividend_income,long_term_capital_gainsandtaxable_pension_income, among others. Each of those names an IRS SOI target (calibration.gov.irs.soi.*) as its uprating, and that target's own metadata names a CBO income-by-source series. The table also leaves out 12 rate schedules in California, Maine, Massachusetts and Rhode Island. PyYAML'ssafe_loadrejects those 12 and no other uprating file at 1.413.0: seven carry a year-0000 date, and five Maine files fail to scan.The intro now reads "Explore 294 parameters and 23 variables that PolicyEngine-US 1.413.0 (October 2025) grows over time in line with economic indicators. Each source link opens the file as it stood in that release." It takes the counts from the table, and the release and month from the snapshot file.
Research links
policyengine.org/uk/research/autumn-budget-2024-policy-reform-impactsreturns 404, and no post has ever had that slug. policyengine-app-v2 builds slugs from post filenames, and neither itsposts.jsonnor itsmainhistory contains that slug. The slug entered this repo in e41149d (2026-02-10), and #28 reused it for the UK example card.Every other link in both components returns 200. cbo.gov answers curl with 403 (bot protection), but its page loads in a browser.
The check
tests/fixtures/policyengine-us-files.txtlists all 6,352 files underpolicyengine_us/parametersandpolicyengine_us/variablesat the pinned commit.scripts/snapshot-policyengine-us-files.mjswrites it from GitHub's API, and its list matches whatgit ls-tree -r --name-only 971e191gives for both folders. The script also reads the commit's version (frompyproject.toml) and date, and writes both into the snapshot file and the list's header..gitattributesmarks the list generated, so GitHub folds it in diffs.src/utils/policyengineUsSource.test.jschecks offline that every CSV row's link opens a listed file. It also checks that:.yamlfiles underparameters/and variables to.pyfiles undervariables/;src/components/UpratingViewer.test.jsxrenders the viewer on the real CSV and opens every category. It requires each card to show one link for each item it lists (up to 50) and each link to open its own row's file. It also checks that a variable (household_weight) links to its Python file.vitest.config.mjsruns the suite in America/Los_Angeles. There, UTC midnight on the 1st falls in the prior month, so the release-month test fails if the formatter drops its UTC time zone. A precondition in that test fails if the suite stops running west of UTC.At least one test fails when:
parameters/;maininstead of the commit;TZ=UTCin the environment;TZ=UTC.All 317 pinned URLs return 200 from github.com. On a local static build, the viewer shows the new intro and 153 links across its 18 categories, one for each item a card shows. Each link pins
971e191and opens its own item's file.To move to a newer release:
commitinsrc/data/policyengineUsSnapshot.json.bun scripts/snapshot-policyengine-us-files.mjs. It fills inversionanddate.bun run test:run.Invariants
.yamlfiles underpolicyengine_us/parameters; variables link.pyfiles underpolicyengine_us/variables.Not in this PR
StochasticForecasting.jsxhard-codes "318 uprating parameters" and the category counts above the viewer, while the CSV holds 317 rows. Regenerating the table takes its own PR, with a committed script that reads each value's effective uprating, defaults included, and stops on any file it can't parse.Overlap with #50
#50 edits Approach.jsx and ExampleProjects.jsx in other hunks, so this PR rebases onto
mainafter #50 merges.f1edea9) merges cleanly with this branch. Eslint and all 77 tests pass on the merge, including Remove retired dataset names from the study site #50's retired-name sweeps of/researchand/?country=uk.PAGES_SHOWING_RETIRED_NAMESlist.Review
An independent Opus review of
585fc49requested changes, and the next two commits answer each finding:A second Opus review, at
3c54031, approved. This body carries the three text fixes it asked for: the Fellowship article, the count of default-uprated inputs (71, not 69), and a scoped follow-up for the table.axiom: n/a: study-site links and tests; no policy change.
🤖 Generated with Claude Code