Skip to content

Terminal batch can still be interrupted by gate-artifact writes and engine construction (#547 residuals) #551

Description

@MaxGhenis

Disclosed by the #548 round-4 lane and deliberately left out of that PR to keep its scope on the evidence-preservation guarantee. All three are 'the batch stops early', NOT 'the evidence is destroyed' — calibration_diagnostics.json is already on disk by the time any of them can fire, which is the #547 contract. Severity is therefore lower than the defects #548 fixes.

  1. The three gate-artifact JSON writes are unguarded: input_coverage.json, input_mass_parity.json, qrf_tail_concentration.json are written with bare write_text inside the terminal-batch section (tools/build_us_fiscal_refresh_release.py). A disk-full/permission failure aborts main(), so the accumulated terminal_gate_failures never reach the terminal raise and later gate groups never run. Fold SSI take-up gates into the batched terminal gates so failed runs keep their evidence #548 already secures each group's failure lines BEFORE its write, so the lines exist — they just are not reported. Fix shape: same treatment the telemetry proxy got, or a small guarded-write helper that records a line and continues.

  2. PolicyEngineUSEngine() construction sits outside the degraded-mode guards in the same section: a construction failure aborts the batch.

  3. Both are only reachable on a run that is already failing (or about to), so the practical exposure is a less complete failure report, not a wrong artifact.

Related: #547 (the original evidence-destruction defect), #548 (the fix), #543/#546 (checkpoint and cache identity).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions