Skip to content

pr_gates --fast: fail locally on derived records the branch stales (evidence, det-sweep coverage ledger) #6731

Closed

Description

@squid-protocol

Why. A review of the 436 churn fix runs from 2026-10-18 to 10-26 found that stale derived records were the single largest cause of send-backs (28%). These are files a PR must regenerate after changing their inputs. The top three are the det-sweep coverage ledger, goldens/baselines, and evidence records.

These fix runs grow with PR size: 10 per 100 PRs at 1-2 hand-written files, 30 per 100 at 6+ files. That growth is one reason the 5-file PR cap exists.

Typical worker reports:

  • "det failed because the det-sweep coverage ledger had no entries for the three new cases"
  • "the det log reported genapp-lgdpvs01 as stale … because my earlier edit to its case.json changed the case"
  • "re-proved carddemo-report and carddemo-tranadd evidence" (from test_every_committed_record_is_current)

CI enforces all of these, but pr_gates --fast checks none of them:

  • tests/cobol_mainframe/ is ignored on PR smoke runs.
  • The det ledger is only checked inside det-sweep's --aggregate.

So workers find out one push later.

What. Add a cheap derived gate (about 5 s, fingerprints only, no sweep) to pr_gates.py, on by default and in --fast. It fails with the exact refresh command for each of these:

  1. An evidence record whose BLOCKING input (port, case, corpus, differences, options) changed. This mirrors test_every_committed_record_is_current, with the fix evidence.py prove KEY.
  2. A det-sweep coverage ledger entry whose BLOCKING input (case, corpus) changed, for non-Db2 cases. The PR det-sweep skips Db2, the same as CI.
  3. A non-Db2 case that has no ledger entry and is not listed in det_sweep_baseline.json as known-unproven, meaning a new case. The fix is proof_sweep.py --det-only --skip-db2 --cases X --work DIR, then det_coverage_ledger.py update DIR.

Follow-ups (separate issues): conflicts in generated records, and running affected tests locally for collateral breaks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions