Repository navigation
Make Build O's state SOI contract the ACS local default; totals and full are opt-in - #984
Merged
Merged
Conversation
tools/build_us_acs_local_release.py defaulted --soi-mode (and state_admin_specs's soi_mode) to "full" on origin/main. Per the 2026-09-22 ruling on #969's question 3, the default is now "totals" and "full" (every soi_fiscal_distribution spec) is reachable only with an explicit --soi-mode full. - One definition of the modes and the default (SOI_MODES, DEFAULT_SOI_MODE); soi_surface_predicate holds the SOI filter, and an unknown mode is refused before the feed is read (the old predicate treated any value other than "full" as totals). - Package reads the mode materialize recorded, refuses a checkpoint that records none, writes it to build_manifest.json materialize.soi_mode, and names --soi-mode in the release refresh recipe so re-running the recipe reproduces the recorded surface. - docs/us-acs-local-soi-target-surface.md records the measured surfaces on the pinned feed, including that totals keeps only ACA premium tax credit SOI specs and that soi_fiscal_distribution is mostly all-income-range state and congressional-district totals, not AGI bands. The national release does not use this switch and is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fault The two sides appended tests to the same module; both are kept. main's package fixtures now record soi_mode in materialize_rss.json, as every real materialize does, and the soi-mode package test is rebuilt on main's hours-gate evidence helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ull opt in Max's ruling of 2026-09-22 (after the measurements showed totals carries no state AGI, income-tax or EITC total and full does not fit one machine): new --soi-mode state, the default, keeps every state-bearing irs_soi spec at state geography whose Ledger record set is not a congressional-district file. On the pinned feed that is exactly Build P's 3,972 admin specs (102 SNAP, 51 Medicaid, 3,819 SOI from the three TY2022 Historic Table 2 state tables; 4,459 with population), the contract Build O selected as full while congressional-district targets were switched off, before b7922b0 removed that switch. A spec missing either metadata key is not selected. totals and full stay as explicit opt-ins. Tests: the state predicate by record set and geography, the default, the recipe and package records for all three modes, and the feed-gated surface contract (45 pass with the pinned feed; with the default flipped back and the geography check disabled, 5 fail). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
September 23, 2026 03:03
MaxGhenis
added a commit
that referenced
this pull request
Sep 23, 2026
No textual conflicts. build_us_fiscal_refresh_release.py (restated age-band ledger filters, #986) and test_us_spine_blindness.py (spm_universe_source.py, #977) auto-merged alongside this branch's spm_independence_role stage and module registrations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 23, 2026
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.
What this does
Makes
statethe default SOI target surface of the US ACS local-area chain (tools/build_us_acs_local_release.py --soi-mode);totalsandfullbecome explicit opt-ins.statekeeps every state-bearingirs_soispec atledger_geography_level == "state"whoseledger_layout_record_set_spec_idis not a congressional-district file, of anytarget_role(soi_surface_predicate). A spec missing either key is not selected. On the pinned feed (consumer_facts_us_c5e5bf8.jsonl, sha256b8543739…) it selects exactly Build P's 3,972 admin specs — 102 SNAP, 51 Medicaid and 3,819 SOI from the three TY2022 Historic Table 2 state tables (state broad totals 2,397; AGI-band taxable interest 912; EITC by qualifying children 510) — or 4,459 targets with the 487 population marginals. That is the contract every earlier ACS local-area release was calibrated to: Build O selected it asfullwhilestate_admin_specscompiled withinclude_congressional_district_targets=False(populace77e2061), and Build O's 4,461 is this set plus the Vermont under-$1 taxable-interest pair the compiler now excludes. Commitb7922b089(2026-08-21) removed that switch, so no mode reproduced the contract until this one.Why (Max's ruling, 2026-09-22)
The first version of this PR made
totalsthe default on a description that turned out wrong. Measured on the pinned feed:totalskeeps 607 SOI specs, all ACA premium tax credit rows, and no state AGI, income-tax or EITC total;full(31,066 admin specs) adds mostly all-income-range rows — 23,886 congressional-district and 5,508 state rows, the latter duplicating the Historic Table 2 state concepts from the TY2023 district file — and only 912 AGI-band rows, and its 183.9 GiB dense matrix does not fit one 128 GB machine.stateis the only surface that keeps the state income targets and fits (23.5 GiB dense; Build P recorded a 93.9 GB materialize peak on it), and it lets a new local build be scored against the published Build O on the same targets. Max chose it on 2026-09-22. Full measurements:docs/us-acs-local-soi-target-surface.md.stateneeds #969's restated-filter support, now merged: on this branch after merging main, the materializer's_assert_supported_ledger_filter_metadataaccepts all 3,972statespecs (without #969 it refused 1,014).Also in this PR (from the first version)
SOI_MODES,DEFAULT_SOI_MODE); an unknown mode is refused before the feed is read (the old predicate silently treated any value other thanfullas totals).--stage packagereads the modematerializerecorded (materialize_rss.json), not the package invocation's flag, and refuses a checkpoint that records no known mode before any release directory exists.build_manifest.json(materialize.soi_mode) and the release refresh recipe names--soi-mode <mode>.tools/build_us_fiscal_refresh_release.pyhas no SOI mode and does not callstate_admin_specs.Tests
packages/microcosm-build/tests/test_us_acs_local_release_tool.py: 45 pass withMICROCOSM_US_CHRONICLE_FACTSset to the pinned feed, includingtest_pinned_feed_soi_surfaces_match_their_contracts(the 3,972-specstatecontract by family and record set, all at state geography;totalsholds nosoi_fiscal_distributionspec;fulladds exactly those tototalsand containsstate) andtest_state_soi_surface_is_build_o_contract_by_record_set_and_geography. Negative control: with the default flipped back tototalsand the geography check disabled, 5 tests fail.ruff check .clean;tools/ci_test_groups.py --verifyok. The feed-gated test skips in CI (no lane carries the 164 MB feed).Operating note
A full-scale run on
stateneeds the supervisor RSS cap above Build P's 93.9 GB peak and room for a 23.5 GiB memmap. To reproduce the 2026-09-22 hours rebuild (#974), pass--soi-mode totals.🤖 Generated with Claude Code