Skip to content

Batch pre-export terminal gates into one report per run#437

Merged
MaxGhenis merged 1 commit into
mainfrom
batch-terminal-gate-failures
Jul 16, 2026
Merged

Batch pre-export terminal gates into one report per run#437
MaxGhenis merged 1 commit into
mainfrom
batch-terminal-gate-failures

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Why

Build M attempts 9, 10, and 11 each burned a ~2h release run to surface ONE failing pre-export gate group serially: zero-support targets, then export-mass parity, then the reform-coverage smoke. The calibration battery, input-coverage, and export-mass-parity gates all evaluate before the H5 write, so a single failed run can report every failing pre-export group at once — 3 diagnose cycles → 1.

What

  • Batched pre-export report in tools/build_us_fiscal_refresh_release.py: the calibration battery collects into terminal_gate_failures instead of raising; the input-coverage and export-mass-parity evaluations run under degraded-mode guards (an evaluation crash with earlier failures on record becomes one more failure line instead of masking them; a crash on a clean run propagates unchanged); ONE batched raise fires just before the H5 write. Green-path behavior is unchanged, and certification manifests are never written for a gate-failed artifact.
  • Kept original raises for the reform-coverage smoke and the take-up contract: each already evaluates and reports its full failure set internally, and both require the written H5 that a gate-failed run must not produce.
  • expected_sign: "either" support in reform_coverage_smoke.py (scores abs(effect) against the floor, fails with "an effect in either direction") and in the release_input_coverage.py validator. The farm probe (qbi_farm_operations_income_exclusion) moves to "either" with a two-channel rationale: the measured ASEC FRSE leg is net-positive while the donor-pinned PUF Schedule F leg is net-negative per Pin signed sparse QRF outputs' net mass to the donor instrument (farm sign flip; #432) #435 — the net direction is a frame property, not an input-coverage property. Manifest regenerated with the generator (158 required / 8 exclusions / 37 probes).
  • Tests: test_either_sign_probe_passes_both_directions_and_keeps_floor_teeth, test_probe_rejects_unknown_expected_sign; the farm case in test_shipped_farm_probes_each_remove_only_the_bound_qbi_leaf updated to "either"; test_main_writes_diagnostics_before_post_calibration_gate_failure now asserts the batched pre-write semantics (diagnostics written + RuntimeError leading with the battery failure text).

Gate-integrity notes

  • No gate is weakened: every group that raised before still aborts the run before any certification manifest is written; the only change is that a failed run reports the complete pre-export failure list instead of the first group.
  • The "either" farm probe keeps the magnitude floor, so a dead farm channel still fails the probe.

🤖 Generated with Claude Code

Build M attempts 9, 10, and 11 each burned a ~2h release run to
surface ONE failing pre-export gate group serially: zero-support
targets, then export-mass parity, then the reform-coverage smoke.
The calibration battery, input-coverage, and export-mass-parity
gates all evaluate before the H5 write, so a single failed run can
report every failing pre-export group at once (3 diagnose cycles -> 1).

- Collect calibration-battery failures into terminal_gate_failures
  instead of raising; wrap the input-coverage and export-mass-parity
  evaluations in degraded-mode guards (an evaluation crash with
  earlier failures on record becomes one more failure line; a crash
  on a clean run propagates unchanged); raise ONCE just before the
  H5 write. Green-path behavior is unchanged, and certification
  manifests are never written for a gate-failed artifact.
- The reform-coverage smoke and take-up contract keep their original
  raises: both evaluate and report their full failure sets internally,
  and both require the written H5 that a gate-failed run must not
  produce.
- Support expected_sign "either" in the reform-coverage smoke
  (abs(effect) vs floor, "an effect in either direction" failure
  message) and accept it in the coverage validator. The farm probe
  (qbi_farm_operations_income_exclusion) moves to "either" with a
  two-channel rationale: the measured ASEC FRSE leg is net-positive
  while the donor-pinned PUF Schedule F leg is net-negative per
  populace#435 - direction is a frame property, not a coverage
  property. Manifest regenerated (158 required / 8 exclusions /
  37 probes).
- Tests: either-sign probes pass both directions and keep floor
  teeth; unknown expected_sign rejected; the pre-write batching test
  asserts diagnostics-written plus leading battery text.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis merged commit a36cce7 into main Jul 16, 2026
4 checks passed
@MaxGhenis
MaxGhenis deleted the batch-terminal-gate-failures branch July 16, 2026 10:42
MaxGhenis added a commit that referenced this pull request Jul 16, 2026
…ck (#440)

The static smoke-probe audit mapped expected_sign to a boolean
(expected_positive = sign == "positive"), so a probe declaring
expected_sign="either" (#437: net direction is a frame property, not a
coverage property) was treated as expecting NEGATIVE and any positive
net was flagged "contradicts the probe's expected_sign='either'" - a
self-contradictory advisory the Build M launch checklist hit on the
farm probe after #437 moved it to "either".

A probe declaring "either" asserts no direction, so the
sign-contradiction check now skips it; the support/thin-selection and
magnitude teeth are unchanged. Regression test mirrors the
contradiction fixture with expected_sign="either" and asserts PASS
with verdict "supported".

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Jul 16, 2026
…442)

Build M sparse attempt 12 (6584dfa; first run under the #437 batched
report) failed exactly one gate group: farm_income exported $23.45B
against the live-default reference's $62.39B (-62.4%, beyond +/-50%).

Full adjudication (populace#441), the #433 doctrine:

- Nothing pins the column: the v8 Ledger feed carries zero farm facts
  and the compiled 2024 registry zero farm specs, so the reference's
  $62.39B is an incidental artifact of the incumbent solve (the
  estate_income class).
- The pool carries 353 one-signed nonzero persons ($10.24B at base
  weights, byte-identical pre/post-#435 - distinct from the
  farm_operations_income signed leaf), 109 of them in the frozen
  rmloss100+keogh-swap selection ($4.10B). The band floor ($31.19B)
  would demand a 7.6x stretch of those 109 records toward the
  incidental value.
- Unpinned exports wander exactly as populace#432 describes: Build J
  -25.6% in-band, attempt 11 -43.2% in-band, attempt 12 -62.4% out,
  all on an identical pool.

The exclusion lifts when SOI Table 1.4 farm net income (Schedule F)
is identified as a Ledger target (populace#441 remedy 2). Register
entry only - the parity gate's behavior for non-excluded columns is
unchanged (the #433 pattern).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Jul 16, 2026
…tifact) (#444)

Fixes populace#443.

#437 collapsed

    dataset_path = artifact_root / DATASET_FILENAME
    release_engine.write_dataset(export_frame, dataset_path, period=PERIOD)

into the bare assignment while inserting the batched pre-export raise.
Since then no run has written its export H5: Build M attempts 13/14
smoke-scored attempt 10's stale July-15 artifact (keogh +$11,809,
byte-identical to pre-swap runs, despite 13 verified carriers at
$148.97M in the frozen selection), and a green run would have
sha-pinned the stale file into the release manifest. The smoke gate
firing on stale content is the only reason nothing shipped.

Restore the write at the same point: after the batched raise (a
gate-failed run must not produce the H5) and before the smoke (which
must score the just-written file).

CI passed on #437 because no test runs main() past the batched gates.
Until the green-path main() harness exists (populace#443 remedy), an
AST-level test pins the ordering contract - exactly one write_dataset
in main(), strictly between the single batched terminal raise and the
reform-coverage smoke - and fails when the call is absent.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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