Skip to content

pr_gates: derived gate -- fail locally on derived records the branch stales (#6731) - #6734

Merged
squid-protocol merged 1 commit into
mainfrom
derived-gate-6731
Oct 26, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
derived-gate-6731

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #6731.

Why. Of the 436 churn fix runs from 2026-10-18 to 10-26, 28% were derived records that a PR changed the inputs of but did not refresh. CI found each one a push later, because pr_gates --fast checks none of them. This is the largest send-back cause, and it grows with PR size: 10 per 100 PRs at 1-2 hand-written files, 30 per 100 at 6+.

What.

  • New tests/tools/derived_check.py applies CI's own BLOCKING rules using fingerprints only. It runs no sweep and takes about 3-5 s. It reports:
    • evidence records whose port / case / corpus / differences / options changed (test_every_committed_record_is_current); fix: evidence.py prove KEY
    • non-Db2 det-sweep ledger entries whose case or corpus changed
    • non-Db2 cases with no ledger entry that det_sweep_baseline.json doesn't list
    • for the last two, it prints one proof_sweep.py --det-only --skip-db2 --cases ... + det_coverage_ledger.py update command
  • A harness / oracle / generator change only warns, as in CI. Db2 cases are skipped, as in the PR det-sweep.
  • New derived gate in pr_gates.py, also in --fast. It runs derived_check.py plus change_classifier.py --check (stale docs_read_by_tests.txt was 17 more fix runs). churn's precheck runs --fast, so these get caught before review.

Checks.

Follow-ups: #6732 (merging main without a model for regenerated-file conflicts), #6733 (tests affected by a diff in --fast). Companion: squid-protocol/promoter-bot#71 (precheck enforces the 5-file rule).

🤖 Generated with Claude Code

…h stales (#6731)

tests/tools/derived_check.py applies CI's BLOCKING rules with fingerprints only (~5 s, no sweep): evidence records whose
port / case / corpus / differences / options changed (test_every_committed_record_is_current), non-Db2 det-sweep
ledger entries whose case / corpus changed, and non-Db2 cases with no entry that det_sweep_baseline.json does not list
(a new case), each with its refresh command. The gate also runs change_classifier.py --check (docs_read_by_tests.txt).
In --fast, so churn's precheck catches these before review. 28% of churn fix runs 2026-10-18..26 were derived records
like these; replayed on #5658 (3 new cases) and #5836 (genapp-lgdpvs01) it fails on the pre-fix heads and passes after.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@squid-protocol
squid-protocol merged commit 6a7f79c into main Oct 26, 2026
42 of 44 checks passed
@squid-protocol
squid-protocol deleted the derived-gate-6731 branch October 26, 2026 14:48
squid-protocol added a commit that referenced this pull request Oct 26, 2026
…d at 1.3x the slowest seen (Part of #5133, #5919) (#6735)

The first stored nightly cache (2026-10-26 10:21, run 40306058375) summed each part to its bare pytest wall: 731 s for
28,832 tests against 2,137 s recorded. suite_shard_plan reads serial seconds and divides by JOBS, so every Gate leg
planned as 1 part at the 20-22 min floor and every PR's test_every_leg_cap_has_headroom_over_the_slowest_seen_time
failed (first seen on #6734). calibrate_test_durations.py now scales a part to wall x JOBS (the ratios pytest-split
balances by are unchanged); the planner floors each leg's cap at 1.3x its slowest seen minutes (moved from the test).

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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.

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

1 participant