Skip to content
1 change: 1 addition & 0 deletions changelog.d/calibration-arm-wording.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The US builder's dense SSI fence text, which builds write into their manifests, and the `us_ssi_take_up_delivery_gate` docstring now name the builder's arms by flag: the fences apply to `--dense-default-dataset`, and the L0+refit arm (neither flag) and `--exact-k` keep hard enforcement. They no longer call the dense arm "diagnostic" or the L0+refit arm "the sparse certified default". The `calibrate_l0_refit` and `L0RefitResult` docstrings, and the rest of `solve.py`'s wording about the refit stage, say what the function returns instead of calling it the production path or its weights shipped. The generated US calibration contract's release modes are renamed to the builder's `dataset.default.method` values: `default_sparse_l0_refit` becomes `l0_refit`, `dense_diagnostic` becomes `dense_no_l0`, and `refit_contracts.default_sparse` becomes `refit_contracts.l0_refit`. The US release build rule now says which code uses `microcosm.build.holdout`, and that no held-out test compares a US national candidate with the incumbent. No flag, default, calibration, draw or dataset changes.
20 changes: 10 additions & 10 deletions docs/evidence/spec-engine/us-f0-coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"mode": "legacy_behavior",
"pointer_class": "all",
"pointer_count": 320,
"pointer_sha256": "49a153b065b59950d910f9e2bcfcd7005e5babaecf9b41b1cc9704a7f20dcc5b",
"pointer_sha256": "5336f77a10b2f0aa03f6bc221f3c5b8390adccaeed8ee3e7251292606a83a7fd",
"rationale": null,
"relative_sink_prefix": "/calibration_contract",
"source_prefix": "/authored/spec~1calibration.yaml",
Expand Down Expand Up @@ -771,7 +771,7 @@
"legacy_behavior": 14269
},
"multiple_primary_use_field_count": 0,
"pointer_inventory_sha256": "7765ab26649d67e3ae69a8b10af462fc7e7921ed88f681503aa766640f6cf821",
"pointer_inventory_sha256": "65c75e48867b39bc443891c2bada2fcc6eed80b2c1fa1bf5ced14ae862bad47f",
"resolved_binding_field_count": 9786,
"unused_field_count": 0
},
Expand Down Expand Up @@ -1642,13 +1642,13 @@
"compiler_ir.node_slices"
],
"expected": {
"map_sha256": "6474719c2fbd765114d104118fc9f265df4694c25fab6ddde6cf5974d069b522",
"protocol_sha256": "d3a0baf888c2ac5a9d10980ec725f6cb4d1ca7de5f5e6624297858341c1a2035"
"map_sha256": "d756dc67535c04788e605bedb4cd6721cf715e5f5ce4be73d9b27420a61b3d50",
"protocol_sha256": "2c57cbfb9dd0f132f9b5751eb8bc303f4b7e37430cd5e0b155aac0b0b8eaa42e"
},
"failures": [],
"observed": {
"map_sha256": "6474719c2fbd765114d104118fc9f265df4694c25fab6ddde6cf5974d069b522",
"protocol_sha256": "d3a0baf888c2ac5a9d10980ec725f6cb4d1ca7de5f5e6624297858341c1a2035"
"map_sha256": "d756dc67535c04788e605bedb4cd6721cf715e5f5ce4be73d9b27420a61b3d50",
"protocol_sha256": "2c57cbfb9dd0f132f9b5751eb8bc303f4b7e37430cd5e0b155aac0b0b8eaa42e"
},
"status": "covered"
},
Expand All @@ -1663,7 +1663,7 @@
"compiler_ir.seed_stream_map"
],
"expected": {
"implementation_sha256": "d3a0baf888c2ac5a9d10980ec725f6cb4d1ca7de5f5e6624297858341c1a2035",
"implementation_sha256": "2c57cbfb9dd0f132f9b5751eb8bc303f4b7e37430cd5e0b155aac0b0b8eaa42e",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand All @@ -1684,7 +1684,7 @@
},
"failures": [],
"observed": {
"implementation_sha256": "d3a0baf888c2ac5a9d10980ec725f6cb4d1ca7de5f5e6624297858341c1a2035",
"implementation_sha256": "2c57cbfb9dd0f132f9b5751eb8bc303f4b7e37430cd5e0b155aac0b0b8eaa42e",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand Down Expand Up @@ -2585,7 +2585,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "4e2b6c19661079b1c75ab694d043c76d22f52465e7b01d37dc499a3611ca6d8c"
"spec_sha256": "372858d059a129d7b3bcbd7ac2dbdc314742345bd35aaff8d53943e737c98f84"
}
},
"report_schema_version": 3,
Expand All @@ -2595,7 +2595,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "4e2b6c19661079b1c75ab694d043c76d22f52465e7b01d37dc499a3611ca6d8c"
"spec_sha256": "372858d059a129d7b3bcbd7ac2dbdc314742345bd35aaff8d53943e737c98f84"
},
"status": "pass"
}
21 changes: 17 additions & 4 deletions docs/us-release-build-rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,23 @@ frozen comparison register, both rescored on it, with strict improvement
`tools/build_us_fiscal_refresh_release.py`). That gate runs on the `--exact-k`
arm only, and that arm takes a pool manifest, which the release tool refuses
to combine with `--base-h5`. A `--base-h5` release runs no improvement gate.
Main has no US held-out test: the rotated-fold holdout in
`microcosm.build.holdout` is imported by the UK runtime and UK tools only. So a
US release says it beats the incumbent on the frozen register, and says it beats
it on held-out cells only once a US holdout exists and has run.
Main has no held-out test that compares a US national candidate with the
incumbent. Among the packages and tools, only the UK runtime
(`uk_runtime/local_rowwise.py`) runs the rotated folds in
`microcosm.build.holdout`; an ACS local-area experiment
(`experiments/us-acs-local-l2-basis-20260928/prepare.py`) also uses them. US
package and tool code imports only the module's keyed-hash helpers. The ACS
local-area tools (`tools/us_acs_local_cd_surface.py` and
`tools/us_acs_local_county_surface.py`) use them to keep blocks of district and
county SOI targets out of the local-area solve, then score those blocks against
a pro-rata baseline; the scores are marked report-only and refuse nothing.
`us_runtime/support_mix.py` uses them to split targets and to order ACS
households for the support-mix bake-off. The national builder imports neither
helper. Its three
`*_holdout.json` reports compare one build with outside benchmarks and never
refuse a release. So a US national release says it beats the incumbent on the
frozen register, and says it beats it on held-out cells only once a national
holdout exists and has run.

