Repository navigation
Type 17 more accounts the committee reports confirm, and the FDA's appropriation instead of its allowance - #879
Open
banjtheman wants to merge 3 commits into
Conversation
…says so Fifteen Labor-HHS accounts typed a figure their committee report does not state, twelve of them health agencies whose report figure is the top line plus money from elsewhere. Three phrases add to an account and say so: - a proviso that adds rather than qualifies: "Provided further, That in addition to amounts provided herein, $31,428,000 shall be available under section 241 of the PHS Act", or its "(1) $79,200,000 ...; (2) ..." form, the one exception to reading nothing after the first proviso; - "together with $X to be transferred from" a trust fund, and "together with $X from the amounts available under section 241"; - a later sentence that says it appropriates: "In addition to other funds appropriated for the Common Fund ..., $12,600,000 is appropriated". Committee reports: 658 -> 661 of 752 (87.9%); all accounts 1,061 -> 1,064; no agreement lost, wrong figures still the one gross-versus-net account, roll-ups unchanged. Every "In addition, for <purpose>, $X." sentence was tried too and lost nine agreements to wrong figures: reports leave out trust-fund reimbursements, next year's advance, fee-offset amounts and payments to a separate fund. Excluding those would add seven agreements, but the exclusions come from the same nine failures, so they wait for a fresh answer key; the README records it. The five CDC accounts' extra money is assigned by a general provision elsewhere in the bill, out of reach of a per-paragraph reading. Tests pin each phrase (each proved red without its rule), the trust-fund-reimbursement sentence staying out, and committee-report agreement at >= 661. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…openings miss
Of the 19 committee-report accounts where the resolver typed nothing
although the report's figure was in the text, 16 were paragraphs
classify_bill never types as appropriations: its APPROP rule reads only a
"For ..." opening and "there is appropriated". 14 state that they
appropriate in another form, and `appropriates` reads those four forms
beside classify_bill's typing:
- an appropriating verb on the figure ("$24,000,000 is hereby
appropriated", "$2,000,000 is provided");
- "is additional new budget authority";
- a purpose opening "To carry out / make / conduct ...";
- an opening that adds to other funds ("In addition to funds made
available from any other source ..., $423,000,000").
All 14 agree and no other account changes: committee reports 661 -> 675 of
752 (89.8%), all accounts 1,064 -> 1,078 (92.7%), wrong figures still the
one gross-versus-net account, no unconfirmed figure added. The roll-up now
sums the same paragraphs: 124 -> 130 of 156 agency totals reproduced.
classify_bill's rules are civictechdc#736's (copied into the package with a parity
check), so the forms live in the resolver and the README records them for
that classifier. The README's tables are now the current code's, with the
step sections marked as each step's effect when made. Tests pin each form
(each proved red without it) and paragraphs that only limit or direct
staying unread; the slow gates move to >= 675 committee-report agreements
and the new roll-up counts.
Against develop's precision study, which starts from every typed figure,
this and the Labor-HHS commit before it move structured from 900 to 915
confirmed and summed from 907 to 924. Structured's unconfirmed count rises
from 71 to 72 by one correct figure: the CDFI Fund's $354,000,000 is its
report summary block's committee recommendation, but the block sits under a
mixed-case heading that parse_summary_blocks does not read. The study's pins
and the README's precision table are re-measured here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The precision study found the structured and summed resolvers typing the FDA's Salaries and Expenses at "not to exceed $25,000", one purpose's enforcement allowance, where the paragraph appropriates $6,872,405,000. The rule that a ceiling straight after the purposes is the appropriation read the allowance, which closes one purpose with a semicolon, as that ceiling. A ceiling now states the appropriation only when no plain figure closes the purposes after it. No other typed figure in the thirteen bills changes. Re-measured against develop's precision study with the Labor-HHS and appropriates() commits: structured 916 confirmed, 71 unconfirmed, 662 recalled; summed 925, 62, 675. The README's precision section now names the two figures those commits add to the unconfirmed side, both traced: the CDFI Fund's $354,000,000 is its report summary block's figure, under a mixed-case heading parse_summary_blocks does not read, and CDC Public Health Scientific Services' section 241 money is a non-add memo in its report where SAMHSA's blocks count the same money in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
This branch has not been 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.
Related issue
Refs #147 (epic: financial semantics research: type each dollar amount before money returns to the report). This adds evidence, not a closing change.
Refs #115 (split each account's money into typed sub-amounts). It adds money an account gets from elsewhere when its paragraph says so.
Follows #845 (measure dollar typing against committee reports) and is measured with #860's precision study (what the report says about every typed figure).
What does this change?
The research resolver (
docs/research/financial-semantics/appropriation_resolver.py) now types 17 more committee-report accounts with the report's figure. It also stops typing the FDA's $25,000 enforcement allowance as its $6.87 billion appropriation. No account that agreed before disagrees now, and committee reports still contradict one typed figure: TSA's, which is gross versus net.Each change is measured in both directions.
committee_agreement.pystarts from the answer key's accounts.appropriation_precision.pystarts from every figure the resolver types. Three commits, each passing the research tests on its own:Labor-HHS money from elsewhere (db12a3b). Three phrases add to an account and say so:
Committee reports: 658 → 661.
Paragraphs that say they appropriate in forms
classify_bill's openings miss (7499447).appropriates()reads four forms besideclassify_bill's typing: an appropriating verb on the figure ("$24,000,000 is hereby appropriated"), "is additional new budget authority", a purpose opening ("To carry out ..."), and an opening that adds to other funds ("In addition to funds made available from any other source ..., $423,000,000"). 14 accounts agree, and no other changes. The roll-up reads the same paragraphs.The FDA's appropriation, not its allowance (1a9b8d9). The precision study found structured and summed typing the FDA's Salaries and Expenses at "not to exceed $25,000". The rule that a ceiling straight after the purposes is the appropriation took that allowance, which closes one purpose with a semicolon, as the ceiling. Now a ceiling is the appropriation only when no plain figure closes the purposes after it. No other typed figure in the thirteen bills changes.
Numbers, develop → this PR (each script run on both):
structured/summed, of 752)summedagree %summedagreestructured/summed)summedADR 0025 errors (wrong figure + figure not in text)structured(confirmed / unconfirmed)summed(confirmed / unconfirmed)summed(agree / 853 answer-key lines)summed(net, gross or explained)Two figures move to the unconfirmed side. I traced both, and neither is a resolver error:
parse_summary_blocksreads only ALL-CAPS headings, so the study sees the figure only as text. The same parser builds the answer keys, so the fix belongs with them. It is left out here.Tests: each phrase and form is pinned, and each pin was proved red without its rule. Paragraphs that only limit or direct stay unread.
test_a_ceiling_on_one_purpose_gives_way_to_the_figure_after_the_last_purposeis new. Intests/test_appropriation_precision.py, the FDA test now expects all three resolvers to type the appropriation (renamedtest_the_fda_appropriation_found_from_this_direction_stays_typed), and the pins move to the measured counts. The README's tables and its precision section are re-measured.Left out:
parse_summary_blocks, and with it the answer keys.With the answer-key fix: #878 (rebuild the committee-report answer keys) re-pins the same research tests on rebuilt keys. A trial merge of both branches has no conflicts in code, only in the README and the pinned tests. Measured on the merge,
summedagrees with 732 of 792 committee-report accounts (92.4%), with 2 wrong figures (TSA, and the Coast Guard line whose report contradicts itself), 926 confirmed and 61 unconfirmed typed figures. Whichever PR lands second re-measures.How to test
What I ran:
origin/develop(a clean worktree) and on this branch. The table above is from those runs._closing_figurerestored, 4 tests fail: the new unit test, the FDA test for structured and for summed, and the precision pins. With the fix, every typed figure in the thirteen bills was compared before and after. Only the FDA's changes.ruff checkandruff format --checkare clean. Fast and slow together (-m "not browser"): 4608 passed, 35 skipped (all allowlisted), 15 xfailed. Browser (--run-browser): 30 passed.Checklist
Refs #147,Refs #115; research, nothing to close)AI assistance
Written with Claude Code (Claude Opus 5.5). The rules, traces, mutation checks and measurements were run in a Claude Code session, and the commits carry a Co-Authored-By line.
🤖 Generated with Claude Code