Skip to content

Restore the US unmarried-partner flag from Census PERRP (#38) - #1844

Open
MaxGhenis wants to merge 12 commits into
mainfrom
us-38-unmarried-partner-perrp
Open

MaxGhenis wants to merge 12 commits into
mainfrom
us-38-unmarried-partner-perrp

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Refs #38.

The US build now sets is_unmarried_partner_of_household_head from Census PERRP. Until now it sat in the eCPS parity known-gap register as a reviewed source-unavailability exclusion. The pinned Census person members carry PERRP for every pooled year, so the gap no longer holds. Max ruled to build it on 2026-12-01 (d1099).

What this changes

  • Restore. ASEC_CENSUS_PERSON_COLUMNS gains PERRP (domain 40-59). The Pooled ASEC 2022/2023 vintages lack the NOW_* coverage recodes: reported Medicaid at interview thins to 24.6M vs ~58M survey under 65 on the certified artifact #720 restore appends it to every pooled vintage by exact PERIDNUM join from that vintage's pinned Census member. No pinned H5 carries PERRP, the 2025 file included.
  • Reader. relationship_inputs sets the flag where PERRP is 43, 44, 46 or 47. Those are opposite-sex and same-sex unmarried partners of the reference person, with and without relatives. This is the retired derivation (archived commit 42ed5d45c56df80d754fbe24cce21cfeb8d05cbe, datasets/cps/cps.py lines 1214-1221; codes at lines 188-195). The stage refuses a frame in four cases:
    • PERRP is missing. The archive read a missing column as all-False; this stage never reads absence as "no partner".
    • A code falls outside 40-59.
    • Reference-person codes 40/41 and the P_SEQ == 1 row disagree, either way.
    • A frame household has more than one partner.
  • Gate & completeness. The relationship_inputs reuse check (_relationship_surface_carries_signal) requires all four output columns to be complete strict Booleans with >1 distinct value. The signal gate (us_relationship_inputs_signal_gate and gates.json, base and national) enforces the weighted partner-share band (1-5%), fails closed on null or non-Boolean output columns (including nullable Int64 and non-Boolean category dtypes) before computing shares or household counts, and fails heads marked as partners or households with multiple partners. On assembled multispine frames, us_relationship_inputs_signal_gate allows head_count == 0 strictly for source-verified ACS group-quarters households (RELSHIPP in {37, 38} sole person, person_support_channel == "acs" via support_gate_source_channel_series on assembled support metadata, plus A_EXPRRP == 14, TYPEHUGQ in {2, 3}, and null PERIDNUM checked when those columns are present) while requiring zero partners on them and rejecting unverified zero-head households.
  • ACS rows & pre-clone boundary. ACS rows in the national multispine pool map PUMS RELSHIPP 22 and 24 (opposite-sex and same-sex unmarried partner) to the flag natively at assembly, just as RELSHIPP 20 maps to is_household_head. Because ASEC rows receive is_unmarried_partner_of_household_head during pre-clone enrichment (prepare_multispine_source_inputs_for_clone), the flag belongs to multispine_pool._POOL_PRE_CLONE_NATIVE_COMPLETE_OUTPUTS (available_by="pre_clone_enriched", provision="pre_clone_source_and_acs_native_engine_input") alongside _ACS_NATIVE_INPUT_CONTRACTS and remains excluded from QRF transfer targets.
  • ACS local lane. The local lane loads its donor base without rerunning relationship_inputs, and existing pre-Populate remaining US tax-input and reported-observation layers #38 donor bases omit the flag. build_optional_acs_multispine keeps the ACS spine's flag only when the base carries a complete strict Boolean column (failing closed on nulls or non-Boolean dtypes including nullable Int64 and category), and otherwise withholds the input across both spines while recording withheld_native_inputs in us_source_coverage.json and packaged reviewed_limitations (noting spm_unit_head_spouse_earned_cap uses False when the input is withheld).
  • Coverage. The known-gap entry is gone. The release coverage manifest makes the flag required (171 required, 5 reviewed exclusions). RESTORED_REFERENCE_ECPS_REQUIRED_INPUTS and the export's required person columns pick it up through US_RELATIONSHIP_INPUTS_OUTPUT_COLUMNS.
  • Not changed. Populate remaining US tax-input and reported-observation layers #38's other two leaves, financial_assistance and survivor_benefits, keep their exclusions. PECOHAB, A_FAMREL and A_FAMTYP stay unrestored: the flag reads PERRP alone.

Evidence

Codebook. The Census API codebooks for survey years 2023-2026 give the same 20 codes, 40-59. The four files below are byte-identical (sha256 prefix 2607bf8e03173a29), fetched 2026-12-02 01:32Z.

code label
40 / 41 Reference Person with / without Relatives
42 / 45 Opposite Sex / Same Sex Spouse
43 / 44 Opposite Sex Unmarried Partner with / without Relatives
46 / 47 Same Sex Unmarried Partner with / without Relatives
48-53 Child, Grandchild, Parent, Brother/Sister, Other relative, Foster Child
54-59 Housemate/Roommate, Roomer/Boarder, Other Nonrelative (each with / without Relatives)

The ACS 2024 PUMS data dictionary (PUMS_Data_Dictionary_2024.csv, fetched 2026-12-02 01:32Z) gives RELSHIPP 22 "Opposite-sex unmarried partner" and 24 "Same-sex unmarried partner". It gives 21 and 23 as spouses and 34 as a roommate or housemate.

Pinned members. Each archive and member matched its pin in education_assistance_source.py. Shares are weighted by MARSUPWT.

income year member persons PERRP nulls partners 43 / 44 / 46 / 47 partner rows weighted share 40/41 rows (= P_SEQ == 1) households with 2+ partners
2022 pppub23.csv 146,133 0 1,058 / 2,628 / 19 / 184 3,889 2.80% 56,839 0
2023 pppub24.csv 144,265 0 1,096 / 2,597 / 11 / 189 3,893 2.86% 56,251 0
2024 pppub25.csv 142,125 0 1,095 / 2,464 / 13 / 179 3,751 2.75% 55,762 0
2025 pppub26.csv 134,729 0 906 / 2,307 / 12 / 136 3,361 2.64% 53,344 0

The 40/41 counts equal the Build J head counts the old scenario test pinned for 2022-2024.

A_EXPRRP is no substitute. In all four members its code 13 holds PERRP 44, 47 and 55, so partners mix with housemates. Its code 12 holds PERRP 43, 46, 54, 56 and 58.

Engine. policyengine-us 2.145.3 defines the flag as a yearly person boolean input. Its one consumer is spm_unit_head_spouse_earned_cap. The scenario test now checks that the flag binds there: with no spouse, a reference person earning $40,000 and a partner earning $2,500 give a cap of $2,500 with the flag and $40,000 without it.

What a release needs

  • Route A builds carry the flag. Route A builds a fresh base for each build commit from the pinned H5s and the asecpub24/25/26 archives (tools/build_us_puf_support_base.py --stage all --asec-education-source ...), so the restore runs on every build. A Route A build at a commit that includes this PR carries the flag.
  • The 11/27 certified release lacks it. Its base was built at commit 12693b9db03d and has no PERRP. This is inferred from the driver at that commit and the release id; the run's own records were not read.
  • Raw stage, --base-h5, resumed pool checkpoints, and ACS local simulations have distinct behaviour on pre-Populate remaining US tax-input and reported-observation layers #38 artifacts:
    • Raw stage (asec_checkpoint.py) fails closed at load. ASEC_RAW_STAGE_SCHEMA_VERSION bumps from 3 to 4 and _RAW_STAGE_REQUIRED_PERSON_COLUMNS gains PERRP (complete integers in 40..59), so the schema-v4 raw loader rejects sources.yaml's pre-Populate remaining US tax-input and reported-observation layers #38 asec_raw_stage pin (51e9fafc…, _CANONICAL_INPUT_PIN_BUILD_ID = "populace-us-2024-pool-inc2-run7" in tools/us_bundle_generation/core.py) before enrichment. build_us_multispine_pool accepts a local schema-v4 raw checkpoint and SHA via --asec-raw-stage-h5 / --asec-raw-stage-sha256; updating the canonical sources.yaml pin requires rebuilding a replacement schema-v4 checkpoint and recording its build receipt (any external release of a record-level checkpoint remains subject to Max's data-rule decision and is not done here).
    • --base-h5 bases built pre-Populate remaining US tax-input and reported-observation layers #38 fail closed. The PUF support-base builder reruns relationship_inputs and fails; the national release (including its default _download_base_h5() releases.json published national build until rebuilt) fails either in relationship_inputs (generic base) or in us_relationship_inputs_signal_gate (stacked-pool base).
    • Resumed multispine pool checkpoints recompute stale stages. build_us_multispine_pool._checkpoint_missing_person_outputs ignores pre-Populate remaining US tax-input and reported-observation layers #38 assembled, transferred, and simulated checkpoints carrying is_household_head without is_unmarried_partner_of_household_head and recomputes those stages from scratch (keeping pre-operator assembled checkpoints valid).
    • ACS local simulations withhold the missing input at False. On pre-Populate remaining US tax-input and reported-observation layers #38 donor bases without is_unmarried_partner_of_household_head, ACS local staging records withheld_native_inputs in us_source_coverage.json and reviewed_limitations, so ACS local simulations use False for the missing is_unmarried_partner_of_household_head input when calculating spm_unit_head_spouse_earned_cap (a fresh base built from pinned sources carries the flag).
  • Gates require the flag. Once this merges, export (US_RELEASE_REQUIRED_PERSON_SOURCE_COLUMNS), release coverage and parity all require the flag.