Publication stays a human step. Since the US repository's switch to
`releases.json`, the release tool writes each build to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _path_inventory(rows: Sequence[tuple[str, object]]) -> tuple[int, str]:
),
"calibration": (
320,
"49a153b065b59950d910f9e2bcfcd7005e5babaecf9b41b1cc9704a7f20dcc5b",
"5336f77a10b2f0aa03f6bc221f3c5b8390adccaeed8ee3e7251292606a83a7fd",
),
"catalog_columns": (
1_593,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,11 @@
# move both again; no valid input's draw changes. microcosm#1617's refusal
# of a weightless class in the balanced gate's weights moves both again;
# no fit reached it, and no draw changes.
"seed_map": "6474719c2fbd765114d104118fc9f265df4694c25fab6ddde6cf5974d069b522",
"seed_protocol": "d3a0baf888c2ac5a9d10980ec725f6cb4d1ca7de5f5e6624297858341c1a2035",
# microcosm#1641 moves both again: it rewords docstrings and a comment in
# solve and the delivery gate's docstring in ssi_take_up, which now names
# the builder's arms by flag; no draw, RNG rule, QRF target or solve changes.
"seed_map": "d756dc67535c04788e605bedb4cd6721cf715e5f5ce4be73d9b27420a61b3d50",
"seed_protocol": "2c57cbfb9dd0f132f9b5751eb8bc303f4b7e37430cd5e0b155aac0b0b8eaa42e",
"source_manifest": "dc3879886d2a69f20fb982a675d7fb322c0e4017afef6471be54b0ee3cbd2af6",
"take_up": "9522ce40f7dea569312dd7a7beb474e5a5afadd2f1e10cb5876534c3ef623d35",
"tail": "565f0ceeadab69d3e96a886a00dd0305f7425fa3acde24d12ba48db2b37d5fc0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
"refit_contracts": {
"type": "object",
"additionalProperties": false,
"required": ["default_sparse", "exact_k"],
"required": ["l0_refit", "exact_k"],
"properties": {
"default_sparse": {"$ref": "#/$defs/refit_contract"},
"l0_refit": {"$ref": "#/$defs/refit_contract"},
"exact_k": {"$ref": "#/$defs/refit_contract"}
}
},
Expand Down Expand Up @@ -577,23 +577,23 @@
"type": "object",
"additionalProperties": false,
"required": [
"default_sparse_l0_refit",
"dense_diagnostic",
"l0_refit",
"dense_no_l0",
"exact_k_or_full_pool_refit"
],
"properties": {
"default_sparse_l0_refit": {
"l0_refit": {
"type": "object",
"additionalProperties": false,
"required": ["kernel", "solver_ref", "selection_contract_ref", "refit_contract_ref"],
"properties": {
"kernel": {"const": "kernel:calibrate_l0_refit"},
"solver_ref": {"const": "solver"},
"selection_contract_ref": {"const": "solver.l0_contract"},
"refit_contract_ref": {"const": "refit_contracts.default_sparse"}
"refit_contract_ref": {"const": "refit_contracts.l0_refit"}
}
},
"dense_diagnostic": {
"dense_no_l0": {
"type": "object",
"additionalProperties": false,
"required": ["kernel", "solver_ref", "l0_mode", "refit_contract_ref"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ solver:
l1_lambda: 0.0
l2_anchor_weights: null
refit_contracts:
default_sparse:
l0_refit:
support: selection_weight_above_prune_relative_atol
subset_source: selection_stage_frame
starting_weights: selection_stage_calibrated_weights
Expand All @@ -222,12 +222,12 @@ refit_contracts:
source: run_request
default: null
release_modes:
default_sparse_l0_refit:
l0_refit:
kernel: kernel:calibrate_l0_refit
solver_ref: solver
selection_contract_ref: solver.l0_contract
refit_contract_ref: refit_contracts.default_sparse
dense_diagnostic:
refit_contract_ref: refit_contracts.l0_refit
dense_no_l0:
kernel: kernel:calibrate
solver_ref: solver
l0_mode: none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1640,16 +1640,20 @@ def us_ssi_take_up_delivery_gate(
per-target knob (microcosm#492). The under-18 band stays fenced pending
microcosm#453/#509 and is reported in the details, never enforced.

``enforcement_fences`` fences normally-enforced bands for a specific
ARM with a documented adjudication (the under-18 pattern extended):
on the dense full-pool arm, microcosm#508 delivered-weight recomputes
have not landed the adult pair in band on either observed frame —
``enforcement_fences`` fences normally-enforced bands for one builder
arm with a documented adjudication (the under-18 pattern extended).
The US builder passes them on its ``--dense-default-dataset`` arm
only: on that arm's two observed full-pool frames, microcosm#508
delivered-weight recomputes have not landed the adult pair in band —
P2's clean one-retry record, and P3's delivered-basis chain that
``ssi_take_up_prior_basis_from_artifact`` now refuses outright
(microcosm#566/#567) — so its adult bands ship in the scorecard as
known boundaries rather than enforced contracts. The fence text
rides each fenced row; the sparse certified default passes no
fences and keeps hard enforcement.
known boundaries rather than enforced contracts. The builder keys
the fences on the flag alone, so a dense run whose selection source
first cuts the pool is fenced too. The fence text rides each fenced
row. The L0+refit arm (neither ``--exact-k`` nor
``--dense-default-dataset``) and the ``--exact-k`` arm pass no fences
and keep hard enforcement.
"""

expected_targets = _normalize_targets(targets)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
ROOT = _TEST_PATHS.repository
US_ROOT = ROOT / "packages/microcosm-build/src/microcosm/build/us"
CANONICAL_LEGACY_PROJECTION_SHA256 = (
"b289d8a5dd4d82ba311f71bc9909e2f2c4829566e7ff6226e517ef5f74eceeba"
"025ed1037145ceb73230352560f045e58f610995bc6b21bcf8b3f835b727fb33"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ def test_semantic_hash_has_golden_vector_and_surface_separation(tmp_path) -> Non
# attested bytes.
# The fit input checks from the microimpute bug-parity audit move the fit
# kernels' bytes too.
# microcosm#1641's docstring and comment wording in solve and ssi_take_up
# moves it again.
assert first.spec_sha256 == (
"d4fc68aa1ceee27700b15e89f668b3368d361ce9f9adbc5e506aed00ee9b27bc"
"cb9742d5089eddb8783ee1cb890206b33a35efe5ff572656dbd58a1b95ea1e28"
)

second_root = _rich_minimal(tmp_path / "xy", note="second", store="local:b")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,9 @@ def test_the_run_refuses_skipped_checks_left_files_before_any_side_effect() -> N
def test_dense_ssi_fences_cover_the_enforced_bands_and_cite_the_adjudication() -> None:
"""microcosm#566/#567: the dense-arm fence table must cover exactly the
normally-enforced bands, and every fence must carry the recompute
adjudication, its re-adjudication trigger, and the sparse contrast —
a fence without its documented reason is forbidden."""
adjudication, its re-adjudication trigger, and the arms that keep hard
enforcement, each named by its builder flag — a fence without its
documented reason is forbidden."""
from microcosm.build.us_runtime.ssi_take_up import (
US_SSI_TAKE_UP_ENFORCED_BAND_KEYS,
)
Expand All @@ -392,7 +393,12 @@ def test_dense_ssi_fences_cover_the_enforced_bands_and_cite_the_adjudication() -
assert "microcosm#566/#567" in text, band
assert "microcosm#508" in text, band
assert "Re-adjudicates" in text, band
assert "sparse certified" in text, band
assert "--dense-default-dataset arm" in text, band
assert "The L0+refit and --exact-k arms pass no fences" in text, band
# The text names arms by builder flag, not by the retired
# "dense diagnostic" and "sparse certified default" labels.
assert "diagnostic arm" not in text, band
assert "sparse certified" not in text, band
# The adjudication must claim only what the artifacts support:
# recomputes failed to land the pair in band — NOT a proven
# periodic map (sol round-1 blocker 3). The refusal scans the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -935,8 +935,8 @@ def test_delivery_gate_fences_override_enforcement_with_their_adjudication() ->
**{"18_64": 80.0, "65_plus": 90.0}, # both far outside the envelope
)
fences = {
"18_64": "Fenced for the dense diagnostic arm (microcosm#566/#567).",
"65_plus": "Fenced for the dense diagnostic arm (microcosm#566/#567).",
"18_64": "Fenced for the --dense-default-dataset arm (microcosm#566/#567).",
"65_plus": "Fenced for the --dense-default-dataset arm (microcosm#566/#567).",
}
gate = us_ssi_take_up_delivery_gate(
delivered, targets=_TARGETS, enforcement_fences=fences
Expand All @@ -959,7 +959,7 @@ def test_delivery_gate_fences_override_enforcement_with_their_adjudication() ->

def test_delivery_gate_partial_fence_keeps_the_other_band_enforced() -> None:
_, _, _, diagnostics = _assigned()
fences = {"65_plus": "Fenced for the dense diagnostic arm (microcosm#566)."}
fences = {"65_plus": "Fenced for the --dense-default-dataset arm (microcosm#566)."}
# The un-fenced band still hard-fails on a miss...
missed = _delivered(diagnostics, **{"18_64": 80.0, "65_plus": 90.0})
gate = us_ssi_take_up_delivery_gate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ def capture_equality(expected: object, actual: object) -> None:
# microcosm#922's county facts pin, two declared legacy resources,
# moves it.
# microcosm#1543's fit input checks in microcosm.fit.qrf move it again.
"spec_sha256": "4e2b6c19661079b1c75ab694d043c76d22f52465e7b01d37dc499a3611ca6d8c",
# microcosm#1641 moves it again: docstring and comment wording in
# solve and ssi_take_up, and the calibration contract's renamed modes.
"spec_sha256": "372858d059a129d7b3bcbd7ac2dbdc314742345bd35aaff8d53943e737c98f84",
},
}

Expand Down
Loading
Loading