PolicyEngine / PolicyEngine/microcosm

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

Open
#551 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
0
Forks
4
Avg merge
1d 3h
Merged PRs (30d)
94

Description

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. #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).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in tools/build_us_fiscal_refresh_release.py at the terminal-batch section. Inspect the three gate-artifact writes and PolicyEngineUSEngine() construction alongside the existing degraded-mode handling and the related #548 changes. Done means failures in these operations are recorded while the batch continues to later gate groups and reaches the terminal failure report.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.