Repository navigation
Conversation
The policy-rules card said "Over 55 federal, state, and local programs";
the coverage registry lists 103. The card now reads the registry at
runtime through fetchProgramsWithSource('us') and cites the same total
and complete counts the coverage tracker shows, with a link to it. It
shows no number while loading or when only the bundled fallback list is
available.
Walkthrough step 3 said earnings shift by the elasticity of taxable
income. policyengine-us 2.2.1 (the version policyengine.py pins) has no
ETI: it scales earnings by a substitution elasticity on the change in
marginal tax rate and an income elasticity on the change in household
net income, and every elasticity defaults to zero. The step now says so.
UK copy is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
WIP. Draft until the browser check and the independent review finish.
Fixes two claims on the US overview (
/us/model). UK copy is not touched, because #51 owns it.1. Policy-rules card: the program count
Before: "Tax codes, benefit formulas, and eligibility rules encoded as executable logic. Over 55 federal, state, and local programs."
After (US): "Tax codes, benefit formulas, and eligibility rules encoded as executable logic. The [coverage tracker] lists 103 federal, state, and local programs, 88 of them marked complete."
fetchProgramsWithSource('us'). They are not hardcoded.summarizeRegistry(inprogramStatus.ts) uses the tracker's owncomputeStatusCount, so the card always matches the tracker's "Total programs" and "Complete" cards./us/model) and the query string (?embed=true&country=us).Registry facts checked on 2026-10-14:
policyengine-usmain @2e15904, 2.42.10) lists 103 programs: 88 complete, 12 partial and 3 in progress in raw registry status.programs.yamlat the 2.2.1 release commit (f88982f), which is the version policyengine.py pins and the production API serves, has the same 103 ids with the same statuses. So the count holds for the deployed model too.2. Walkthrough step 3: the behavioral mechanism
Before: "People change their behavior in response to tax changes. Using elasticity of taxable income, we estimate how earnings shift."
After (US): "People may work more or less when taxes and benefits change. Earnings stay fixed by default; once labor supply elasticities are set, workers' earnings respond to changes in their marginal tax rates and in their households' net income."
What policyengine-us 2.2.1 does. policyengine.py
src/policyengine/data/bundle/manifest.jsonpinspolicyengine-us==2.2.1, whose release commit isf88982f25e. Every point below was read at that commit:gov.simulation.labor_supply_responses.*andgov.simulation.capital_gains_responses.elasticity.0:elasticities/income.yaml;elasticities/substitution.yaml(all, everyby_position_and_decile.primarydecile, andsecondary); andcapital_gains_responses/elasticity.yaml.labor_supply_behavioral_responsereturns 0 when there is no reform, or when the income elasticity and every substitution elasticity are 0.behavioral_response_measurements.py): response = earnings before LSR × (income elasticity × relative change inhousehold_net_income+ substitution elasticity × relative change in (1 −marginal_tax_rate)).bounds/*.earnings_before_lsr). The response is split back across them by pre-response share (*_behavioral_response.py). People with zero earnings have zero response, so there is no participation margin.marginal_tax_rate.py): the share of an extra $1,000 of earnings (simulation.marginal_tax_rate_delta) that household net income does not keep. It is computed for the two adults with the highest market income in each household (adult_earnings_index,simulation.marginal_tax_rate_adults: 2); everyone else's stays 0. That is why the copy says "workers'" and not "each worker's".The card stays short and makes only the claims above. "Workers' earnings" covers employment and self-employment. The repo's comparison data already describes PE-US as static by default (
data/comparisons/behavioral_parameters.yaml).Invariants (property-tested with fast-check)
For any program list and any source:
summarizeRegistryreturns null for the fallback source and for an empty registry.total == programs.lengthandcomplete == computeStatusCount(programs).complete.total, so each program is counted once.0 ≤ complete ≤the number of programs the registry itself marks complete. The card never claims more complete programs than the registry does.Differential test: the card and the coverage tracker are rendered from the same pinned registry snapshot. The card's two numbers equal the tracker's "Total programs" and "Complete" cards.
Tests
src/test/overviewClaims.test.tsxcovers:/us/modelwith the query string kept;bun run test: 13 files, 146 tests pass.bun run lint: clean.tsc --noEmit: clean.bun run build: passes.Merge note
ThreeIngredients.tsx(the policy-rules description) andmicrosimSteps.ts(the step 3 ternary). Whichever lands second resolves the conflict by keeping Fix the UK model pages: pipeline, calibration, validation, behavioural responses, and rules #51's UK strings and this PR's US branch.axiom: n/a: explainer-site copy (no policy encoding)
🤖 Generated with Claude Code