From 35a742900de83a2459e79b9ef611928e7fb8b616 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 7 Oct 2026 11:59:20 -0400 Subject: [PATCH 1/5] Count U.S. savings bonds in the SCF half of bond_assets The scf_wealth stage mapped the SSI countable-resource leaf bond_assets to SCF summary-extract `bond` alone. The Fed's extract macro defines BOND as "total bonds, not including bond funds or savings bonds" (bulletin.macro.txt line 1497); savings bonds are the separate SAVBND = X3902. The archived pipeline at 42ed5d45 kept savbnd as scf_savings_bonds, a construction-only net-worth component that microcosm does not build, so an SCF-drawn household's savings bonds reached no SSI leaf. PolicyEngine-US 2.2.1 documents bond_assets as "Value of bonds and government securities. Imputed from SIPP TVAL_BOND." and cites POMS SI 01140.240 (U.S. Savings Bonds), as does its SSI countable-resource list. SIPP 2023 TVAL_BOND, the other half of the 50/50 blend, sums government securities and municipal/corporate bonds, and the 2023 SIPP data dictionary defines government securities as "such as savings bonds, T-Bills, T-Bonds, T-Notes" (EOWN_GOVS). The SCF side now reads bond + savbnd. - SCF_FINANCIAL_ASSET_TARGET_COMPONENTS["bond_assets"] = ("bond", "savbnd"). - The loader's required columns now derive from the components map, so a missing savbnd raises the documented ValueError rather than a KeyError. - Target construction moves into _scf_financial_asset_targets so its invariants can be property-tested in memory. - Docstrings no longer claim exact parity with 42ed5d45 and say why. - Tests: the raw fixture gains savbnd (drawn last, so other columns keep their values); the loader test checks bond + savbnd row for row; a parametrized test requires every component column; a static test checks that the leaves partition disjoint FIN constituents; Hypothesis tests check the sum rule, that savings bonds add exactly to bond_assets and nothing else, and that sentinels count as zero. - Re-pin the seed-kernel attestation that any byte edit to scf_wealth.py moves: EXPECTED_HASHES seed_protocol and seed_map, the loader golden, the US spec_sha256, and docs/evidence/spec-engine/us-f0-coverage.json. Co-Authored-By: Claude Opus 5.5 --- changelog.d/scf-savings-bonds.fixed.md | 1 + docs/evidence/spec-engine/us-f0-coverage.json | 16 +- .../build/spec_engine/inventory_coverage.py | 4 +- .../microcosm/build/us_runtime/scf_wealth.py | 86 +++++++--- .../shared/test_spec_engine_loader.py | 2 +- .../engine_free/us/test_us_scf_wealth.py | 156 +++++++++++++++++- .../us/test_us_multispine_pool_tool.py | 2 +- test_support/microcosm_build/us_scf_wealth.py | 4 + 8 files changed, 229 insertions(+), 42 deletions(-) create mode 100644 changelog.d/scf-savings-bonds.fixed.md diff --git a/changelog.d/scf-savings-bonds.fixed.md b/changelog.d/scf-savings-bonds.fixed.md new file mode 100644 index 0000000000..c8050c34a8 --- /dev/null +++ b/changelog.d/scf-savings-bonds.fixed.md @@ -0,0 +1 @@ +Count U.S. savings bonds in the SCF half of `bond_assets`. The `scf_wealth` stage now maps `bond_assets` to SCF `bond` + `savbnd` instead of `bond` alone. PolicyEngine-US cites POMS SI 01140.240 (U.S. Savings Bonds) for `bond_assets` and its SSI countable-resource list, and SIPP 2023 `TVAL_BOND`, the other half of the 50/50 blend, already includes savings bonds through government securities. On the pinned SCF 2022 extract, households with a nonzero SCF bond target rise from 1.11% to 7.36% by weight, and the weighted total rises from $1,398B to $1,699B. This departs from archived commit `42ed5d45`, which kept `savbnd` as a separate net-worth component that microcosm does not build. The seed-kernel attestation is re-pinned, as for any byte edit to `scf_wealth.py`. Released data changes only through a rebuild and release. diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index f99b29cdf6..f812f6f533 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1656,13 +1656,13 @@ "compiler_ir.node_slices" ], "expected": { - "map_sha256": "0fa116d9f5dae4ba0378f190d6c822b92f3dcf1e3fe80c9880bcaf87431c283c", - "protocol_sha256": "b4afa376b62fbc073fd10d74e40921f5ab60c1efe366e2c8504872091ea69d08" + "map_sha256": "8f9ac34362f605eecdae50886cc7c5b1d5713b0b9cb63cd348bb3e77ebc00092", + "protocol_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae" }, "failures": [], "observed": { - "map_sha256": "0fa116d9f5dae4ba0378f190d6c822b92f3dcf1e3fe80c9880bcaf87431c283c", - "protocol_sha256": "b4afa376b62fbc073fd10d74e40921f5ab60c1efe366e2c8504872091ea69d08" + "map_sha256": "8f9ac34362f605eecdae50886cc7c5b1d5713b0b9cb63cd348bb3e77ebc00092", + "protocol_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae" }, "status": "covered" }, @@ -1677,7 +1677,7 @@ "compiler_ir.seed_stream_map" ], "expected": { - "implementation_sha256": "b4afa376b62fbc073fd10d74e40921f5ab60c1efe366e2c8504872091ea69d08", + "implementation_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1698,7 +1698,7 @@ }, "failures": [], "observed": { - "implementation_sha256": "b4afa376b62fbc073fd10d74e40921f5ab60c1efe366e2c8504872091ea69d08", + "implementation_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae", "protocol": "legacy-v1", "streams": [ "build_model", @@ -2599,7 +2599,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "d1df6b316e4937e809f5f020ea2d3a7bd38bccc1845f3ae6e104f7eed6a73323" + "spec_sha256": "f2ef1eee2217b106918fb1b07a92eb8c2a743f9e63f72e74849e03d6c8880b60" } }, "report_schema_version": 3, @@ -2609,7 +2609,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "d1df6b316e4937e809f5f020ea2d3a7bd38bccc1845f3ae6e104f7eed6a73323" + "spec_sha256": "f2ef1eee2217b106918fb1b07a92eb8c2a743f9e63f72e74849e03d6c8880b60" }, "status": "pass" } diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index 3fddff951a..83e4aaaef8 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -359,8 +359,8 @@ "late_schedule": "e59c019d3d454eac99ac0ac209b6c5b6faaf9bdfcaeee18c36a25be19bf7da2f", "ownership": "5f64f0aac49e2313177564f71876bffc8c81b3ded4df701e70930e60e9c98356", "primary_tuples": "fdf23da429f8c501e198a2f5b719763d523a41565c2153fdf17b0344f21bcd7c", - "seed_map": "0fa116d9f5dae4ba0378f190d6c822b92f3dcf1e3fe80c9880bcaf87431c283c", - "seed_protocol": "b4afa376b62fbc073fd10d74e40921f5ab60c1efe366e2c8504872091ea69d08", + "seed_map": "8f9ac34362f605eecdae50886cc7c5b1d5713b0b9cb63cd348bb3e77ebc00092", + "seed_protocol": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae", "source_manifest": "f4f8bfeb79268a4043a843b47cec1d1c0e58e9f5dd6bc23417ada95446dd7b8e", "take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35", "tail": "ac92829c88a1a4fb6460d61190918d5d99c6c377fc8dd8f62f02b332d09bf59c", diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py index e77540daae..c9c5193e8a 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py @@ -19,18 +19,40 @@ restores the realistic low liquid-asset mass absent from the SCF-only stage. The SCF side uses the public summary extract (``rscfp2022.dta``) and the -regime-gated weighted QRF (``microcosm.fit.QRF``). Its targets exactly match -archived commit ``42ed5d45`` (``utils/asset_imputation.py``): +regime-gated weighted QRF (``microcosm.fit.QRF``). Its targets match archived +commit ``42ed5d45`` (``utils/asset_imputation.py``) except ``bond_assets``, +which also reads U.S. savings bonds: - ``bank_account_assets`` ← SCF ``liq`` (checking, savings, money-market, call accounts). - ``stock_assets`` ← SCF ``stocks`` + ``nmmf`` (directly-held stock plus - stock/non-money-market mutual funds — the one code-level summation the - canonical pipeline applies). -- ``bond_assets`` ← SCF ``bond`` (directly held tax-exempt, mortgage-backed, - U.S. government and agency, and corporate and foreign bonds). Bond funds - are in ``nmmf``, so they land in ``stock_assets``; U.S. savings bonds are - the SCF's separate ``savbnd``, which this stage does not read. + stock/non-money-market mutual funds). +- ``bond_assets`` ← SCF ``bond`` + ``savbnd``. ``bond`` is directly held + tax-exempt, mortgage-backed, U.S. government and agency, and corporate and + foreign bonds; the Fed's extract macro excludes bond funds and savings bonds + from it. ``savbnd`` is U.S. savings bonds (``X3902``). Bond funds are in + ``nmmf``, so they land in ``stock_assets``. + +The archive read ``bond`` alone and kept ``savbnd`` as ``scf_savings_bonds``, +a construction-only component of its net-worth reconciliation. Microcosm +builds none of those components (see ``net_worth`` below), so under the +archive mapping an SCF-drawn household's savings bonds reached no SSI leaf. +PolicyEngine-US documents ``bond_assets`` as "Value of bonds and government +securities. Imputed from SIPP TVAL_BOND." and cites POMS SI 01140.240 (U.S. +Savings Bonds) and SI 01140.250 (Municipal, Corporate and Government Bonds). +SIPP 2023 ``TVAL_BOND`` sums the government-securities and municipal/corporate +bond values, and the 2023 SIPP data dictionary defines government securities +as "such as savings bonds, T-Bills, T-Bonds, T-Notes" (``EOWN_GOVS``). Reading +``bond`` + ``savbnd`` gives the SCF half the same concept as the SIPP half and +the variable's cited sources. If the archive's net-worth components are ever +built, ``scf_savings_bonds`` must leave that partition, because +``bond_assets`` now carries ``savbnd``. + +Two measurement limits remain. SCF ``X3902`` asks the face value of savings +bonds, while SIPP asks market value. And neither survey identifies savings +bonds still in their mandatory retention period (12 months for Series EE and +I bonds issued on or after 2/1/2003), which POMS SI 01140.240 says are not +resources. Both affect amounts, not which leaf savings bonds belong to. The SCF QRF's eight predictors are age, sex, race, marriage, own children, employment income, interest/dividend income, and Social Security/pension @@ -201,12 +223,14 @@ US_SCF_NET_WORTH_OUTPUT_COLUMNS ) -#: Each output column and the SCF summary-extract components it sums -#: (retired pipeline @ 42ed5d45, ``utils/asset_imputation.py``). +#: Each output column and the SCF summary-extract components it sums. These +#: are the retired pipeline's mappings (42ed5d45, ``utils/asset_imputation.py``) +#: except ``bond_assets``, which adds U.S. savings bonds (``savbnd``) as the +#: module docstring explains. No component feeds more than one leaf. SCF_FINANCIAL_ASSET_TARGET_COMPONENTS: dict[str, tuple[str, ...]] = { "bank_account_assets": ("liq",), "stock_assets": ("stocks", "nmmf"), - "bond_assets": ("bond",), + "bond_assets": ("bond", "savbnd"), } SCF_NET_WORTH_TARGET_COMPONENTS: dict[str, tuple[str, ...]] = { "net_worth": ("networth",), @@ -560,6 +584,20 @@ def fetch_scf_2022_summary_extract( return target +def _scf_financial_asset_targets(raw: pd.DataFrame) -> pd.DataFrame: + """Sum each SSI leaf's SCF components, sentinel-cleaned, floored at zero.""" + + targets = pd.DataFrame(index=raw.index) + for output, components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.items(): + total = np.zeros(len(raw), dtype=np.float64) + for component in components: + total = total + _replace_sentinels(raw[component]).to_numpy( + dtype=np.float64 + ) + targets[output] = np.maximum(total, 0.0) + return targets + + def load_scf_2022_financial_asset_donor(path: str | Path) -> pd.DataFrame: """Read the SCF 2022 summary extract into a financial-asset donor table. @@ -579,10 +617,11 @@ def load_scf_2022_financial_asset_donor(path: str | Path) -> pd.DataFrame: raw = pd.read_stata(path, convert_categoricals=False) required = { - "liq", - "stocks", - "nmmf", - "bond", + *( + component + for components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.values() + for component in components + ), "networth", *_SCF_SUMMARY_PREDICTOR_SOURCE_COLUMNS, } @@ -592,15 +631,7 @@ def load_scf_2022_financial_asset_donor(path: str | Path) -> pd.DataFrame: f"SCF 2022 summary extract missing required column(s): {missing}." ) - donor = pd.DataFrame(index=raw.index) - # Targets: component sums, sentinel-cleaned, floored at zero. - for output, components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.items(): - total = np.zeros(len(raw), dtype=np.float64) - for component in components: - total = total + _replace_sentinels(raw[component]).to_numpy( - dtype=np.float64 - ) - donor[output] = np.maximum(total, 0.0) + donor = _scf_financial_asset_targets(raw) # SCF networth is already the complete signed balance-sheet aggregate. # Preserve negative values: they are indebted-household source signal, not # missing-value sentinels. @@ -1014,9 +1045,10 @@ def _financial_assets_carry_signal(person: pd.DataFrame) -> bool: Nonfinite values mark a corrupted surface and force re-imputation. The engine-default check is JOINT across the three leaves: a surface where every leaf is constant (the all-zero engine default) must be re-imputed, - but a single legitimately constant leaf must not force a redraw — bond - holdings are ~97% zero in the donor, so a small or chunked frame can - draw a constant bond column from a perfectly healthy imputation. A + but a single legitimately constant leaf must not force a redraw — about + 93% of SCF donor households by survey weight hold neither bonds nor + savings bonds, so a small or chunked frame can draw a constant bond + column from a perfectly healthy imputation. A per-leaf nonconstancy test made pass-through platform-dependent (the #510 CI failure) and would silently redraw small production chunks; flattened cross-leaf uniqueness would accept three DISTINCT constant diff --git a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py index 718f4ff565..dfe83e0d86 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py @@ -12,7 +12,7 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non # Pin the domain separator, normalization rules, schema-set receipt, and # exact normative projection as one reviewable golden vector. assert first.spec_sha256 == ( - "6273f82f0e4899e97d1bede4db0662829b3df6f420dba32c0e67018d010c2c91" + "fb4ceaec7ec832bca992b865dba3fa79aa129b08bd74f719329864c33c278254" ) second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b") diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py b/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py index 114793c6d8..c20bc24841 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py @@ -1,6 +1,9 @@ """Tests split from packages/microcosm-build/tests/test_us_scf_wealth.py.""" # ruff: noqa: F403, F405 +from hypothesis import given, settings +from hypothesis import strategies as st + from test_support.microcosm_build.us_scf_wealth import * @@ -26,7 +29,42 @@ def test_output_columns_are_the_ssi_countable_resource_leaves() -> None: def test_stock_target_sums_stocks_and_nmmf() -> None: assert SCF_FINANCIAL_ASSET_TARGET_COMPONENTS["stock_assets"] == ("stocks", "nmmf") assert SCF_FINANCIAL_ASSET_TARGET_COMPONENTS["bank_account_assets"] == ("liq",) - assert SCF_FINANCIAL_ASSET_TARGET_COMPONENTS["bond_assets"] == ("bond",) + assert SCF_FINANCIAL_ASSET_TARGET_COMPONENTS["bond_assets"] == ("bond", "savbnd") + + +#: The Fed's total financial assets, ``FIN``, is the sum of these ten disjoint +#: summary-extract constituents (bulletin.macro.txt line 2177: +#: ``FIN=LIQ+CDS+NMMF+STOCKS+BOND+RETQLIQ+SAVBND+CASHLI+OTHMA+OTHFIN``). +_SCF_FIN_CONSTITUENTS = frozenset( + { + "liq", + "cds", + "nmmf", + "stocks", + "bond", + "retqliq", + "savbnd", + "cashli", + "othma", + "othfin", + } +) + + +def test_ssi_leaves_partition_scf_financial_assets_without_double_counting() -> None: + components = [ + component + for leaf_components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.values() + for component in leaf_components + ] + # No SCF component feeds two SSI leaves, so the leaves cannot double count. + assert len(components) == len(set(components)) + # Every component is one of FIN's disjoint constituents, so the three leaves + # together never exceed the household's total financial assets. + assert set(components) <= _SCF_FIN_CONSTITUENTS + # U.S. savings bonds (POMS SI 01140.240) reach an SSI leaf, as SIPP's + # TVAL_BOND does on the other half of the blend. + assert "savbnd" in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS["bond_assets"] def test_net_worth_target_is_the_direct_signed_scf_anchor() -> None: @@ -70,6 +108,14 @@ def test_load_donor_derives_targets_predictors_and_weight(tmp_path) -> None: np.testing.assert_allclose( np.sort(donor["stock_assets"].to_numpy()), np.sort(expected_stock), rtol=1e-6 ) + # bond_assets is the bond + savbnd sum, row for row (every fixture weight is + # positive, so the loader keeps row order). + assert (raw["savbnd"] > 0).any() + np.testing.assert_allclose( + donor["bond_assets"].to_numpy(), + raw["bond"].to_numpy() + raw["savbnd"].to_numpy(), + rtol=1e-6, + ) # All weights positive; targets non-negative. assert (donor[_DONOR_WEIGHT_COLUMN] > 0).all() for column in US_SCF_FINANCIAL_ASSET_OUTPUT_COLUMNS: @@ -88,6 +134,109 @@ def test_load_donor_missing_column_raises(tmp_path) -> None: load_scf_2022_financial_asset_donor(path) +@pytest.mark.parametrize( + "column", + sorted( + { + component + for components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.values() + for component in components + } + | {"networth"} + ), +) +def test_load_donor_requires_every_target_component(tmp_path, column) -> None: + raw = _raw_scf_summary().drop(columns=[column]) + path = tmp_path / "rscfp2022.dta" + raw.to_stata(path, write_index=False) + with pytest.raises(ValueError, match=f"missing required column.*{column}"): + load_scf_2022_financial_asset_donor(path) + + +_COMPONENT_COLUMNS = tuple( + sorted( + { + component + for components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.values() + for component in components + } + ) +) +#: A raw SCF amount: a missing-data sentinel or a nonnegative dollar value. +_scf_amount = st.one_of( + st.sampled_from([float(code) for code in _SCF_SENTINELS]), + st.floats(min_value=0.0, max_value=1e10, allow_nan=False), +) + + +@st.composite +def _raw_component_tables(draw) -> pd.DataFrame: + rows = draw(st.integers(min_value=1, max_value=12)) + return pd.DataFrame( + { + column: draw(st.lists(_scf_amount, min_size=rows, max_size=rows)) + for column in _COMPONENT_COLUMNS + } + ) + + +def _cleaned(values: pd.Series) -> np.ndarray: + array = values.to_numpy(dtype=np.float64) + return np.where(np.isin(array, _SCF_SENTINELS), 0.0, array) + + +@settings(max_examples=200, deadline=None) +@given(raw=_raw_component_tables()) +def test_scf_targets_sum_cleaned_components(raw) -> None: + # Differential check against a direct restatement of the rule: each leaf is + # the sum of its sentinel-cleaned components, floored at zero. + targets = _scf_financial_asset_targets(raw) + assert list(targets.columns) == list(US_SCF_FINANCIAL_ASSET_OUTPUT_COLUMNS) + for leaf, components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.items(): + expected = np.maximum( + sum(_cleaned(raw[component]) for component in components), 0.0 + ) + np.testing.assert_allclose(targets[leaf].to_numpy(), expected, rtol=1e-12) + assert np.isfinite(targets[leaf].to_numpy()).all() + assert (targets[leaf].to_numpy() >= 0.0).all() + + +@settings(max_examples=200, deadline=None) +@given(raw=_raw_component_tables()) +def test_savings_bonds_add_to_bond_assets_and_nothing_else(raw) -> None: + targets = _scf_financial_asset_targets(raw) + without_savings_bonds = _scf_financial_asset_targets(raw.assign(savbnd=0.0)) + # Savings bonds raise bond_assets by exactly their cleaned value, so the + # leaf never falls below the archive's bond-only target ... + np.testing.assert_allclose( + targets["bond_assets"].to_numpy(), + without_savings_bonds["bond_assets"].to_numpy() + _cleaned(raw["savbnd"]), + rtol=1e-12, + ) + assert ( + targets["bond_assets"].to_numpy() + >= without_savings_bonds["bond_assets"].to_numpy() + ).all() + # ... and leave the bank and stock leaves untouched. + for leaf in ("bank_account_assets", "stock_assets"): + np.testing.assert_array_equal( + targets[leaf].to_numpy(), without_savings_bonds[leaf].to_numpy() + ) + + +@settings(max_examples=200, deadline=None) +@given( + raw=_raw_component_tables(), + column=st.sampled_from(_COMPONENT_COLUMNS), + sentinel=st.sampled_from(_SCF_SENTINELS), +) +def test_scf_sentinels_count_as_zero(raw, column, sentinel) -> None: + np.testing.assert_array_equal( + _scf_financial_asset_targets(raw.assign(**{column: float(sentinel)})), + _scf_financial_asset_targets(raw.assign(**{column: 0.0})), + ) + + def test_replace_sentinels_zeroes_scf_missing_codes() -> None: series = pd.Series([-1.0, -7.0, -8.0, -9.0, 5_000.0, 0.0]) cleaned = _replace_sentinels(series).to_numpy() @@ -277,8 +426,9 @@ def test_with_inputs_writes_asset_and_net_worth_columns() -> None: def test_carry_signal_tolerates_a_single_constant_leaf() -> None: - # Bond holdings are ~97% zero in the donor: a healthy draw on a small - # frame can produce an all-zero bond column. That must NOT read as an + # About 93% of SCF donor households (by weight) hold neither bonds nor + # savings bonds: a healthy draw on a small frame can produce an all-zero + # bond column. That must NOT read as an # engine-default surface (per-leaf nonconstancy made pass-through # platform-dependent — the #510 CI failure). Only an all-leaves-constant # surface forces re-imputation. diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py index ca014679be..261397c420 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py @@ -338,7 +338,7 @@ def capture_equality(expected: object, actual: object) -> None: "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "d1df6b316e4937e809f5f020ea2d3a7bd38bccc1845f3ae6e104f7eed6a73323", + "spec_sha256": "f2ef1eee2217b106918fb1b07a92eb8c2a743f9e63f72e74849e03d6c8880b60", }, } diff --git a/test_support/microcosm_build/us_scf_wealth.py b/test_support/microcosm_build/us_scf_wealth.py index b6961ffb21..f30c0479a5 100644 --- a/test_support/microcosm_build/us_scf_wealth.py +++ b/test_support/microcosm_build/us_scf_wealth.py @@ -46,9 +46,11 @@ with_us_scf_wealth_inputs, ) from microcosm.build.us_runtime.scf_wealth import ( + _SCF_SENTINELS, _household_head_mask, _recipient_cps_race, _replace_sentinels, + _scf_financial_asset_targets, ) from microcosm.frame import US_SCHEMA, Frame, WeightKind, Weights @@ -85,6 +87,8 @@ def _raw_scf_summary() -> pd.DataFrame: "wageinc": rng.gamma(2.0, 20_000.0, n), "intdivinc": rng.gamma(1.0, 1_000.0, n), "ssretinc": rng.gamma(1.0, 8_000.0, n), + # Drawn last so every column above keeps its earlier values. + "savbnd": np.where(rng.random(n) < 0.07, rng.gamma(1.0, 3_000.0, n), 0.0), } ) From fd4381fbfa0e7a9ceb4f83abdc3e661ab5eb651d Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 7 Oct 2026 15:27:46 -0400 Subject: [PATCH 2/5] Apply the #1136 review: scope claims, test the zero floor, re-pin The in-session review of 35a742900 found no code defect but several overclaims and gaps in prose, plus one untested branch: - Test the zero floor: a Hypothesis test with signed non-sentinel components checks each leaf equals max(sum, 0) and is nonnegative (the floor-removal mutant now fails it). The savings-bond additivity test says why it draws only nonnegative values. - Rename the static test to what it checks: the leaves draw on distinct FIN constituents (five of the ten). It no longer claims a partition, and the "never exceed FIN" note now states its premise. - Docstring: face value applies to savbnd and to every component of bond, while SIPP asks balance or market value and POMS uses market value (SI 01140.250) or redemption value (SI 01140.240); liq includes prepaid cards and is at least $1 for account holders; the eCPS reference shares behind the gate bands are unweighted record shares. - Changelog: the new fragment names the non-SSI consumers of bond_assets in PolicyEngine-US 2.2.1 (SNAP asset test, spm_unit_cash_assets, MO TANF). The pending #1129 fragment no longer says this stage does not read savbnd. - Re-pin the seed-kernel attestation for the new scf_wealth.py bytes. Co-Authored-By: Claude Opus 5.5 --- changelog.d/scf-bond-docstring.fixed.md | 2 +- changelog.d/scf-savings-bonds.fixed.md | 2 +- docs/evidence/spec-engine/us-f0-coverage.json | 16 ++++----- .../build/spec_engine/inventory_coverage.py | 4 +-- .../microcosm/build/us_runtime/scf_wealth.py | 23 +++++++----- .../shared/test_spec_engine_loader.py | 2 +- .../engine_free/us/test_us_scf_wealth.py | 35 +++++++++++++++++-- .../us/test_us_multispine_pool_tool.py | 2 +- 8 files changed, 60 insertions(+), 26 deletions(-) diff --git a/changelog.d/scf-bond-docstring.fixed.md b/changelog.d/scf-bond-docstring.fixed.md index 81090c1cbe..a5a6de8fb2 100644 --- a/changelog.d/scf-bond-docstring.fixed.md +++ b/changelog.d/scf-bond-docstring.fixed.md @@ -1 +1 @@ -Correct the `scf_wealth` docstring: SCF `bond` is directly held tax-exempt, mortgage-backed, U.S. government and agency, and corporate and foreign bonds. It excludes U.S. savings bonds, which the SCF reports separately as `savbnd` and this stage does not read, and bond funds, which are in `nmmf`. The docstring had said `bond` included savings bonds. Because the spec engine hashes `scf_wealth.py`'s bytes into the legacy-v1 seed-protocol attestation, the seed-protocol and seed-map digests, the US `spec_sha256`, the loader golden vector and `docs/evidence/spec-engine/us-f0-coverage.json` are re-pinned. No behaviour or data changes. +Correct the `scf_wealth` docstring: SCF `bond` is directly held tax-exempt, mortgage-backed, U.S. government and agency, and corporate and foreign bonds. It excludes U.S. savings bonds, which the SCF reports separately as `savbnd`, and bond funds, which are in `nmmf`. The docstring had said `bond` included savings bonds. Because the spec engine hashes `scf_wealth.py`'s bytes into the legacy-v1 seed-protocol attestation, the seed-protocol and seed-map digests, the US `spec_sha256`, the loader golden vector and `docs/evidence/spec-engine/us-f0-coverage.json` are re-pinned. No behaviour or data changes. diff --git a/changelog.d/scf-savings-bonds.fixed.md b/changelog.d/scf-savings-bonds.fixed.md index c8050c34a8..1558c11e20 100644 --- a/changelog.d/scf-savings-bonds.fixed.md +++ b/changelog.d/scf-savings-bonds.fixed.md @@ -1 +1 @@ -Count U.S. savings bonds in the SCF half of `bond_assets`. The `scf_wealth` stage now maps `bond_assets` to SCF `bond` + `savbnd` instead of `bond` alone. PolicyEngine-US cites POMS SI 01140.240 (U.S. Savings Bonds) for `bond_assets` and its SSI countable-resource list, and SIPP 2023 `TVAL_BOND`, the other half of the 50/50 blend, already includes savings bonds through government securities. On the pinned SCF 2022 extract, households with a nonzero SCF bond target rise from 1.11% to 7.36% by weight, and the weighted total rises from $1,398B to $1,699B. This departs from archived commit `42ed5d45`, which kept `savbnd` as a separate net-worth component that microcosm does not build. The seed-kernel attestation is re-pinned, as for any byte edit to `scf_wealth.py`. Released data changes only through a rebuild and release. +Count U.S. savings bonds in the SCF half of `bond_assets`. The `scf_wealth` stage now maps `bond_assets` to SCF `bond` + `savbnd` instead of `bond` alone. PolicyEngine-US cites POMS SI 01140.240 (U.S. Savings Bonds) for `bond_assets`, and SIPP 2023 `TVAL_BOND`, the other half of the 50/50 blend, already includes savings bonds through government securities. On the pinned SCF 2022 extract, households with a nonzero SCF bond target rise from 1.11% to 7.36% by weight, and the weighted total rises from $1,398B to $1,699B (face value). In PolicyEngine-US 2.2.1, `bond_assets` feeds SSI countable resources, the SNAP asset test, `spm_unit_cash_assets` (read by many state TANF and local general-assistance resource tests) and Missouri TANF, so all of them see the change. This departs from archived commit `42ed5d45`, which kept `savbnd` as a separate net-worth component that microcosm does not build. The seed-kernel attestation is re-pinned, as for any byte edit to `scf_wealth.py`. Released data changes only through a rebuild and release. diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index f812f6f533..ca45a96d6a 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1656,13 +1656,13 @@ "compiler_ir.node_slices" ], "expected": { - "map_sha256": "8f9ac34362f605eecdae50886cc7c5b1d5713b0b9cb63cd348bb3e77ebc00092", - "protocol_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae" + "map_sha256": "767ac1c449018ceeb743e8990a7b7822c93051d995a63b9cb5743fdf327c5c74", + "protocol_sha256": "62b2155f6dd9383b607277218fa1acf5bfeaacb81243413bab2cc31c2e62607b" }, "failures": [], "observed": { - "map_sha256": "8f9ac34362f605eecdae50886cc7c5b1d5713b0b9cb63cd348bb3e77ebc00092", - "protocol_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae" + "map_sha256": "767ac1c449018ceeb743e8990a7b7822c93051d995a63b9cb5743fdf327c5c74", + "protocol_sha256": "62b2155f6dd9383b607277218fa1acf5bfeaacb81243413bab2cc31c2e62607b" }, "status": "covered" }, @@ -1677,7 +1677,7 @@ "compiler_ir.seed_stream_map" ], "expected": { - "implementation_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae", + "implementation_sha256": "62b2155f6dd9383b607277218fa1acf5bfeaacb81243413bab2cc31c2e62607b", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1698,7 +1698,7 @@ }, "failures": [], "observed": { - "implementation_sha256": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae", + "implementation_sha256": "62b2155f6dd9383b607277218fa1acf5bfeaacb81243413bab2cc31c2e62607b", "protocol": "legacy-v1", "streams": [ "build_model", @@ -2599,7 +2599,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "f2ef1eee2217b106918fb1b07a92eb8c2a743f9e63f72e74849e03d6c8880b60" + "spec_sha256": "d70f33e454eaae91e1bec20f04466051a5cd574d4612912f89118ccf0a8d9ac8" } }, "report_schema_version": 3, @@ -2609,7 +2609,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "f2ef1eee2217b106918fb1b07a92eb8c2a743f9e63f72e74849e03d6c8880b60" + "spec_sha256": "d70f33e454eaae91e1bec20f04466051a5cd574d4612912f89118ccf0a8d9ac8" }, "status": "pass" } diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index 83e4aaaef8..bcce196d60 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -359,8 +359,8 @@ "late_schedule": "e59c019d3d454eac99ac0ac209b6c5b6faaf9bdfcaeee18c36a25be19bf7da2f", "ownership": "5f64f0aac49e2313177564f71876bffc8c81b3ded4df701e70930e60e9c98356", "primary_tuples": "fdf23da429f8c501e198a2f5b719763d523a41565c2153fdf17b0344f21bcd7c", - "seed_map": "8f9ac34362f605eecdae50886cc7c5b1d5713b0b9cb63cd348bb3e77ebc00092", - "seed_protocol": "edff41f9b71525d5201ea14208a7cdce4ada4c52745b3f39bf94a0c582366dae", + "seed_map": "767ac1c449018ceeb743e8990a7b7822c93051d995a63b9cb5743fdf327c5c74", + "seed_protocol": "62b2155f6dd9383b607277218fa1acf5bfeaacb81243413bab2cc31c2e62607b", "source_manifest": "f4f8bfeb79268a4043a843b47cec1d1c0e58e9f5dd6bc23417ada95446dd7b8e", "take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35", "tail": "ac92829c88a1a4fb6460d61190918d5d99c6c377fc8dd8f62f02b332d09bf59c", diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py index c9c5193e8a..4a02d52d2b 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py @@ -24,7 +24,8 @@ which also reads U.S. savings bonds: - ``bank_account_assets`` ← SCF ``liq`` (checking, savings, money-market, - call accounts). + call and prepaid-card accounts; the Fed's macro sets it to at least $1 for + a household holding any such account). - ``stock_assets`` ← SCF ``stocks`` + ``nmmf`` (directly-held stock plus stock/non-money-market mutual funds). - ``bond_assets`` ← SCF ``bond`` + ``savbnd``. ``bond`` is directly held @@ -48,11 +49,14 @@ built, ``scf_savings_bonds`` must leave that partition, because ``bond_assets`` now carries ``savbnd``. -Two measurement limits remain. SCF ``X3902`` asks the face value of savings -bonds, while SIPP asks market value. And neither survey identifies savings -bonds still in their mandatory retention period (12 months for Series EE and -I bonds issued on or after 2/1/2003), which POMS SI 01140.240 says are not -resources. Both affect amounts, not which leaf savings bonds belong to. +Two measurement limits remain, for this leaf as before. The SCF records face +values: ``X3902`` for savings bonds, and face-value items for every component +of ``bond``. SIPP asks balance or market value including interest, while POMS +counts other bonds at current market value (SI 01140.250) and savings bonds at +redemption value (SI 01140.240). And neither survey identifies savings bonds +still in their mandatory retention period (12 months for Series EE and I bonds +issued on or after 2/1/2003), which SI 01140.240 says are not resources. Both +limits affect amounts, not which leaf savings bonds belong to. The SCF QRF's eight predictors are age, sex, race, marriage, own children, employment income, interest/dividend income, and Social Security/pension @@ -286,9 +290,10 @@ _HOUSEHOLD_ID_COLUMN = "person_household_id" #: Weighted person-level nonzero-share plausibility bands. Centred on the -#: pinned incumbent eCPS parity reference (bank 0.54, stock 0.16, bond 0.03) -#: with generous width — the gate exists to catch an all-zero or constant -#: surface, not to pin a point estimate. +#: pinned incumbent eCPS parity reference (bank 0.54, stock 0.16, bond 0.03; +#: those reference values are unweighted record shares) with generous width — +#: the gate exists to catch an all-zero or constant surface, not to pin a +#: point estimate. _BANK_NONZERO_SHARE_BAND = (0.25, 0.85) _STOCK_NONZERO_SHARE_BAND = (0.03, 0.40) _BOND_NONZERO_SHARE_BAND = (0.001, 0.12) diff --git a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py index dfe83e0d86..b2977e2728 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py @@ -12,7 +12,7 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non # Pin the domain separator, normalization rules, schema-set receipt, and # exact normative projection as one reviewable golden vector. assert first.spec_sha256 == ( - "fb4ceaec7ec832bca992b865dba3fa79aa129b08bd74f719329864c33c278254" + "8d578ce26106423171bfe57be0cf36026c6c6febd1b4e572d784c3cf96409550" ) second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b") diff --git a/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py b/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py index c20bc24841..f50ce432c3 100644 --- a/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py +++ b/packages/microcosm-build/tests/engine_free/us/test_us_scf_wealth.py @@ -51,7 +51,7 @@ def test_stock_target_sums_stocks_and_nmmf() -> None: ) -def test_ssi_leaves_partition_scf_financial_assets_without_double_counting() -> None: +def test_ssi_leaves_draw_on_distinct_scf_fin_constituents() -> None: components = [ component for leaf_components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.values() @@ -59,8 +59,9 @@ def test_ssi_leaves_partition_scf_financial_assets_without_double_counting() -> ] # No SCF component feeds two SSI leaves, so the leaves cannot double count. assert len(components) == len(set(components)) - # Every component is one of FIN's disjoint constituents, so the three leaves - # together never exceed the household's total financial assets. + # Every component is one of FIN's disjoint constituents (the leaves use five + # of the ten), so wherever the other constituents are nonnegative the three + # leaves together cannot exceed the household's total financial assets. assert set(components) <= _SCF_FIN_CONSTITUENTS # U.S. savings bonds (POMS SI 01140.240) reach an SSI leaf, as SIPP's # TVAL_BOND does on the other half of the blend. @@ -201,9 +202,37 @@ def test_scf_targets_sum_cleaned_components(raw) -> None: assert (targets[leaf].to_numpy() >= 0.0).all() +#: A signed non-sentinel amount, so the zero floor can bind. +_signed_scf_amount = st.floats(min_value=-1e10, max_value=1e10, allow_nan=False).filter( + lambda value: value not in _SCF_SENTINELS +) + + +@settings(max_examples=200, deadline=None) +@given( + rows=st.integers(min_value=1, max_value=12).flatmap( + lambda rows: st.fixed_dictionaries( + { + column: st.lists(_signed_scf_amount, min_size=rows, max_size=rows) + for column in _COMPONENT_COLUMNS + } + ) + ) +) +def test_scf_targets_floor_negative_sums_at_zero(rows) -> None: + raw = pd.DataFrame(rows) + targets = _scf_financial_asset_targets(raw) + for leaf, components in SCF_FINANCIAL_ASSET_TARGET_COMPONENTS.items(): + expected = np.maximum(sum(raw[c].to_numpy() for c in components), 0.0) + np.testing.assert_allclose(targets[leaf].to_numpy(), expected, rtol=1e-12) + assert (targets[leaf].to_numpy() >= 0.0).all() + + @settings(max_examples=200, deadline=None) @given(raw=_raw_component_tables()) def test_savings_bonds_add_to_bond_assets_and_nothing_else(raw) -> None: + # Components here are nonnegative or sentinels, as in the SCF extract; with a + # negative non-sentinel bond the zero floor could absorb savings bonds. targets = _scf_financial_asset_targets(raw) without_savings_bonds = _scf_financial_asset_targets(raw.assign(savbnd=0.0)) # Savings bonds raise bond_assets by exactly their cleaned value, so the diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py index 261397c420..8f810ac808 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py @@ -338,7 +338,7 @@ def capture_equality(expected: object, actual: object) -> None: "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "f2ef1eee2217b106918fb1b07a92eb8c2a743f9e63f72e74849e03d6c8880b60", + "spec_sha256": "d70f33e454eaae91e1bec20f04466051a5cd574d4612912f89118ccf0a8d9ac8", }, } From 1e1f7283d92fe5f65044b0ce9add78a29166aaa4 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 11 Nov 2026 10:17:13 -0500 Subject: [PATCH 3/5] Apply the #1136 round-2 review and re-pin on main The round-2 independent review (APPROVE_WITH_NITS) found three prose nits, fixed here: - the liq docstring said the Fed's macro floors liq at $1 for a household holding any such account, but HLIQ (macro line 1430) has no prepaid-card flag; - the docstring and changelog gave the wrong cause for savings bonds reaching no SSI leaf under the archive mapping: scf_savings_bonds is not a countable-resource leaf, whether or not anything builds it; - the changelog's list of spm_unit_cash_assets readers now names DC's child care subsidy, Illinois AABD and Massachusetts EAEDC. The seed-kernel pins are regenerated on main's tree with tools/repin_us_spec_engine_contracts.py and tools/spec_engine_coverage.py: seed_protocol 66c65def, seed_map 48624ca7, US spec_sha256 6f55de0f, loader golden a5069dd2, and eight hash fields in us-f0-coverage.json. The bundle generator left the bundle unchanged. The tool's first pass also rewrote test_spec_engine_coverage_tool.py's covered_item_count to 40, because it builds the inventory report before writing the new seed hashes; main's 41 is kept, which the coverage tool reports (41/41). Co-Authored-By: Claude Opus 5.5 --- changelog.d/scf-savings-bonds.fixed.md | 2 +- docs/evidence/spec-engine/us-f0-coverage.json | 16 ++++++++-------- .../build/spec_engine/inventory_coverage.py | 6 ++++-- .../src/microcosm/build/us_runtime/scf_wealth.py | 9 ++++++--- .../shared/test_spec_engine_loader.py | 4 +++- .../us/test_us_multispine_pool_tool.py | 4 +++- 6 files changed, 25 insertions(+), 16 deletions(-) diff --git a/changelog.d/scf-savings-bonds.fixed.md b/changelog.d/scf-savings-bonds.fixed.md index 1558c11e20..bab324dcfb 100644 --- a/changelog.d/scf-savings-bonds.fixed.md +++ b/changelog.d/scf-savings-bonds.fixed.md @@ -1 +1 @@ -Count U.S. savings bonds in the SCF half of `bond_assets`. The `scf_wealth` stage now maps `bond_assets` to SCF `bond` + `savbnd` instead of `bond` alone. PolicyEngine-US cites POMS SI 01140.240 (U.S. Savings Bonds) for `bond_assets`, and SIPP 2023 `TVAL_BOND`, the other half of the 50/50 blend, already includes savings bonds through government securities. On the pinned SCF 2022 extract, households with a nonzero SCF bond target rise from 1.11% to 7.36% by weight, and the weighted total rises from $1,398B to $1,699B (face value). In PolicyEngine-US 2.2.1, `bond_assets` feeds SSI countable resources, the SNAP asset test, `spm_unit_cash_assets` (read by many state TANF and local general-assistance resource tests) and Missouri TANF, so all of them see the change. This departs from archived commit `42ed5d45`, which kept `savbnd` as a separate net-worth component that microcosm does not build. The seed-kernel attestation is re-pinned, as for any byte edit to `scf_wealth.py`. Released data changes only through a rebuild and release. +Count U.S. savings bonds in the SCF half of `bond_assets`. The `scf_wealth` stage now maps `bond_assets` to SCF `bond` + `savbnd` instead of `bond` alone. PolicyEngine-US cites POMS SI 01140.240 (U.S. Savings Bonds) for `bond_assets`, and SIPP 2023 `TVAL_BOND`, the other half of the 50/50 blend, already includes savings bonds through government securities. On the pinned SCF 2022 extract, households with a nonzero SCF bond target rise from 1.11% to 7.36% by weight, and the weighted total rises from $1,398B to $1,699B (face value). In PolicyEngine-US 2.2.1, `bond_assets` feeds SSI countable resources, the SNAP asset test, `spm_unit_cash_assets` (read by many state TANF and local general-assistance resource tests, and by others such as DC's child care subsidy, Illinois AABD and Massachusetts EAEDC asset tests) and Missouri TANF, so all of them see the change. This departs from archived commit `42ed5d45`, which kept `savbnd` as a separate net-worth component, `scf_savings_bonds`, that is not a countable-resource leaf. The seed-kernel attestation is re-pinned, as for any byte edit to `scf_wealth.py`. Released data changes only through a rebuild and release. diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index 5a20b58ca7..ef9a4d858d 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1642,13 +1642,13 @@ "compiler_ir.node_slices" ], "expected": { - "map_sha256": "fa48af060da522bb1edcb80580098f258763757139292602759cbccbfff76b37", - "protocol_sha256": "5840ac6cefd5ce3d2172aca9e3bfc08d2344e97a8e9b42a723a4edcaa9f8ff53" + "map_sha256": "48624ca75a75c38d5c3838951ff931ec4bb4db0e5754d8483befc304de8dd6f7", + "protocol_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904" }, "failures": [], "observed": { - "map_sha256": "fa48af060da522bb1edcb80580098f258763757139292602759cbccbfff76b37", - "protocol_sha256": "5840ac6cefd5ce3d2172aca9e3bfc08d2344e97a8e9b42a723a4edcaa9f8ff53" + "map_sha256": "48624ca75a75c38d5c3838951ff931ec4bb4db0e5754d8483befc304de8dd6f7", + "protocol_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904" }, "status": "covered" }, @@ -1663,7 +1663,7 @@ "compiler_ir.seed_stream_map" ], "expected": { - "implementation_sha256": "5840ac6cefd5ce3d2172aca9e3bfc08d2344e97a8e9b42a723a4edcaa9f8ff53", + "implementation_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1684,7 +1684,7 @@ }, "failures": [], "observed": { - "implementation_sha256": "5840ac6cefd5ce3d2172aca9e3bfc08d2344e97a8e9b42a723a4edcaa9f8ff53", + "implementation_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904", "protocol": "legacy-v1", "streams": [ "build_model", @@ -2585,7 +2585,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "4ccbd01720871e59ad8e3c00e1c1296231facef91e83c561076ee499e0a138b2" + "spec_sha256": "6f55de0fd50b506c0e679b92a0ba639acd188f8cc354bfdb7a6e8e558d486cba" } }, "report_schema_version": 3, @@ -2595,7 +2595,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "4ccbd01720871e59ad8e3c00e1c1296231facef91e83c561076ee499e0a138b2" + "spec_sha256": "6f55de0fd50b506c0e679b92a0ba639acd188f8cc354bfdb7a6e8e558d486cba" }, "status": "pass" } diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index 3206916b84..d6ecdfcca4 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -380,8 +380,10 @@ # microcosm#1259's recipient-share bound in puf_support moves both again. # microcosm#1261 moves both again: the PUF donor carries partnership and # S-corp line-32 shares as separate leaves. - "seed_map": "fa48af060da522bb1edcb80580098f258763757139292602759cbccbfff76b37", - "seed_protocol": "5840ac6cefd5ce3d2172aca9e3bfc08d2344e97a8e9b42a723a4edcaa9f8ff53", + # microcosm#1136 moves both again: scf_wealth's SCF bond_assets target + # adds U.S. savings bonds (savbnd). + "seed_map": "48624ca75a75c38d5c3838951ff931ec4bb4db0e5754d8483befc304de8dd6f7", + "seed_protocol": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904", "source_manifest": "dc3879886d2a69f20fb982a675d7fb322c0e4017afef6471be54b0ee3cbd2af6", "take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35", "tail": "565f0ceeadab69d3e96a886a00dd0305f7425fa3acde24d12ba48db2b37d5fc0", diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py index 4a02d52d2b..36aac2b2dd 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py @@ -25,7 +25,8 @@ - ``bank_account_assets`` ← SCF ``liq`` (checking, savings, money-market, call and prepaid-card accounts; the Fed's macro sets it to at least $1 for - a household holding any such account). + a household reporting a checking, savings, money-market or call account, + even at a zero balance, but not for one holding only a prepaid card). - ``stock_assets`` ← SCF ``stocks`` + ``nmmf`` (directly-held stock plus stock/non-money-market mutual funds). - ``bond_assets`` ← SCF ``bond`` + ``savbnd``. ``bond`` is directly held @@ -35,9 +36,11 @@ ``nmmf``, so they land in ``stock_assets``. The archive read ``bond`` alone and kept ``savbnd`` as ``scf_savings_bonds``, -a construction-only component of its net-worth reconciliation. Microcosm -builds none of those components (see ``net_worth`` below), so under the +one of its net-worth reconciliation components. That is not a countable +resource leaf, and PolicyEngine-US defines no such variable, so under the archive mapping an SCF-drawn household's savings bonds reached no SSI leaf. +Microcosm builds none of those components (see ``net_worth`` below), so +before this change it read ``savbnd`` nowhere. PolicyEngine-US documents ``bond_assets`` as "Value of bonds and government securities. Imputed from SIPP TVAL_BOND." and cites POMS SI 01140.240 (U.S. Savings Bonds) and SI 01140.250 (Municipal, Corporate and Government Bonds). diff --git a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py index 26910035b3..c30b9ee98d 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py @@ -24,8 +24,10 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non # The ACS SSI disability-criteria stage (microcosm#1022) moves # ssi_disability_criteria's attested bytes. # The opt-in cross-fitted gate calibration moves the fit kernels' bytes. + # microcosm#1136's savings bonds in scf_wealth's bond_assets target move + # scf_wealth's attested bytes. assert first.spec_sha256 == ( - "5b39d83cafb6f312ce73e5550ab36da6676ce265779d615f49c7987f5cc5d36e" + "a5069dd2274d4b3f7707570d1856db7c7e7635b2e24617b1760e9c909dd069a7" ) second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b") diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py index 5f77431853..a53cb9bc7c 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py @@ -353,7 +353,9 @@ def capture_equality(expected: object, actual: object) -> None: # The opt-in cross-fitted gate calibration in microcosm.fit.qrf moves it. # microcosm#1073's scf_wealth education-debt declaration moves it # through the bundle's source stages. - "spec_sha256": "4ccbd01720871e59ad8e3c00e1c1296231facef91e83c561076ee499e0a138b2", + # microcosm#1136's savings bonds in scf_wealth's bond_assets target + # move it too. + "spec_sha256": "6f55de0fd50b506c0e679b92a0ba639acd188f8cc354bfdb7a6e8e558d486cba", }, } From 57017c28f7e8b66c8978d2c8b98ab36eb1d26334 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Wed, 11 Nov 2026 10:55:27 -0500 Subject: [PATCH 4/5] Say which prepaid-only households keep liq at 0, and re-pin The round-2 delta review (D1) found that "but not for one holding only a prepaid card" is true only at a zero balance: the macro's HLIQ includes LIQ>0, so a prepaid-only household with a positive balance still gets the $1 floor. The docstring now says a household whose only such account is a zero-balance prepaid card stays at 0. The changelog's list of spm_unit_cash_assets readers adds Illinois HBWD, whose countable-assets variable reads it in PolicyEngine-US 2.2.1. Pins regenerated with tools/repin_us_spec_engine_contracts.py and tools/spec_engine_coverage.py on main's tree: seed_protocol 606dcda7, seed_map 2c6f0bc8, loader golden c32e8ad3, US spec_sha256 276728a2, and eight hash fields in us-f0-coverage.json. covered_item_count stays at 41; repin --check and spec_engine_coverage --check both pass (42394/42394 fields, 41/41 inventory checks). Co-Authored-By: Claude Opus 5.5 --- changelog.d/scf-savings-bonds.fixed.md | 2 +- docs/evidence/spec-engine/us-f0-coverage.json | 16 ++++++++-------- .../build/spec_engine/inventory_coverage.py | 4 ++-- .../src/microcosm/build/us_runtime/scf_wealth.py | 3 ++- .../shared/test_spec_engine_loader.py | 2 +- .../us/test_us_multispine_pool_tool.py | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/changelog.d/scf-savings-bonds.fixed.md b/changelog.d/scf-savings-bonds.fixed.md index bab324dcfb..001c983bcf 100644 --- a/changelog.d/scf-savings-bonds.fixed.md +++ b/changelog.d/scf-savings-bonds.fixed.md @@ -1 +1 @@ -Count U.S. savings bonds in the SCF half of `bond_assets`. The `scf_wealth` stage now maps `bond_assets` to SCF `bond` + `savbnd` instead of `bond` alone. PolicyEngine-US cites POMS SI 01140.240 (U.S. Savings Bonds) for `bond_assets`, and SIPP 2023 `TVAL_BOND`, the other half of the 50/50 blend, already includes savings bonds through government securities. On the pinned SCF 2022 extract, households with a nonzero SCF bond target rise from 1.11% to 7.36% by weight, and the weighted total rises from $1,398B to $1,699B (face value). In PolicyEngine-US 2.2.1, `bond_assets` feeds SSI countable resources, the SNAP asset test, `spm_unit_cash_assets` (read by many state TANF and local general-assistance resource tests, and by others such as DC's child care subsidy, Illinois AABD and Massachusetts EAEDC asset tests) and Missouri TANF, so all of them see the change. This departs from archived commit `42ed5d45`, which kept `savbnd` as a separate net-worth component, `scf_savings_bonds`, that is not a countable-resource leaf. The seed-kernel attestation is re-pinned, as for any byte edit to `scf_wealth.py`. Released data changes only through a rebuild and release. +Count U.S. savings bonds in the SCF half of `bond_assets`. The `scf_wealth` stage now maps `bond_assets` to SCF `bond` + `savbnd` instead of `bond` alone. PolicyEngine-US cites POMS SI 01140.240 (U.S. Savings Bonds) for `bond_assets`, and SIPP 2023 `TVAL_BOND`, the other half of the 50/50 blend, already includes savings bonds through government securities. On the pinned SCF 2022 extract, households with a nonzero SCF bond target rise from 1.11% to 7.36% by weight, and the weighted total rises from $1,398B to $1,699B (face value). In PolicyEngine-US 2.2.1, `bond_assets` feeds SSI countable resources, the SNAP asset test, `spm_unit_cash_assets` (read by many state TANF and local general-assistance resource tests, and by others such as DC's child care subsidy, Illinois AABD and HBWD, and Massachusetts EAEDC asset tests) and Missouri TANF, so all of them see the change. This departs from archived commit `42ed5d45`, which kept `savbnd` as a separate net-worth component, `scf_savings_bonds`, that is not a countable-resource leaf. The seed-kernel attestation is re-pinned, as for any byte edit to `scf_wealth.py`. Released data changes only through a rebuild and release. diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index ef9a4d858d..806f9991e1 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1642,13 +1642,13 @@ "compiler_ir.node_slices" ], "expected": { - "map_sha256": "48624ca75a75c38d5c3838951ff931ec4bb4db0e5754d8483befc304de8dd6f7", - "protocol_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904" + "map_sha256": "2c6f0bc871ec58845ccf652aafdf50690a8cd90ae0761bc0341a0f98c3e27324", + "protocol_sha256": "606dcda738800b98d47c61c8c69d448e33de4bfe3a6b965952c963ae75917a5a" }, "failures": [], "observed": { - "map_sha256": "48624ca75a75c38d5c3838951ff931ec4bb4db0e5754d8483befc304de8dd6f7", - "protocol_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904" + "map_sha256": "2c6f0bc871ec58845ccf652aafdf50690a8cd90ae0761bc0341a0f98c3e27324", + "protocol_sha256": "606dcda738800b98d47c61c8c69d448e33de4bfe3a6b965952c963ae75917a5a" }, "status": "covered" }, @@ -1663,7 +1663,7 @@ "compiler_ir.seed_stream_map" ], "expected": { - "implementation_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904", + "implementation_sha256": "606dcda738800b98d47c61c8c69d448e33de4bfe3a6b965952c963ae75917a5a", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1684,7 +1684,7 @@ }, "failures": [], "observed": { - "implementation_sha256": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904", + "implementation_sha256": "606dcda738800b98d47c61c8c69d448e33de4bfe3a6b965952c963ae75917a5a", "protocol": "legacy-v1", "streams": [ "build_model", @@ -2585,7 +2585,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "6f55de0fd50b506c0e679b92a0ba639acd188f8cc354bfdb7a6e8e558d486cba" + "spec_sha256": "276728a2fcb1eaca2eba93df52bc5b1edfb4cebbcdfcf4d890e7131cb416866d" } }, "report_schema_version": 3, @@ -2595,7 +2595,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "6f55de0fd50b506c0e679b92a0ba639acd188f8cc354bfdb7a6e8e558d486cba" + "spec_sha256": "276728a2fcb1eaca2eba93df52bc5b1edfb4cebbcdfcf4d890e7131cb416866d" }, "status": "pass" } diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index d6ecdfcca4..6e6d1ffe87 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -382,8 +382,8 @@ # S-corp line-32 shares as separate leaves. # microcosm#1136 moves both again: scf_wealth's SCF bond_assets target # adds U.S. savings bonds (savbnd). - "seed_map": "48624ca75a75c38d5c3838951ff931ec4bb4db0e5754d8483befc304de8dd6f7", - "seed_protocol": "66c65defae0e7525cb035e2fb77910587668b8fd7f09c00659cb412eb9e32904", + "seed_map": "2c6f0bc871ec58845ccf652aafdf50690a8cd90ae0761bc0341a0f98c3e27324", + "seed_protocol": "606dcda738800b98d47c61c8c69d448e33de4bfe3a6b965952c963ae75917a5a", "source_manifest": "dc3879886d2a69f20fb982a675d7fb322c0e4017afef6471be54b0ee3cbd2af6", "take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35", "tail": "565f0ceeadab69d3e96a886a00dd0305f7425fa3acde24d12ba48db2b37d5fc0", diff --git a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py index 36aac2b2dd..095c66d41f 100644 --- a/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py +++ b/packages/microcosm-build/src/microcosm/build/us_runtime/scf_wealth.py @@ -26,7 +26,8 @@ - ``bank_account_assets`` ← SCF ``liq`` (checking, savings, money-market, call and prepaid-card accounts; the Fed's macro sets it to at least $1 for a household reporting a checking, savings, money-market or call account, - even at a zero balance, but not for one holding only a prepaid card). + even at a zero balance, while a household whose only such account is a + zero-balance prepaid card stays at 0). - ``stock_assets`` ← SCF ``stocks`` + ``nmmf`` (directly-held stock plus stock/non-money-market mutual funds). - ``bond_assets`` ← SCF ``bond`` + ``savbnd``. ``bond`` is directly held diff --git a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py index c30b9ee98d..2abffb7e63 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py @@ -27,7 +27,7 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non # microcosm#1136's savings bonds in scf_wealth's bond_assets target move # scf_wealth's attested bytes. assert first.spec_sha256 == ( - "a5069dd2274d4b3f7707570d1856db7c7e7635b2e24617b1760e9c909dd069a7" + "c32e8ad336b48b026a3f98da5027eaf48dd97ba30628f5e19fe30d4cc00d6f55" ) second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b") diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py index a53cb9bc7c..c92e6d2dda 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py @@ -355,7 +355,7 @@ def capture_equality(expected: object, actual: object) -> None: # through the bundle's source stages. # microcosm#1136's savings bonds in scf_wealth's bond_assets target # move it too. - "spec_sha256": "6f55de0fd50b506c0e679b92a0ba639acd188f8cc354bfdb7a6e8e558d486cba", + "spec_sha256": "276728a2fcb1eaca2eba93df52bc5b1edfb4cebbcdfcf4d890e7131cb416866d", }, } From 86d16a57ec8fae1fc22c90e8978ce1cdc96b71b2 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 13 Nov 2026 08:09:25 -0500 Subject: [PATCH 5/5] Re-pin #1136's seed kernel on main 7b93dae1e Main re-pinned the US F0 pins in 34578814c, so the merge took main's values. Regenerated them for scf_wealth's savings-bond bytes with main's tools (repin_us_spec_engine_contracts.py --legacy-only, the bundle generator, the full re-pin, spec_engine_coverage.py); both --check runs pass (42,394/42,394 fields, 41/41 inventory checks). Restored the PR's comment at each pin. Co-Authored-By: Claude Opus 5.5 --- docs/evidence/spec-engine/us-f0-coverage.json | 16 ++++++++-------- .../build/spec_engine/inventory_coverage.py | 6 ++++-- .../shared/test_spec_engine_loader.py | 4 +++- .../us/test_us_multispine_pool_tool.py | 4 +++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/evidence/spec-engine/us-f0-coverage.json b/docs/evidence/spec-engine/us-f0-coverage.json index 517fb5a3fc..fdc25b5ddb 100644 --- a/docs/evidence/spec-engine/us-f0-coverage.json +++ b/docs/evidence/spec-engine/us-f0-coverage.json @@ -1642,13 +1642,13 @@ "compiler_ir.node_slices" ], "expected": { - "map_sha256": "bcb012edd7fdd11af328df17ff2ce530912e903514691d330c604c09854c7e0a", - "protocol_sha256": "e1f88676b849f78e198f2e4dffecf9a380015d0061e24f39e518cb7bc13d26c0" + "map_sha256": "4f1f614ea8726dbac087696b9232261f9a8ef0f94541af7d1ee4cffbf4a45e66", + "protocol_sha256": "7187ab49b8b2cb5c5850e5f5e58a61946eb0b5e558e8e1ee95b4a304b10e6ab7" }, "failures": [], "observed": { - "map_sha256": "bcb012edd7fdd11af328df17ff2ce530912e903514691d330c604c09854c7e0a", - "protocol_sha256": "e1f88676b849f78e198f2e4dffecf9a380015d0061e24f39e518cb7bc13d26c0" + "map_sha256": "4f1f614ea8726dbac087696b9232261f9a8ef0f94541af7d1ee4cffbf4a45e66", + "protocol_sha256": "7187ab49b8b2cb5c5850e5f5e58a61946eb0b5e558e8e1ee95b4a304b10e6ab7" }, "status": "covered" }, @@ -1663,7 +1663,7 @@ "compiler_ir.seed_stream_map" ], "expected": { - "implementation_sha256": "e1f88676b849f78e198f2e4dffecf9a380015d0061e24f39e518cb7bc13d26c0", + "implementation_sha256": "7187ab49b8b2cb5c5850e5f5e58a61946eb0b5e558e8e1ee95b4a304b10e6ab7", "protocol": "legacy-v1", "streams": [ "build_model", @@ -1684,7 +1684,7 @@ }, "failures": [], "observed": { - "implementation_sha256": "e1f88676b849f78e198f2e4dffecf9a380015d0061e24f39e518cb7bc13d26c0", + "implementation_sha256": "7187ab49b8b2cb5c5850e5f5e58a61946eb0b5e558e8e1ee95b4a304b10e6ab7", "protocol": "legacy-v1", "streams": [ "build_model", @@ -2585,7 +2585,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "3dabec5cdccf3531f63b1196fb147892c4e15f06cae8fac1d2a58b68eccd7b4a" + "spec_sha256": "35d53c8677135f739af791ad517830d2239edf58363160ccfa097b5eaa575d73" } }, "report_schema_version": 3, @@ -2595,7 +2595,7 @@ "country": "us", "schema_id": "country_spec", "schema_version": 1, - "spec_sha256": "3dabec5cdccf3531f63b1196fb147892c4e15f06cae8fac1d2a58b68eccd7b4a" + "spec_sha256": "35d53c8677135f739af791ad517830d2239edf58363160ccfa097b5eaa575d73" }, "status": "pass" } diff --git a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py index a652a6ffdc..ecf0f15fe1 100644 --- a/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py +++ b/packages/microcosm-build/src/microcosm/build/spec_engine/inventory_coverage.py @@ -380,8 +380,10 @@ # microcosm#1259's recipient-share bound in puf_support moves both again. # microcosm#1261 moves both again: the PUF donor carries partnership and # S-corp line-32 shares as separate leaves. - "seed_map": "bcb012edd7fdd11af328df17ff2ce530912e903514691d330c604c09854c7e0a", - "seed_protocol": "e1f88676b849f78e198f2e4dffecf9a380015d0061e24f39e518cb7bc13d26c0", + # microcosm#1136 moves both again: scf_wealth's SCF bond_assets target + # adds U.S. savings bonds (savbnd). + "seed_map": "4f1f614ea8726dbac087696b9232261f9a8ef0f94541af7d1ee4cffbf4a45e66", + "seed_protocol": "7187ab49b8b2cb5c5850e5f5e58a61946eb0b5e558e8e1ee95b4a304b10e6ab7", "source_manifest": "dc3879886d2a69f20fb982a675d7fb322c0e4017afef6471be54b0ee3cbd2af6", "take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35", "tail": "565f0ceeadab69d3e96a886a00dd0305f7425fa3acde24d12ba48db2b37d5fc0", diff --git a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py index 02e37d567a..916ccd5288 100644 --- a/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py +++ b/packages/microcosm-build/tests/engine_free/shared/test_spec_engine_loader.py @@ -24,8 +24,10 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non # The ACS SSI disability-criteria stage (microcosm#1022) moves # ssi_disability_criteria's attested bytes. # The opt-in cross-fitted gate calibration moves the fit kernels' bytes. + # microcosm#1136's savings bonds in scf_wealth's bond_assets target move + # scf_wealth's attested bytes. assert first.spec_sha256 == ( - "d5c303a4ee85aa36b86757125147340f8c43871347cab072f9673b40857d062a" + "859352e6d4f1a23e99f08e508874795a80f49e353cb8a39520cfa3ddd9841c2e" ) second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b") diff --git a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py index 03566dbb06..09458a4f29 100644 --- a/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py +++ b/packages/microcosm-build/tests/engine_workflow/us/test_us_multispine_pool_tool.py @@ -353,7 +353,9 @@ def capture_equality(expected: object, actual: object) -> None: # The opt-in cross-fitted gate calibration in microcosm.fit.qrf moves it. # microcosm#1073's scf_wealth education-debt declaration moves it # through the bundle's source stages. - "spec_sha256": "3dabec5cdccf3531f63b1196fb147892c4e15f06cae8fac1d2a58b68eccd7b4a", + # microcosm#1136's savings bonds in scf_wealth's bond_assets target + # move it too. + "spec_sha256": "35d53c8677135f739af791ad517830d2239edf58363160ccfa097b5eaa575d73", }, }