Repository navigation
Conversation
…te output policybench unlisted-input-sweep recomputes a frozen run's references on its reference system (a fix module) with each registered engine estimate of an unlisted input replaced by the prompt's literal reading or a documented alternative, and reports every output that moves by more than $1 or flips a flag, marked scored or already excluded. policybench/output_scope.py removes Maryland county and New York City income tax from the engine's state aggregate; the sweep composes it and checks it changes no published reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l locality readings The full sweep found New York City's refundable credits and San Francisco's Working Families Tax Credit inside the engine's state refundable credits, the same scope problem as NYC tax in the state income tax output. The adapter now removes them too and the sweep checks each is zero for every household. County readings that switch on a locality flag (NYC, San Francisco and the engine's other in_* variables) make an unlisted fact true, which the prompt's rule makes false; their moves are reported as prompt_rules_out and do not fail --strict. An independent check of every mechanism claim against the engine source corrected the SALT, Part B, local sales tax and weekly-hours descriptions, and the pre-TCJA mortgage shortcut now tests the deductible share, which keeps it exact for negative interest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
policyengine-us applied the composed reform more than once; the later pass saw the lists the adapter had already scoped and overwrote the record with an empty list, so the sweep's scope check had nothing to check. The slow real-engine test caught it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- A county that switches on a locality flag is simulated again with the flags held at their reference values; only outputs whose move that undoes are prompt_rules_out. NY SNAP's utility allowance region reads the county itself, so its moves stay scored (review B1; slow real-engine test on scenario_118). - Medicare enrollment gets a not_enrolled alternative reading. - The CI guard covers each state's nonrefundable list; the local-name heuristic ignores state_and_local. - Record the last simulated amount for an unconverged fixed point; match record text as whole identifiers; allow an estimate wildcard in acknowledgements. - Fail when a reference row of a swept household is not recomputed, and refuse scenario years the output-scope adapter does not cover. - County variants keep only their outputs, not their simulations. - reference_audit/unlisted_input_acknowledged.json lists the scored moves that await d963 and d974, with a test that flags stale entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Session hand-off at head 4485065 (not ready to merge yet). Done
Still owed before merge
|
MaxGhenis
added a commit
that referenced
this pull request
Oct 6, 2026
…ds (#165) Reuse the mergeable sweep without activating its CLI or changing v1. Replay all 1,984 recorded baselines and 70 perturbations over 100 fixtures. The 16 report tests pass; explicit unknowns override named conventions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Tooling only: this PR changes no reference, exclusion, snapshot or published number.
What it adds
policybench unlisted-input-sweep(policybench/unlisted_input_sweep.py). Given a reference system (a fix module, e.g.reference_audit/2026-09-28/fixes/latest_final.py) and a frozen run'sscenarios.csv, references and exclusions, it:scored,acknowledged,prompt_rules_out,excluded_same_inputorexcluded_other_reason.It builds the system once per worker process (spawn
ProcessPoolExecutor), runs the longest households first, and skips a reading without simulating when it sets every input to the value the engine already computes. Exit 1 means the sweep can't be trusted (baseline mismatch, a local entry nonzero, an unconverged fixed point). Exit 2 means--strictfound a scored move with no exclusion or--acknowledgedentry.Registry (
ESTIMATES). Each entry gives the engine behavior, why no prompt lists the input, where it was found, and its readings:state_withheld_income_taxlocal_sales_tax(20% of the state table amount)medicare_part_b_premium(takes_up_medicare_if_eligible=True)county(first county of the state: Allegany for MD)weekly_hours_worked_before_lsr(r14)months_receiving_social_security_disabilitymeets_ssi_disability_criteriaAlso one reading that applies every literal reading at once.
policybench/output_scope.py: the adapter that keeps local taxes and credits out of the state outputs. It removes:nyc_income_tax_before_refundable_credits(and Maryland county tax) from the state income tax list;nyc_refundable_creditsfrom state refundable credits;ca_sf_wftcfrom California's refundable list.The sweep composes the adapter and checks every entry it removes is zero for every household. A CI test reads the installed engine's YAML lists and fails if an upgrade adds a local entry the adapter does not name.
docs/runbook.md§2b, Reference-Build Gates: newest release, reviewed moves, the sweep (--strict), output scope.Results on the frozen run (policyengine-us 2.15.17,
latest_final+ adapter)100 households, 1,984 outputs, 9,165 simulations, 23 minutes on 12 workers.
Gates
Scored outputs that move (4). These are exactly the open proposals:
prompt_rules_out(5). NY households 004, 071, 082, 104 and 118 owe NYC tax (or get NYC credits) in the five NYC counties. That moveslocal_income_tax. Living in NYC is an unlisted household fact, which the prompt's rule makes false, so these moves are reported but not gated.Already excluded (14): 10 for the same input, 4 for another reason. The four other-reason outputs are new dependencies a release should note on their records:
Verification
Differential against the 2026-10-05 audit's independent scripts (Audit the state income tax withheld in federal SALT; propose three exclusions #191's
sweep_salt_withholding.csvandvariants.json):Mechanism audit. One Claude Code workflow agent per claim group checked every claim in the registry against the engine source. It corrected five descriptions:
md_withheld_income_tax's county estimate;It also found that the pre-TCJA shortcut was not exact for negative mortgage interest; it now tests the deductible share.
Bug caught by the slow real-engine test. policyengine-us applies a reform more than once, which emptied the record of what the adapter removed, so the scope check checked nothing. Fixed in 38b7d87 (with a test that applies the composed reform twice).
Tests
Invariants (property-tested with Hypothesis)
scoredexactly when the output has no exclusion record.0.0andFalsemerged silently; fixed.For the next release (not done here)
excluded_other_reasonrecords above.Run outputs:
results/local/unlisted_input_sweep_20261005/on the build machine (report, moves, values, summary, differential).🤖 Generated with Claude Code