tooling(lint): run_lint_gates.sh fails loudly when a lint step yields no command — it silently dropped the public-baseline step - #9969
Conversation
The extractor only admitted commands beginning with `python3 scripts/`, `./scripts/`, or `cargo fmt`. The public-baseline commands instead begin with an inline PYTHONPATH assignment and `python3 benchmarks/`, so both were filtered out; the YAML block's comments and step metadata were not the cause. Recognize every executable family currently used by lint, retain workflow step names in the derived list, and reject any run step that produces no commands. Keep the two GitHub-context commands on a stale-checked explicit skip list, and self-test both comment-led extraction and the loud failure. Claude-Session: https://claude.ai/code/session_011dhBmdn4vGgNibjo3oZqTo
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used all 8 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Derive the warnings and check job gates from test.yml, including the product-only warnings check, both host-compatible workspace scopes, and the API-docs regeneration and drift assertion. Expand the workflow's package exclusions portably for macOS Bash 3.2. Extend the extractor self-test to require the product check under -D warnings, reject its removal, and prove newly added warnings commands are replayed. Claude-Session: https://claude.ai/code/session_011dhBmdn4vGgNibjo3oZqTo
Claude-Session: https://claude.ai/code/session_011dhBmdn4vGgNibjo3oZqTo (cherry picked from commit 942e5f4)
#9969 makes run_lint_gates.sh derive every command of every run: step (80 now, up from 67). Two of the newly-run gates were red on this train: - addr_class_inventory rejected #9973's two GcHeader casts in hot_diag/receiver_repr.rs. Both are allowlisted with reasons rather than converted: the block is a #[cfg(debug_assertions)] trust-the-tag audit that compares the ownership-derived header against a direct byte-offset read and counts disagreements. Routing the raw side through try_read_gc_header would validate the address first and return None for exactly the implausible cases the audit exists to catch, so the canonical predicate cannot stand in there. - RUSTFLAGS="-D warnings" cargo check --workspace --all-targets rejected #9861's doc comment on a thread_local! macro invocation, which cannot carry one. Moved inside the macro onto the static it describes. This is a warning, not an error, so it only fails under -D warnings — which the driver never replayed before #9969.
|
Landed on The three non-passing gates are accounted for: public-baseline is pre-existing on |
Tooling only (
scripts/run_lint_gates.sh+ its self-test + a changelog fragment). Found while replaying the lint job locally on a Linux box because GitHub's runners were unavailable.What was wrong
run_lint_gates.shderives its gate list from.github/workflows/test.yml's lint job and then reports "all N gates passed". Its extractor only accepted commands starting withpython3 scripts/,./scripts/orcargo fmt, so the "Public benchmark evidence freshness" step (PYTHONPATH=. python3 tests/test_public_baseline.pyandpython3 benchmarks/ci_public_baseline_check.py) was silently dropped: the driver derived 67 commands from 44run:steps, ran 65, and printed green — while that step has been red on main since 2026-07-29 (the workflow's own comment). The script's header already states the failure mode: a gate you did not run is indistinguishable from one that passed.What changes
run:step (76 commands now, all 44 steps covered); the two CI-only steps that cannot run offline (check_changeset_fragment.shneedinggh api …/pulls/N/files,ci_cargo_test_shard.py --validateneeding the plan's shard count) are on an explicit, printed skip list.run:step produced ≥ 1 command or is on that list, and exits non-zero naming the step otherwise. The derived list is printed with step names so it can be diffed against the workflow.--self-testgains a positive case (a comment-led multi-linerun:block is derived) and a negative case (a step yielding nothing exits 4 namingSynthetic empty run step).Verified locally
Self-test passes. The real replay with
SKIP_COMPILE_GATES=1now lists and runs the public-baseline step:tests/test_public_baseline.pypasses andbenchmarks/ci_public_baseline_check.pyfails withpublic baseline error: public artifact benchmark inputs changed; regenerate it with ./benchmarks/run_public_baseline.sh— the actual red on main, now visible to the driver. Regenerating that baseline is a separate maintenance item, not part of this PR.Second blind spot, same driver (3e6aeef)
Replaying CI's
warningsjob verbatim on a PR head showedRUSTFLAGS="-D warnings" cargo check -p perry --binsfailing with seven dead-code errors while the driver's compile tier reported green: the tier only rancargo check --workspace --all-targets(tests keep those items alive) plus clippy, never the product-scope check. The compile tier is now derived from test.yml'swarningsandcheckjobs like the lint steps: the-D warningsproduct check, the-D warningsworkspace--all-targetscheck minus the host-excluded UI crates,cargo clippy -p perry --bins, the workspace clippy minus the same set, and the api-docs drift pair; the self-test asserts the compile commands derive, that an empty or missing step is rejected, and that the product warnings command is replayed. (The seven errors themselves are main's: #9970.)https://claude.ai/code/session_011dhBmdn4vGgNibjo3oZqTo