Skip to content

Allow a UK local-area release on an accepted model mismatch (hold: needs María's routing call) - #699

Draft
MaxGhenis wants to merge 22 commits into
mainfrom
accept-regional-model-mismatch
Draft

MaxGhenis wants to merge 22 commits into
mainfrom
accept-regional-model-mismatch

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Require audited evidence for a UK regional release served on an accepted model mismatch.

This branch stacks #704 (da2ae8fb) into #699 (afee349d2) with a merge commit. The intended release order remains main → #704 → #699 → certification.

Invariants:

  • National certification never widens. The national dataset name/hash, model coverage and core checks remain separate from the regional exception.
  • An accepted area mismatch requires a reviewer reason and audited evidence bound to the exact dense cut URI, original manifest bytes, artifact identity/SHA-256, and exact target model package/version. Certification recomputes the comparison and refuses every dropped column. There is no dropped-column override.
  • Every defaulted input is recorded across every stored period, accounting for the country loader's input aliases. Free-text limitations and the dense cut's pre-fix VAT limitation survive Pydantic validation and are hashed with the bundle.
  • TRACE and execution receipts expose the full regional identity, acceptance, reason, input audit and limitations. TRACE preserves the record as a JSON-LD JSON literal; area receipts remain uncertified and identify their actual build model.
  • Re-certifying with --drop-regional-release removes the exception, regional manifest digest, area routes and dense artifact without changing the national certificate.

The comparison is ported from Microcosm #1348's tools/certify_uk_cut_in_policyengine_py.py and strengthened to inspect byte-verified H5 entity-table columns by period. scripts/audit_regional_input_surface.py produces the required JSON; certify-data --regional-input-surface-evidence consumes it with the accepted reason. The original regional manifest's raw-byte digest is retained.

Budget route: national microcosm-uk-2024-25-national-20261023T075039Z-a133f37a (2.147.2) and dense microcosm-uk-2024-25-dense-20261019T000432Z-ee5c2dbe (built on 2.132.6). The exact model-inventory comparison yields 16 added pure inputs, including salary_sacrifice_returned_to_income and local_bus_uncapped_single_fare; the complete list is documented. Actual dense-byte evidence must be generated by certification with authenticated access to the H5. This implementation job has no HF credential and does not certify that pair.

Required downstream refresh: update the dashboard's vendored tests/fixtures/w4/execution_receipt.v1.schema.json from this repository's regenerated schema.

Validation: 1,248 selected cases passed and two skipped across the UK run and three successful US metadata reruns. One unrelated US offline-import integration case was explicitly deselected. Formatting, lint, generated-schema equality and bundle checks pass. Mypy retains the same 24 baseline diagnostics, with zero errors in the new modules. Expanded validation was interrupted after 3,008 reported passes and five skips; it is not claimed complete. Details are recorded in .job/HANDOFF.md. Regression tests demonstrated failures before implementation. Leave this PR draft.

🤖 Generated with Claude Code

…ismatch

certify-data refuses a regional release that neither was built with nor
claims the pinned policyengine-uk. The only Microcosm local-area cut is on
2.132.6, a new one takes 2-13 hours plus a two-build sign-off, and area
receipts are uncertified anyway (the certificate covers the national
dataset only, #685). So each national re-cut on a newer policyengine-uk
had to drop area regions or wait for a dense rebuild.

--accept-regional-model-mismatch REASON (UK only) keeps the regional
release routed and records regional_certification in the bundle: basis
accepted_model_mismatch, both model versions, the reason and
area_receipts: uncertified. It refuses an empty reason, a regional release
that already covers the version, and a run without a regional release; the
core must still be covered. The national certificate is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis and others added 21 commits October 23, 2026 04:34
The note was a Subfleet job artifact, not part of the change. The hub
keeps a copy outside the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#704 dropped its job hand-off note. This merge takes that deletion and
also removes #699's own .job/HANDOFF.md and .job/PR_BODY.md: Subfleet
job artifacts, not part of the change. The hub keeps copies outside the
repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant