Repository navigation
fix(ci): judge a panic ratchet red by its per-lint rows, not the packages it names - #29057
Conversation
…kspace base run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-710a4a518c009a6ad126
…e line The ratchet's ::error line names the packages a run checked. A base run can check the whole cmux-tui workspace while a PR checks only its changed packages, so the line never matched and no ratchet red was ever excused (cmux#26849's run 41176610742 failed on two rows that base run 41176544319 failed on word for word). Each head row must now be on the base with the same crate, lint and baseline and a count at least the head's; other RED lines must match word for word, and a red with no row is never excused. A head count above the base's now blocks even when both runs share a scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-710a4a518c009a6ad126
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
|
Owned by an agent session · session |
|
Review (codex gpt-6.1-sol high fast, review-router; started by the backlog lander): SHIP at 317aa68 SHIP
|
|
End-to-end check after the quota reset: this branch's
On origin/feat-cmux-next the same command said |
|
Found 3 test failures on Blacksmith runners: Failures
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
scripts/ci/base_red_excuse.pynever excused a Rust panic ratchet red onclippy (changed cmux-tui packages)(stepRust panic ratchet on changed cmux-tui packages). It compared the ratchet's::errorline, which names the packages the run checked. A base run can be a whole-workspace dispatch ("the panic ratchet is red for the whole cmux-tui workspace"), but a PR run names only its changed packages. So the line never matched, even when every failure row was the same on both runs.Concrete case: cmux#26849 at f81fd0a, run 41176610742, fails on exactly two rows:
acpmux: clippy::indexing_slicing 692 > baseline 686cmux-tui: clippy::indexing_slicing 836 > baseline 831Base run 41176544319 (at 734e99a) fails on those same two rows plus
cmux-rd-link: clippy::indexing_slicing 7 > new crate (must be 0). The classifier still saidnot excused: errors not on feat-cmux-next run 41176544319.The ratchet red is now judged by the rows in its
rust-panic-ratchet: REDblock:CRATE: clippy::LINT N > WHEREmust be on the base with the same crate, the same lint and the sameWHERE(baseline Mornew crate (must be 0)), and the base's count must be at least the head's. The base may have extra rows.crates/x/src/y.rs:L:C) are not compared. Any other RED line (for example an allow with no reason) must be on the base word for word.This also closes a gap that loosened the check: when the head and base had the same scope line, the old code excused the head even when its count was higher than the base's (see the
..._with_the_same_scope_tootest). That case now blocks.No open PR fixes this classifier. #28958 lowers the base counts. It does not change the classifier.
Testing
Command:
python3 -m unittest tests.test_base_red_excuse.PanicRatchetFAILED (failures=7, errors=2)of 10 tests.Ran 10 tests ... OK. The whole filepython3 -m unittest tests.test_base_red_excusepasses: 106 tests, OK.Observed / Not run
ratchet_redread 2 head rows and 3 base rows, andratchet_unmatchedreturned no unmatched lines.base_red_excuse.py --run 41176610742against GitHub. The shared REST quota ran out (HTTP 403) when I tried it. I will re-check after the reset and report the result in a PR comment.Changelog
none
risk:normal: CI tooling only. It loosens the base-red excuse for one kind of check and tightens it in the same-scope case.
Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the base-red excuse for Rust panic ratchet failures so ratchet reds are judged by their per-lint rows instead of the scope line that names the checked packages.
A base run may cover the whole cmux-tui workspace while a PR run covers only its changed packages, so the scope line never matched and valid excuses were refused. Now each head row (
CRATE: clippy::LINT N > WHERE) must appear on the base with the same crate, lint, andWHEREand a count at least the head's; other RED lines match word for word, and a red with no rows is never excused.Behavior changes
Written for commit 317aa68. Summary will update on new commits.