diff --git a/changelog.d/1095-certify-against-current-build.changed.md b/changelog.d/1095-certify-against-current-build.changed.md new file mode 100644 index 0000000000..243c357f72 --- /dev/null +++ b/changelog.d/1095-certify-against-current-build.changed.md @@ -0,0 +1 @@ +UK cuts check and certify their candidate against the current build of their own line, as the Hub's `releases.json` names it, instead of the enhanced FRS (microcosm#1095, now that the migration in microcosm#665 is complete): national against national, dense against dense. A cut resolves its reference once, refusing a build that is withdrawn or not certified, and keeps its record, the dataset and the evidence the gates read from it with the run (`tools/run_uk_cut.py`'s new `reference` step, or `tools/resolve_uk_reference.py` outside it). The comparison of the candidate's target fit with the reference's is a report with no verdict (`score_vs_reference.json`), built by one country-neutral head-to-head module that the US comparison tool now shares. The input-mass gate compares each column's total with the reference's at the reference's own solved weights, within the largest relative drift measured between the last two national builds, and no column may lose more than 90% of the reference's total (the largest drop between those builds, rounded up for headroom), since a symmetric tolerance above one fails no drop short of zero; it withholds the figures of the columns fewer than three source households carry. The export-surface gate compares with the reference's exported columns, so the declared extras shrink from 250 to the 32 the current national build does not export (the dense line's geography and clone columns, and six that microcosm#1550 adds), and an entry the reference now carries is reported as redundant rather than failed. The input-coverage gate requires every loader input the reference carries, measured by the gate's own rule, less the coverage manifest's reviewed exclusions. The gross receipts that microcosm#1550 stops writing, which the current builds still carry, are excluded against those builds in all three gates until a promotion moves the reference past them. The trading allowance full-relief carrier that five SPI rows filter on since microcosm#1439, which the current national build does not carry, is signed as unresolvable on that build for the comparison, as microcosm#1572 signed it on the enhanced FRS. A cut can pin a listed build as its reference (`--reference-build`) for a line with no current build, recorded as pinned, and each national certification records the change since a fixed baseline, chained from its reference's record without loading the baseline, listing every column that has left the chain and recording a chain that restarts. The certification and the release contract move to schema 2 with a `reference` block, the dense build takes `--input-mass-reference` and `--reference-surface` from its own line's current build, and the frozen enhanced-FRS facts stay only as a historical record. diff --git a/docs/gate-battery-contract.md b/docs/gate-battery-contract.md index 10662fa269..b8ffb08f7d 100644 --- a/docs/gate-battery-contract.md +++ b/docs/gate-battery-contract.md @@ -126,7 +126,8 @@ Canonical artifact keys: | `coverage_engine`, `coverage_manifest` (optional override) | the UK national build | `release_input_coverage`, both phases | | `build_stage_names` | the UK national build preflight | `source_coverage` | | `parity_evidence` | the UK national build | `export_surface`, `target_surface`, `target_fit` | -| `input_mass_reference` | the UK national build, when the licensed sidecar is supplied | `input_mass_parity` (UK override) | +| `reference_surface` | the UK release cut (`--reference-surface`), and the dense build when given one | `export_surface` (the reference's exported columns), `release_input_coverage` (the inputs it carries), microcosm#1095 | +| `input_mass_reference` | the UK release cut and the dense build: the current build's totals and carriers, from the cut's reference step | `input_mass_parity` (UK override) | | `reviewed_input_mass_exclusions` (optional override) | the UK national build | `input_mass_parity` (UK override) | | `uk_area_support_summary`, `exclusions_evaluated_on` | the UK local rowwise build | `area_support` (UK binding; reviewed exclusions state the area's figures beside the floors it misses, and stale entries fail; they are gate-only and defer none of the area's cells, microcosm#1301) | | `local_target_diagnostics`, `exclusions_evaluated_on` | the UK local rowwise build | `per_family_fit` (the diagnostics only); `target_fit` on `surface: local_candidate` (UK binding; the local cells stand on `local_target_fit_reviewed_exclusions.json`, keyed `family/area_code/metric`, which lifts the fence only and is evaluated on the build's review date, microcosm#1301) | @@ -229,7 +230,7 @@ stretches on declaration alone: | --- | --- | --- | | phases | `terminal` | `preflight`, `assembled`, `transferred`, `terminal` | | entries | 9 | 73 (64 national-build entries, 7 local-candidate entries and 2 local diagnostics) | -| incumbent posture | none — incumbent-comparison gates deliberately not selected; external oracles replace self-parity | full — export/target parity against the pinned enhanced-FRS incumbent | +| incumbent posture | none — incumbent-comparison gates deliberately not selected; external oracles replace self-parity | full — export surface, input coverage and input mass against the current build of the cut's own line (microcosm#1095; until then the pinned enhanced-FRS incumbent) | | criticality mix | 8 blocking + 1 diagnostic | 71 blocking + 2 local diagnostics | The differences are entirely in the two country inputs — the spec file @@ -257,15 +258,21 @@ inputs — never implicit module state.** A country picks its reference on purpose and cannot silently inherit a mis-referenced comparison. The UK input-mass entry is the worked case. Its `parameters` declare the -active `reference`, the closed `reference_registry` of named identities plus -`totals_sha256` pins, the numeric thresholds, and the -`reviewed_exclusions_resource` for the schema-3 per-reference register. The -UK binding holds the runtime-supplied reference sidecar to the active named -descriptor, failing closed on identity or totals-digest drift; an exclusion -suppresses only for the active reference block. The export-surface entry declares its -reviewed comparison registers the same way (the allowed-extra column list -and the reviewed reference-side exclusions), with the hard-required, -never-waivable columns remaining a code-level guard noted in the entry. +active `reference` kind, `current_build` (microcosm#1095): the current build +of the cut's own line, which the cut's reference step resolves from the +Hub's `releases.json` and records, so the spec commits to the rule and the +cut's record to the build. They also declare the numeric thresholds and the +`reviewed_exclusions_resource` for the schema-3 per-reference register, whose +blocks are keyed by the reference's `@` label; an exclusion +suppresses only for the reference it names. The export-surface entry declares +its reviewed comparison registers the same way (the allowed-extra column +list, now only what the current national build does not export, and the +reviewed reference-side exclusions), with the hard-required, never-waivable +columns remaining a code-level guard noted in the entry. The input-coverage +entry requires what the reference carries, less the coverage manifest's +reviewed exclusions. Until microcosm#1095 all three compared with the pinned +enhanced FRS, through a closed registry of named identities with +`totals_sha256` pins. ## The onboarding checklist: every input a country supplies diff --git a/docs/uk-cut-anyone.md b/docs/uk-cut-anyone.md index 728b7f4e9f..39938862ed 100644 --- a/docs/uk-cut-anyone.md +++ b/docs/uk-cut-anyone.md @@ -48,14 +48,18 @@ with `agent-secret get microcosm/uk-gate-signing-key-team maxghenis`, and 1. `fetch` 2. `preflight` -3. spine -4. national dry run, then the national calibration -5. re-score, only when the in-build evaluation did not pass -6. certify -7. stage-1 comparison (with `--previous-h5`) -8. assemble -9. publish preflight -10. publish (with `--publish`) +3. `reference`: the current national build the cut compares with + ([The reference build](#the-reference-build)) +4. spine +5. national dry run, then the national calibration +6. re-score, only when the build's comparison with the reference is missing + or names another candidate or reference +7. certify +8. stage-1 comparison, against the reference (`--previous-h5` names another + file) +9. assemble +10. publish preflight +11. publish (with `--publish`) Every step first checks whether its outputs already exist and verify, and skips itself if they do. So when a run stops, fix the cause and run the same @@ -85,6 +89,7 @@ derive from licensed data: | Path | Contents | |---|---| | `inputs/` | shared verified inputs | +| `cuts/