Pins moved

  • tools/repin_us_pool_engine_contracts.py:
    • POOL_PROJECTION_INPUT_PROVISION_COUNTS: assembled_native_engine_input 7, pre_clone_source_and_acs_native_engine_input 1, declared_absent_engine_input 1164.
    • POOL_REMAINING_STAGE_INPUT_MANIFEST_SHA256: c80b538926234c292f8c995383c82fa164cabd830fb57f1da90b6c2421f64f1a.
    • The US engine ABI lock (engine_abi.lock.json).
  • tools/repin_us_spec_engine_contracts.py --legacy-only -> tools/generate_us_bundle_from_constants.py -> tools/repin_us_spec_engine_contracts.py -> tools/spec_engine_coverage.py:
    • Frozen source_stages.json SHA-256: 5c022fb43bb6215af418ecdef4a6971ead2e8f202acbfa9b0b5d6bb1401d8173 (test_us_bundle_core_contracts.py).
    • US bundle spec_sha256: bde2a8b1ec35c25c043323a48d91f558d81b7a6fc2ac718dc0f7435c7415d94a.
    • Field-usage & F0 coverage (docs/evidence/spec-engine/us-f0-coverage.json): 51018/51018 configuration fields, 41/41 inventory checks; inventory_coverage.py pins (full_checkpoint ab1abc39…, late_resource_semantics 14fefbef…, source_manifest be558114…).
  • tools/build_us_release_input_coverage_manifest.py: release_input_coverage_manifest.json (171 required, 5 reviewed exclusions).
  • tools/graph_us_post_transfer_fixture.py: H3 post-transfer fixture.
  • test_support / hand-pinned constants verified against tools:
    • us_base and us_national gate-scope digests in packages/microcosm-build/tests/engine_free/us/test_us_battery_bindings.py (SCOPE_PINS).
    • test_spec_engine_engine_abi.py remaining-stage manifest digest (c80b5389…).
    • test_us_multispine_pool.py provision Counter (7 assembled-native, 1 pre-clone-native, 1164 declared-absent) and pre-clone manifest check.

Tests & local checks

  • test_us_relationship_inputs (engine_free + engine_scenario): partner/non-partner PERRP codes, missing/invalid PERRP, P_SEQ == 1 disagreement, multi-partner households, support clones, completeness refusal on None, int, nullable Int64 (pd.NA), and non-Boolean category ([False, "invalid", pd.NA]) columns before share coercion, source-verified ACS group-quarters zero-head allowance (requiring assembled person_support_channel == "acs" with RELSHIPP in {37, 38}, plus optional checks on A_EXPRRP == 14, TYPEHUGQ in {2, 3}, and null PERIDNUM when present) vs zero-partner enforcement, and engine spm_unit_head_spouse_earned_cap binding.
  • test_us_asec_checkpoint: raw-stage schema v4 PERRP missing/domain checks.
  • test_us_acs_inputs, test_us_acs_multispine, test_us_acs_multispine_legacy_builder, & test_us_acs_local_release_tool: RELSHIPP 22/24 native mapping, pre-Populate remaining US tax-input and reported-observation layers #38 donor withholding & staging/packaging disclosure in us_source_coverage.json and reviewed_limitations, and strict Boolean refusal (None, int, nullable Int64, category) on donor columns.
  • test_us_multispine_pool & test_us_multispine_pool_tool: pre-clone boundary (pre_clone_enriched), stale pre-Populate remaining US tax-input and reported-observation layers #38 checkpoint invalidation, and preserved pre-operator assembled resume.
  • test_us_puf_support_base_builder: _raw_asec_frame carries PERRP = [40, 43, 41] aligned with P_SEQ across dual-export and repair reloads.
  • test_us_spine_blindness: pins _GATE_SOURCE_CHANNEL_CALLERS["relationship_inputs.py"] == frozenset({"_verified_acs_group_quarters_households"}) and _GATE_SOURCE_SCOPE_HELPER_CALLERS[("relationship_inputs.py", "_verified_acs_group_quarters_households")] == frozenset({"us_relationship_inputs_summary"}) with no direct person_spine read.
  • Verified locally after merging origin/main through e124f968 (#1865, #1849, #1860; heads a4969921ba / 8784917275): ruff check ., ci_test_plan.py verify, git diff --check, tools/repin_us_pool_engine_contracts.py --check, tools/repin_us_spec_engine_contracts.py --check, tools/generate_us_bundle_from_constants.py --check, tools/spec_engine_coverage.py --check (51018/51018 fields, 41/41 checks at a4969921ba), and targeted pytest across test_us_bundle_core_contracts.py, test_spec_engine_coverage_tool.py, test_us_multispine_pool_tool.py, test_spec_engine_field_usage.py, test_us_relationship_inputs.py (engine_free + engine_scenario), test_us_acs_multispine.py, test_us_spine_blindness.py, test_us_puf_support_base_builder.py, test_us_battery_bindings.py, test_us_acs_local_release_tool.py, test_us_fiscal_refresh_builder.py, and test_us_base_subsample.py (3 skipped in the #1849/#1860 subsample/refresh suites).

Review history

  • Round 1b (9f66a60757, review-r1b REQUEST_CHANGES): 2 P1 + 4 P2 + 1 P3 fixed in 8f212f1a9c alongside clean merge with origin/main (134477a281).
  • Round 2 (8f212f1a9c, 20261203-090130-pr1844-review-r2 REQUEST_CHANGES): 1 P1 + 1 P2 + 2 P3 + engine-free CI spine-blindness failure fixed in e8f2f1ac82.
  • Scoped Round 3 (e8f2f1ac82, 20261203-093456-pr1844-review-r3): verdict line REQUEST_CHANGES, levels 0 P0, 0 P1, 1 P2, 2 P3; Round-2 P1, P2, both P3s, and the engine-free CI fix verified CLOSED (per review policy, levels decide and scoped closure completes review without opening a fourth round).
    • Non-blocking P2 fixed at follow-up head: replaced pandas .map(...).all() with Python any(not isinstance(value, (bool, np.bool_)) ...) in relationship_inputs._has_non_boolean_values and acs_multispine.py so category columns with non-Boolean entries and pd.NA fail closed via GateResult / ValueError instead of raising TypeError, with categorical regression tests added to test_us_relationship_inputs.py and test_us_acs_multispine.py.
    • P3s fixed here: attributed weighted share bands and household checks specifically to us_relationship_inputs_signal_gate, qualified optional GQ columns as checked when present, credited test_us_acs_local_release_tool.py and named both test_us_spine_blindness.py caller-allowlist entries, and separated local schema-v4 checkpoint CLI override from canonical pin receipt updates.

🤖 Generated with Claude Code

MaxGhenis and others added 9 commits December 1, 2026 20:37
relationship_inputs now sets is_unmarried_partner_of_household_head where
PERRP is 43, 44, 46 or 47, the retired derivation (archived cps.py lines
1214-1221). The #720 Census person-column restore appends PERRP to every
pooled vintage from its pinned member; no pinned H5 carries it. The stage
refuses a missing or out-of-domain PERRP, reference-person codes 40/41 off
the P_SEQ == 1 row, and two partners in one household, and its gate keeps
the weighted partner share in 1-5%. ACS multispine rows map PUMS RELSHIPP
22/24 natively, so the flag is not a QRF transfer target.

The flag leaves the eCPS parity known-gap register and becomes a required
release input. Pool, engine ABI, spec bundle and F0 pins are re-derived by
their repo tools; the coverage manifest is regenerated.

Refs #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The relationship gate's new unmarried-partner share band moves the
us_base and us_national gates-manifest, policy and spec-fingerprint
digests in test_us_battery_bindings.py; us_pool and us_local are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The partner flag's native ACS provision moves the pool's remaining-stage
input manifest digest (3bd50a8d... to a3a76a5f...). The engine ABI lock
test pins it, and the charter-H3 post-transfer parity fixture carries it
as a graph parameter; the fixture is regenerated with
tools/graph_us_post_transfer_fixture.py, and its expected cells do not
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Repin the projection-provision Counter in test_us_multispine_pool.py
  (assembled-native 7 -> 8, declared-absent 1165 -> 1164). The module
  constant moved in the first commit; this test skips in CI without the
  policyengine-us extra, so CI could not see the stale literal.
- ACS local lane: build_optional_acs_multispine withholds the ACS RELSHIPP
  partner flag when the base lacks the column, as it already does for the
  SPM role. A base built before #38 then leaves the flag off both spines,
  as before, instead of half null rows that the reviewed-fill gate refuses
  only after every fit. The provenance records it under
  withheld_native_inputs; tests cover both arms.
- Export US_UNMARRIED_PARTNER_FLAG from relationship_inputs.
- Narrow the relationship_inputs docstring: the P_SEQ check catches a
  mis-join only where it moves a 40 or 41; the restore's identity checks
  guard the rest.
- Changelog and docs: the reference-person refusal runs both ways; older
  --base-h5 bases are refused where the stage runs (PUF support-base
  builder, national release); the local lane withholds instead.
- Add the partner flag to the pool dtype fixture's ACS arm, name partner
  inputs in the release telemetry label, and correct the A_EXPRRP test
  comment.

Every repo pin tool reports current after these edits.

Refs #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build_optional_acs_multispine checked the mapped frame's person columns
to decide whether to withhold the ACS partner flag. Three existing tests
stub the mapped frame with a bare object, so the check raised
AttributeError. Check the native-mapping receipt instead: the flag is
there exactly when map_acs_native_inputs produced it, and the frame is
touched only when it must be dropped.

Refs #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- _without_person_column now uses Frame.replace_tables, so withholding
  the flag no longer deep-copies the full ACS spine twice.
- COVERAGE_PROGRESS: the partner-flag row said every pre-#38 frame is
  refused; it now names where (raw stage, PUF support-base builder,
  national release) and the local lane's withholding.
- Changelog and docs: the national release refuses an older base either
  way (the stage on a generic base, the relationship gate on a stacked
  pool), and that includes its default base, the published national
  build.

Refs #38

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- P1 #1 (tools/build_us_multispine_pool.py): invalidate pre-#38 assembled/transferred/simulated checkpoints carrying is_household_head without is_unmarried_partner_of_household_head while keeping pre-operator assembled checkpoints valid; add regression test in test_us_multispine_pool_tool.py.
- P1 #2 (asec_checkpoint.py): bump ASEC_RAW_STAGE_SCHEMA_VERSION to 4, require PERRP in _RAW_STAGE_REQUIRED_PERSON_COLUMNS, and validate complete integers in 40..59; update test_us_asec_checkpoint.py.
- P2 #3 (relationship_inputs.py, acs_multispine.py): reject nulls and non-Boolean values in _relationship_surface_carries_signal, us_relationship_inputs_summary, and us_relationship_inputs_signal_gate; fail closed on incomplete or non-Boolean donor is_unmarried_partner_of_household_head before ACS pooling/transfer; add regression tests in test_us_relationship_inputs.py and test_us_acs_multispine.py.
- P2 #4 (multispine_pool.py): move is_unmarried_partner_of_household_head to _POOL_PRE_CLONE_NATIVE_COMPLETE_OUTPUTS (available_by='pre_clone_enriched', provision='pre_clone_source_and_acs_native_engine_input'), keeping it excluded from QRF transfer targets and accurately reflecting prepare_multispine_source_inputs_for_clone; regenerate engine_abi.lock.json, H3 fixture, US bundle, release input coverage manifest, and spec-engine coverage pins via repo tools, and update pool/ABI contract tests.
- P2 #5 (tools/_legacy/build_us_acs_multispine_base.py, tools/build_us_acs_local_release.py, changelog.d/38-us-unmarried-partner-perrp.added.md): disclose withheld_native_inputs in staging/package reviewed_limitations (naming spm_unit_head_spouse_earned_cap and engine default False across both spines) and in us_source_coverage.json; qualify changelog base/national refusals vs ACS local withholding; add regression tests.
- P2 #6 (relationship_inputs.py): allow head_count == 0 only on source-verified ACS group-quarters households (RELSHIPP in {37, 38} sole person, A_EXPRRP == 14, TYPEHUGQ in {2, 3}, person_spine == 'acs_2024_1yr', null PERIDNUM where present) while requiring partner_count == 0 on them and rejecting unverified zero-head units; add regression tests.
- P3 #7 (docs/us-asec-census-person-columns.md): separate member observation counts from the production PERIDNUM join.
- Verified repin_us_pool_engine_contracts.py --check, repin_us_spec_engine_contracts.py --check, generate_us_bundle_from_constants.py --check, spec_engine_coverage.py --check (51018/51018, 41/41), ci_test_plan.py verify, ruff check ., and targeted US build/graph tests.
- Route verified ACS group-quarters channel checks through
  support_gate_source_channel_series instead of reading person_spine directly
  and pin relationship_inputs._verified_acs_group_quarters_households in
  test_us_spine_blindness.py.
- Add PERRP [40, 43, 41] aligned with P_SEQ to _raw_asec_frame in
  test_us_puf_support_base_builder.py and assert survival on raw reloads.
- Validate completeness and Boolean types before aggregating shares or household
  counts in relationship_inputs.py so nullable Int64 / non-Boolean outputs fail
  closed via GateResult rather than raising TypeError, with a regression test.
- Separate schema-v4 raw refusal, stale multispine pool recomputation, and ACS
  local False fallback across changelog and docs.
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Agent comment: Addressed round-2 review (20261203-090130-pr1844-review-r2, REQUEST_CHANGES at 8f212f1a9c) and the engine-free CI failure at new head e8f2f1ac82f82b55d460b93f7ad92795e0d1e47d:

  • P1 (test_us_puf_support_base_builder.py): Added PERRP = [40, 43, 41] aligned with P_SEQ to _raw_asec_frame() and asserted PERRP survival on dual-export and repair reloads under schema v4.
  • P2 (relationship_inputs.py & test_us_relationship_inputs.py): Validated completeness and strict Boolean values (_has_non_boolean_values) before share/household aggregation in us_relationship_inputs_summary so nullable Int64 (pd.NA) and non-Boolean columns return failed GateResult with validation details rather than raising TypeError; added a nullable-Int64 regression case.
  • P3 (changelog.d, docs/us-asec-census-person-columns.md, PR body): Explicitly separated (1) schema-v4 raw-loader rejection of the stale asec_raw_stage pin, (2) build_us_multispine_pool recomputation when resuming pre-Populate remaining US tax-input and reported-observation layers #38 assembled/transferred/simulated checkpoints with is_household_head and no is_unmarried_partner_of_household_head, and (3) ACS local False fallback for the missing input on spm_unit_head_spouse_earned_cap when staged from a pre-Populate remaining US tax-input and reported-observation layers #38 donor base; folded round-1b and round-2 updates into the main PR body.
  • CI fix (test_us_spine_blindness.py / relationship_inputs.py): Routed _verified_acs_group_quarters_households through support_gate_source_channel_series (requiring has_assembled_support_metadata and person_support_channel == "acs", pinned in _GATE_SOURCE_CHANNEL_CALLERS and _GATE_SOURCE_SCOPE_HELPER_CALLERS) instead of reading person_spine, and updated the GQ test fixture and non-ACS channel failure assertion.

Verified locally on e8f2f1ac82: ruff check --no-cache ., ci_test_plan.py verify, git diff --check, repin_us_pool_engine_contracts.py --check, repin_us_spec_engine_contracts.py --check, generate_us_bundle_from_constants.py --check (spec_sha256=82c92a78...), spec_engine_coverage.py --check (51018/51018 fields; 41/41 checks), and targeted pytest across 11 modified/contract test files all passed. Dispatching scoped round-3 review against e8f2f1ac82.

- Iterate non-null values in Python in relationship_inputs._has_non_boolean_values
  and acs_multispine.build_optional_acs_multispine so Categorical columns with
  non-Boolean entries and pd.NA fail closed via GateResult / ValueError rather
  than raising TypeError from .map().all().
- Add categorical regression cases to test_us_relationship_inputs.py and
  test_us_acs_multispine.py.
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Agent comment: Scoped round-3 review (20261203-093456-pr1844-review-r3, Sol/Codex read-only) at e8f2f1ac82f82b55d460b93f7ad92795e0d1e47d confirmed all Round-2 P1/P2/P3 findings and the engine-free spine-blindness CI fix CLOSED (0 P0, 0 P1, 1 P2, 2 P3). Per review policy, the verdict line (REQUEST_CHANGES) and levels (0 P0 / 0 P1) disagree—the levels decide and scoped P0/P1 closure completes independent review with no fourth round required.

Fixed the remaining non-blocking findings at b6cac3a9a760580af76399ae5133ccaa6caad131:

  • P2 (relationship_inputs.py, acs_multispine.py): Replaced pandas .map(...).all() with Python iteration over non-null elements so non-Boolean category columns with pd.NA return a failed GateResult / ValueError rather than raising TypeError; added categorical regression cases to test_us_relationship_inputs.py and test_us_acs_multispine.py.
  • P3 (PR body): Attributed weighted share bands and household checks specifically to us_relationship_inputs_signal_gate, qualified optional GQ provenance checks as applied when columns are present, credited test_us_acs_local_release_tool.py and both test_us_spine_blindness.py caller-allowlist keys, and separated local schema-v4 checkpoint CLI overrides from canonical sources.yaml pin receipt updates.

Verified locally on b6cac3a9a760580af76399ae5133ccaa6caad131: ruff check --no-cache ., ci_test_plan.py verify, git diff --check, and targeted pytest across test_us_relationship_inputs.py (engine_free + engine_scenario), test_us_acs_multispine.py, test_us_spine_blindness.py, and test_us_puf_support_base_builder.py exited 0. Watching fresh CI on b6cac3a9a760580af76399ae5133ccaa6caad131 (keeping draft until CI finishes and noting 7-file generated pin overlap with ready PR #1865).

@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merged origin/main through e124f968 (#1865, #1849, #1860) in a4969921ba and 8784917275, and updated the PR body.

  • Regenerated shared US pins cleanly on top of #1865 (scfp2025s):
    • Frozen source_stages.json SHA-256: 5c022fb43bb6215af418ecdef4a6971ead2e8f202acbfa9b0b5d6bb1401d8173
    • US bundle spec_sha256: bde2a8b1ec35c25c043323a48d91f558d81b7a6fc2ac718dc0f7435c7415d94a
    • inventory_coverage.py / us-f0-coverage.json (51018/51018 fields, 41/41 checks): full_checkpoint ab1abc39…, late_resource_semantics 14fefbef…, source_manifest be558114…
    • release_input_coverage_manifest.json: 171 required, 5 reviewed exclusions
  • Local verification: tools/repin_us_pool_engine_contracts.py --check, tools/repin_us_spec_engine_contracts.py --check, tools/generate_us_bundle_from_constants.py --check, tools/ci_test_plan.py verify, uv run ruff check ., and targeted pytests across the #1844 + #1860 files passed at 8784917275 (3 skipped in the subsample/refresh suites; tools/spec_engine_coverage.py --check passed 51018/51018 / 41/41 at a4969921ba prior to the disjoint #1849/#1860 merge).

Keeping draft while GitHub Actions CI runs on 8784917275; once green, I will verify mergeability and land #1844.

@MaxGhenis
MaxGhenis marked this pull request as ready for review December 3, 2026 20:44
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Ready — merge held by repository ruleset 28681967 (No merges into main until 2026-12-04 09:00 Eastern)

  • Merge parent check: origin/main e124f968 (main CI 47160374061 completed/success) + head 8784917275 -> git merge-tree tree b03a4852b79fe7af70f6935bc519160ec4ae8f75 (0 conflicts; 0 UK files).
  • CI: run 47171228425 at 8784917275b7b7c20a261b1c44811b899a34c584 completed success — 12 pass (ci, wheels, lint, select-countries, installed-emitter, integration-uk, engine-free 3.13/3.14, engine-uk 3.13/3.14, engine-us 3.13/3.14), 1 skipped by workflow design (engine-uk-after-merge).
  • Independent review: finished across 3 rounds (review-r1b; Subfleet r2 20261203-090130-pr1844-review-r2; scoped Subfleet r3 20261203-093456-pr1844-review-r3 verified 0 P0 / 0 P1 closure at e8f2f1ac82, non-blocking categorical P2 + P3s fixed in b6cac3a9a7 issuecomment-7382011636; main merges + regenerated US pins verified locally and across full CI at 8784917275 issuecomment-7387791643).
  • Status: Marked ready (isDraft: false, mergeable: MERGEABLE); mergeStateStatus: BLOCKED solely due to active ruleset 28681967 (No merges into main until 2026-12-04 09:00 Eastern). Worktree and d1099 remain open until #1844 lands cleanly after the freeze lifts (bin/landing_impact.py 1844 currently notes #1085, #1356, #1719, #1791, #1831).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant