Repository navigation
Build the 117th->119th CD crosswalk from the plan registry (fixes North Carolina) - #1043
Conversation
The packaged crosswalk read the 117th plan from the 2020 BAF CD layer, which carries the 116th plans. Census reports North Carolina as the only state whose districts changed between the 116th and 117th Congress, so North Carolina's SOI districts were mapped through its 2016 plan; the two plans put only 55% of the state's population in the same district. The builder now overlays the pinned registry's 117th_congress and 119th_congress plans (registry population weights). Only North Carolina's rows change (1,444 -> 1,449 rows); every other state is identical. NC's 117th source-district populations now match the General Assembly's official 2020 figures within 0.09%; the old rows missed by up to 7.6%. Repins the crosswalk (sha256 a347303f..., 78,202 bytes) in sources.yaml, build_us_multispine_pool.py and tests, and corrects the docs that called the 116th and 117th plans identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y NPZ Review nits on #1043: - Add an unconditional test on the packaged CSV: no pair crosses a state line, per-state totals equal the build receipt's state_conservation (all 51, nothing unmatched), the national total equals the registry's 331,449,281, and five states match their 2020 Census counts. - Correct the NC regression comment: main's old crosswalk misses 10 of 13 districts beyond 0.5% (worst 7.55%, district 1), not 7 of 13. Recomputed against the test's own NCGA reference; the new crosswalk's worst is 0.09%. The exact per-pair rebuild test also passes locally against the pinned registry NPZ (sha256 6b16fc21...). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Retargeted to main after #1041 merged (8d18463). Independent review (subfleet 20260928-101703-pr1043-review): APPROVE, no blocker or should-fix. It independently parsed the CSV (1,449 rows, 436 source and target districts, 331,449,281 people; only NC changes) and checked NC's 2019 plan against the IRS and NCGA sources. Its two nits are addressed in dbf3d90: an unconditional national and per-state conservation test on the packaged CSV, and a corrected regression comment (10 of 13 districts beyond 0.5%, verified). The skipped exact-rebuild test passes locally against the pinned registry NPZ (6b16fc21...). This will merge after #1046 so Route A's relaunch keeps its pinned crosswalk. 🤖 Generated with Claude Code |
engine-us CI failed test_us_coverage_is_exact_complete_and_honest because the crosswalk's new sha256 and byte size in us/spec/sources.yaml (the only spec change in this PR) move three attested identities: - EXPECTED_HASHES["full_checkpoint"] b7a336af... -> 3db095ce... - EXPECTED_HASHES["geography_assignment"] f49425ca... -> 44e7f5f6... - the US spec_sha256 pinned in test_us_multispine_pool_tool.py 1cf1f44d... -> ffbb93ed... The new values were computed from build_inventory_coverage on this tree (only these two inventory items failed). docs/evidence/spec-engine/ us-f0-coverage.json was regenerated with tools/spec_engine_coverage.py; its --check passes with 41/41 inventory checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge audit:
The exact per-pair rebuild test also passed locally against the pinned registry NPZ (6b16fc21…). Route A's in-flight release is pinned to 4b57d15 and keeps the previous crosswalk; this fix reaches the next build. 🤖 Generated with Claude Code |
Stacked on #1041 (the CD plan registry). It needs #1041 merged first; GitHub retargets it to
mainwhen that branch is deleted.The bug
The packaged 117th→119th congressional-district crosswalk (
us_runtime/data/congressional_district_vintage_crosswalk.csv) read the 117th plan from the 2020 Block Assignment Files'CDlayer. That layer carries the 116th plans. The docs said the 116th and 117th plans are identical, which is false for North Carolina.The fix
tools/build_us_congressional_district_vintage_crosswalk.pynow builds from the pinned registry (load_pinned_us_cd_plan_registry). It overlays the registry's117th_congressand119th_congressplans on the same 2020 blocks, weighted by the registry's block populations, using the unchangedbuild_cd_vintage_crosswalk_rows.a347303f…(78,202 bytes). It is re-pinned inus/spec/sources.yaml,tools/build_us_multispine_pool.py,test_support/…/us_multispine_pool_tool.pyand two tests. The provenance now records the registry SHA-256 and its 117th known deviations instead of the raw Census file list; the registry's receipt carries every underlying source.CONGRESSIONAL_DISTRICT_VINTAGE_CROSSWALK.mdnow describe the registry-based method and drop the "identical plans" claim.Invariants and tests
The crosswalk keeps its existing guarantees: weights sum to 1 per source district, state and national totals are conserved exactly, and 436 districts appear on each side. The packaged-crosswalk validator enforces them and still passes. New tests:
MICROCOSM_US_CD_PLAN_REGISTRY): rebuilding from the real registry reproduces the packaged CSV's pair populations exactly. It passed locally.Locally, 1,674 tests pass (10 skipped) across every engine-free test file that references the crosswalk or the US spec sources.
Effect
This changes the NC district inputs of future builds that translate SOI 117th CD facts. It publishes nothing and does not touch any release in flight, since those run from pinned worktrees. The design report of 2026-09-27 also found that the flagship release currently drops all district-level targets.
axiom: n/a: geography data infrastructure, no policy rules
🤖 Generated with Claude Code