Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4317140
Add source-backed native SPM role enrichment with release verification
MaxGhenis Sep 9, 2026
63c8982
Merge remote-tracking branch 'origin/main' into max/spm-native-role-p…
MaxGhenis Sep 9, 2026
acfe2b1
Bind SPM enrichment publication to verified dataset and source identi…
MaxGhenis Sep 9, 2026
18ca76e
Add exact-household-count UK dataset candidates (#355)
juaristi22 Sep 5, 2026
a53236f
Size runs keep their dense reference and selection as evidence; --sel…
juaristi22 Sep 8, 2026
115bc91
Carry the exact-count feasibility measurement with the size refusal a…
juaristi22 Sep 8, 2026
544f957
Evaluate a size candidate with one command: size_evaluation library, …
juaristi22 Sep 8, 2026
85647cf
Receipts for the #355 size experiment: Step 0 CI fix, inputs, spine-o…
juaristi22 Sep 8, 2026
b2d0a77
Skip the H5-reading size and evaluation tests where pytables is absen…
juaristi22 Sep 8, 2026
6f93acc
Make the exact-count certainty threshold a recorded candidate-run kno…
juaristi22 Sep 8, 2026
ba2f39b
Refuse unsupported nonzero targets by name before the size selection …
juaristi22 Sep 8, 2026
659489c
Time downstream steps portably: an in-process rusage shim instead of …
juaristi22 Sep 8, 2026
97fd9c0
Receipts: the 45,800 smoke's by-name refusal (two unsupported UC paym…
juaristi22 Sep 8, 2026
48264f8
Sign two zero-support UC payment-band exclusions for childless couple…
juaristi22 Sep 8, 2026
96e03a3
Receipts: the two signed UC payment-band exclusions and the smoke rel…
juaristi22 Sep 8, 2026
416dc1b
Receipts: smoke3's refusal on spine-p, the moving feasible count, and…
juaristi22 Sep 8, 2026
c2f6c53
Receipts: smoke4 through the whole size pipeline, and the private_ren…
juaristi22 Sep 8, 2026
f3c2a59
Step 30 takes the frozen scoring register as an input; candidate runs…
juaristi22 Sep 8, 2026
50c0b22
Size selection budgets on open-probability mass, not the nonzero coun…
juaristi22 Sep 8, 2026
b0b5fff
Bind the PIPR private-rent price level as a linear total: 12 x mean m…
juaristi22 Sep 8, 2026
4948f7e
Receipts: the evaluation plumbing pass on smoke4, the two fixes ruled…
juaristi22 Sep 8, 2026
661e41f
Receipts: mass-basis and rent-fix commits, the composed-surface dry r…
juaristi22 Sep 8, 2026
8fafc79
Receipts: S2 refused at the draw after 4.8 h; feasibility numbers, th…
juaristi22 Sep 8, 2026
901f8ff
Stop the size selection's L0 search on the draw's own feasibility and…
juaristi22 Sep 9, 2026
586a433
Receipts: P50 (55k at pi_hi 0.5) complete, light evaluation filled in…
juaristi22 Sep 9, 2026
0a76863
Report solver progress from the UK doctrine solve: epoch losses, budg…
juaristi22 Sep 9, 2026
5bd9650
Receipts: P95b search trace (ten probes to a drawable 0.95 design) (#…
juaristi22 Sep 9, 2026
b3090b2
Receipts: P95b results, the pre-registered table and the 0.95-vs-0.5 …
juaristi22 Sep 9, 2026
7de1690
Receipts: heavy evaluation steps on both 55k runs, the frozen/recompu…
juaristi22 Sep 9, 2026
e3bd5c5
Re-pin the spec-engine identities, the H1 calibrate fixture and the b…
juaristi22 Sep 9, 2026
bd357d3
Receipts: rebase onto main, pin re-cut, engine lock 2.97.0 and its co…
juaristi22 Sep 9, 2026
ad519c2
Correct the PIPR census note (314 rent cells bind, 47 stay deferred);…
juaristi22 Sep 9, 2026
c95c175
Receipts: T6 replays not measurable against the dense file on this ma…
juaristi22 Sep 9, 2026
b845025
Receipts: eFRS legs (T3/T4/T5 on one engine for four files) and the T…
juaristi22 Sep 9, 2026
c2ee134
Address Vahid's review of #877: doctrine lock on resume, stale-checkp…
juaristi22 Sep 9, 2026
9b155c9
Share publication preflight checks and verify certified uploads
MaxGhenis Sep 9, 2026
48dc22f
Cancel outdated PR CI runs while preserving main pushes
hua7450 Sep 9, 2026
1bdd644
Re-pin the field-usage ledger counts moved by attesting gates and ini…
juaristi22 Sep 9, 2026
3ada98f
Classify native SPM enrichment in CI inventories
MaxGhenis Sep 9, 2026
b9e0d24
Merge remote-tracking branch 'origin/main' into max/spm-native-role-f…
MaxGhenis Sep 9, 2026
3ccdd01
Fix source enrichment publisher review gaps
MaxGhenis Sep 9, 2026
69b802a
Keep SPM rollout journal outside the producer source change
MaxGhenis Sep 9, 2026
141bfac
Merge pull request #877 from PolicyEngine/uk-dataset-sizes-355
juaristi22 Sep 10, 2026
45231f9
Merge pull request #899 from hua7450/fix/pr-ci-concurrency-897
juaristi22 Sep 10, 2026
f49ad84
fix(uk): align CGT with observed FY2024-25 individual targets
juaristi22 Sep 9, 2026
b36d796
Guard CGT export integration tests on optional HDF backends
juaristi22 Sep 9, 2026
ddaff54
Document national feed integration and historical CGT fit provenance
juaristi22 Sep 9, 2026
188a654
Fix duplicate national selector key after rebase
juaristi22 Sep 9, 2026
cb2495b
Address CGT observed-year review findings
juaristi22 Sep 9, 2026
758afb6
Normalize public CGT evidence CSV line endings
juaristi22 Sep 9, 2026
5a57d8e
Integrate merged UK prerequisites and refresh CGT review evidence
juaristi22 Sep 10, 2026
240b272
Clarify CGT evidence lineage after CI scheduling rebase
juaristi22 Sep 10, 2026
0afb123
Merge pull request #889 from PolicyEngine/uk-cgt-observed-year-875
juaristi22 Sep 10, 2026
245a0e2
Bind UK census households from Chronicle and map NI Data Zones with N…
juaristi22 Sep 9, 2026
6a3a8f2
Address Vahid's review of #900 and Max's source findings (#887)
juaristi22 Sep 10, 2026
21af416
Integrate current Microcosm main with native SPM source enrichment
MaxGhenis Sep 10, 2026
0d978f2
Approve the branch's uv.lock digest for the primary-QRF worker identi…
juaristi22 Sep 10, 2026
6f7571e
Merge pull request #900 from PolicyEngine/uk-census-households-chroni…
juaristi22 Sep 10, 2026
f5c5367
Integrate canonical SPM sources with current Microcosm main
MaxGhenis Sep 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
pull_request:
branches: [main]

# Cancel outdated PR runs; give each main push its own independent group.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
changes:
runs-on: ubuntu-latest
Expand Down
26 changes: 26 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ shard's real wheel, install into a clean uv-export-constrained venv, assert
the wheel/import boundary and spec digests, and run the suite against installed
wheels.

New commits to a PR cancel older unfinished CI runs for that same PR.
Each main-push run has a unique concurrency group, so all main-push runs
remain independent and can finish validating their merged changes.

`requires_us` and `requires_uk` are registered pytest markers. Mark new tests
that need a live PolicyEngine engine with the appropriate marker; the root
collection hook skips them when that engine is absent, and the marker also
Expand Down Expand Up @@ -80,6 +84,22 @@ build recorded staging telemetry that never reached its repo
publishes without the flag. Never publish or promote artifacts as a side
effect of another task.

The US native-SPM-role source-enrichment lane is a separate release type:
`tools/build_us_spm_role_enrichment.py` creates a local candidate from the exact
reviewed BuildP parent, preserving original variables and inherited schema-5
calibration evidence. It does not run calibration or relax schema 6 for ordinary
releases. `microcosm.data.source_enrichment` validates candidates and records
actual native-loader compatibility in a separate bundle. The regular publisher
requires `--parent-h5` and the four tested country/Core/wrapper/calculator wheels; `--preflight-only`
runs the same contract and local publisher preparation (file paths, artifact
hashes, revision/tag pins and latest-pointer eligibility), without constructing
a Hub client or publishing. Supplying `--parent-h5` or `--compatibility-wheel`
for a release that is not a source enrichment is an error, including preflight
and evidence-tier requests. See
[the source-enrichment runbook](docs/us-native-spm-role-source-enrichment.md).
Root's canonical-model acceptance and publication authorization remain separate
from this producer-native-input receipt.

A US release or release-gate preflight that receives a multispine pool through
`--base-h5` must authenticate its sibling terminal manifest. A current stacked
pool whose terminal battery is red remains fail-closed unless the operator
Expand All @@ -106,3 +126,9 @@ with the journal pointing to them.
Update this guide in the same PR whenever the workspace layout, test
commands, or release flow change. If you find it contradicting the repo,
trust the repo and fix this file.

UK size experiments use `tools/build_uk_rowwise_candidate.py --dataset-households`
with the same pool inputs as the dense candidate. The flag changes exported
support, not clone K. Sizes remain candidate-only until their matched comparison
and promotion scorecard are adjudicated; see
[the size plan](docs/uk-dataset-size-plan-355.md).
3 changes: 3 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ assembled/transferred/simulated stage boundaries bind the stack manifest,
fraction, seed, realized counts, and clone controls, so a smaller rung or a
different draw cannot reuse another build's evidence.

Every bound UK local calibration family compiles from the sha-pinned Chronicle
consumer feed; geography ladders assign rows and provide diagnostics only.

After gap-fill, one PUF QRF pass and the clone-2 capital-gains-tail operator
run over both survey origins. Publication is terminally gated by complete
declared-input coverage and a live-digested, explicit per-column by-origin
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ normal `uv run pytest` suite; the real-H5 mode above is a local/runbook step.

## Releasing & alerts

The [native SPM role source-enrichment lane](docs/us-native-spm-role-source-enrichment.md)
creates a new US H5 from the exact reviewed BuildP parent, preserves its original
variables and schema-5 calibration evidence, and requires fresh country/wrapper
compatibility checks. It has a local candidate builder and uses the regular
publisher's contract with `--parent-h5` and `--preflight-only`.

Standard publication uploads the locally built `releases/<id>/` artifacts to
the Hugging Face dataset, tags the release, and updates `latest.json`. It runs
on the build machine (it needs the freshly built H5), so it isn't a CI step:
Expand Down
9 changes: 9 additions & 0 deletions changelog.d/875-cgt-observation-year.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Measure CGT in FY2024–25 while retaining the 2025 calibration index and 2024
exported data. Pin individual HMRC gains, taxpayer count and liability facts;
retain the replaced OBR cash forecast as optional diagnostic provenance with
explicit availability. Retire its obsolete fit exemption, preserve its signed
history, update live compile-parity receipts and publish aggregate fit evidence.

Retain the merged upstream claimant-role graph prerequisite without duplicate
commits. Compose the retired fit exemptions and document that the recorded
national comparison predates main's changed fitting surface and gate disposition.
3 changes: 3 additions & 0 deletions changelog.d/native-spm-role-inventory.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Classify the native SPM role source reader and bounded raw HDF enrichment writer
in the existing runtime and serialization inventories, retaining fail-closed
checks for unreviewed modules and writers.
4 changes: 4 additions & 0 deletions changelog.d/native-spm-role-source-enrichment.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Add a reproducible native SPM role enrichment of the reviewed US BuildP H5,
with exact preservation of existing variables, pinned Census reconstruction,
explicit inherited schema-5 calibration evidence, and replayed country/wrapper
compatibility gates in the release publisher.
1 change: 1 addition & 0 deletions changelog.d/source-enrichment-publisher-arguments.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reject enrichment-only publisher arguments for ordinary releases and exercise actual builder manifests through certification and publication.
1 change: 1 addition & 0 deletions changelog.d/uk-census-households-chronicle-887.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bind UK constituency and local-authority census household targets from the pinned Chronicle feed, and replace Northern Ireland's postcode-inferred constituency mapping with NISRA's published DZ2021-to-PARLCON24 lookup. The NISRA lookup reader declares openpyxl through the `microcosm-build[uk]` extra, and the households-only candidate scope applies the same per-grain A15 factor as the joint scope.
6 changes: 6 additions & 0 deletions changelog.d/uk-dataset-sizes-355.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Add exact-household-count UK rowwise candidates using contribution-informed L0 initialization, protected target carriers, fixed-size sampling and refitting. Preserve the dense pool doctrine and local gates, export compact linked entities, and record selection provenance without promoting candidates to the certified dense release or changing dataset defaults.
A size run also ships the dense joint solve it was cut from (`dense_reference_diagnostics.csv`, a `dense_reference` summary under `solve.dataset_size`) and the selection itself (`dataset_size_selection.csv`: pool row, design weight, inclusion probability, Horvitz–Thompson baseline, refit weight), and `--selection-seed` re-draws the selection on one pool and one dense reference. The exact-count draw's certainty threshold is a recorded candidate-run knob (`--selection-pi-hi`, default 1), and a refused draw carries the measured gate mass and the feasible alternatives instead of a bare error.
Compose each bound PIPR mean monthly private rent into an annual total using 12 months and the matching A17-uprated private-renter household count, with the inputs and adjudication recorded in the cross-grain receipt.
The size selection's L0 budget search stops only on a probe whose gate probabilities admit the exact-count draw at the requested certainty threshold (`feasible_draw_pi_hi`, verdicts from the new `exact_k_design_feasibility`), recording every probe in the size receipt; a size run checkpoints the dense solve and the search before the draw (`size_selection_checkpoint.{npz,json}`) and `--resume-size-checkpoint` continues at the draw on the re-derived pool after verifying the checkpoint's identity, rebuilding both results through the new `rebuild_calibration_result`.
The UK doctrine solve reports progress through the calibrator's callback seam: a loss line every hundred epochs of the dense solve, each budget probe and the refit, one line per finished probe with its drawability verdict (new `budget_probe` and `budget_search_done` events), and one when the search stops; the candidate driver writes them to stderr.
After review: the checkpoint identity carries the solve doctrine and a resume asserts the restored options against it; a stale checkpoint in `--out` refuses before the solve; `microcosm.calibrate.gates` and `microcosm.calibrate.initialization` join the attested seed-protocol sources and the pre-best-iterate oracle runs with a frozen gate module; the size receipt reports `certainty_share`, `boundary_draws` and `zero_target_rows`; the manifest distinguishes the realized stretch against the refit's reference from the stretch against the pool design.
32 changes: 16 additions & 16 deletions docs/evidence/spec-engine/us-f0-coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,8 @@
"legacy_sinks": [],
"mode": "compiler_semantic",
"pointer_class": "all",
"pointer_count": 824,
"pointer_sha256": "7537385c3fd399a2dbb7dcd8ed7cf1ff2481ed336db621eafcbfd741d5792f40",
"pointer_count": 826,
"pointer_sha256": "7ff2d5d1c2fd8026d17a57244f969dc0e9625a9e47304b693ad15df329041282",
"rationale": null,
"relative_sink_prefix": null,
"source_prefix": "/resolved/seed_protocol",
Expand Down Expand Up @@ -772,21 +772,21 @@
"verifier": "vintages"
}
],
"configuration_field_count": 42154,
"consumed_field_count": 42154,
"configuration_field_count": 42156,
"consumed_field_count": 42156,
"generation0_effect_counts": {
"legacy_behavior": 38476,
"no_generation0_effect": 3678
"no_generation0_effect": 3680
},
"mode_counts": {
"compiler_semantic": 27715,
"compiler_semantic": 27717,
"front_end_validation": 348,
"identity_only": 103,
"legacy_behavior": 13988
},
"multiple_primary_use_field_count": 0,
"pointer_inventory_sha256": "3fc6b9480ea81b9635bd0db56e180c2daf32a5cd2006a70d350586c570f96754",
"resolved_binding_field_count": 9770,
"pointer_inventory_sha256": "2c0423a08dc16bf5f142134804a1a6545f887e32ca5c991c856a2f8bcfaea0f0",
"resolved_binding_field_count": 9772,
"unused_field_count": 0
},
"inventory_coverage": {
Expand Down Expand Up @@ -1656,13 +1656,13 @@
"compiler_ir.node_slices"
],
"expected": {
"map_sha256": "c94a5af8eb24866156b8cd4b77b93dc497b7df5b025204fe1022f80b1d8446ea",
"protocol_sha256": "1c53f1d9b3e185a41181fbe861f9b08d56c83880710fd1e18d7a4ceb5d6a354e"
"map_sha256": "87ba50531d9fa6683096ecb39a31655b331ab8acff3a5876c2f62b33562a0885",
"protocol_sha256": "fd3e4b06f11be4e8c13ea19fef9469ab95cbbe3e2dcfce351e860dd3e00709e4"
},
"failures": [],
"observed": {
"map_sha256": "c94a5af8eb24866156b8cd4b77b93dc497b7df5b025204fe1022f80b1d8446ea",
"protocol_sha256": "1c53f1d9b3e185a41181fbe861f9b08d56c83880710fd1e18d7a4ceb5d6a354e"
"map_sha256": "87ba50531d9fa6683096ecb39a31655b331ab8acff3a5876c2f62b33562a0885",
"protocol_sha256": "fd3e4b06f11be4e8c13ea19fef9469ab95cbbe3e2dcfce351e860dd3e00709e4"
},
"status": "covered"
},
Expand All @@ -1677,7 +1677,7 @@
"compiler_ir.seed_stream_map"
],
"expected": {
"implementation_sha256": "1c53f1d9b3e185a41181fbe861f9b08d56c83880710fd1e18d7a4ceb5d6a354e",
"implementation_sha256": "fd3e4b06f11be4e8c13ea19fef9469ab95cbbe3e2dcfce351e860dd3e00709e4",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand All @@ -1698,7 +1698,7 @@
},
"failures": [],
"observed": {
"implementation_sha256": "1c53f1d9b3e185a41181fbe861f9b08d56c83880710fd1e18d7a4ceb5d6a354e",
"implementation_sha256": "fd3e4b06f11be4e8c13ea19fef9469ab95cbbe3e2dcfce351e860dd3e00709e4",
"protocol": "legacy-v1",
"streams": [
"build_model",
Expand Down Expand Up @@ -2599,7 +2599,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "8b1546bc97b540afd525fe88f36a315de18b4d57bd9fab73035dacd8962e302e"
"spec_sha256": "35a02b6b19c921faba1407d441e0b9d9623c496e2cd5b711be014def281a95c6"
}
},
"report_schema_version": 3,
Expand All @@ -2609,7 +2609,7 @@
"country": "us",
"schema_id": "country_spec",
"schema_version": 1,
"spec_sha256": "8b1546bc97b540afd525fe88f36a315de18b4d57bd9fab73035dacd8962e302e"
"spec_sha256": "35a02b6b19c921faba1407d441e0b9d9623c496e2cd5b711be014def281a95c6"
},
"status": "pass"
}
Loading
Loading