ci(cmux-next): a PR's sidebar sweep warns on base commits; its own commits stay errors

Merged
LA
7d ago
+78-9

Summary

The "Pushed commits add no violations" step checks every commit since 342462ca6ee for a Sidebar-Look: record. On pull request runs it printed ::error for base commits as well. Two feat-cmux-next commits, 4367c16e12c (#24073) and 6c1a5ab8bf3 (#24295), put that error on every pull request's cmux-next checks. next-autoland reads an ##[error] line as the PR's own red, so #27454 and four other PRs stayed held.

The rule now:

  • Pull request run: a commit without the owner's record that is not in the PR's own range (it is on the base) prints a ::warning that names the commit and plans/cmux-next/sidebar-owner.md. A commit in the PR's range still prints ::error and fails the sweep. The range is HEAD^1..HEAD, passed as prepush-gate.py --own-range.
  • Push run of feat-cmux-next: unchanged. Every commit without a record is still an error there, so the base's debt stays visible on the branch.

The two real entries still come from Leo (asked on #24073 and #24295).

Testing

python3 -m unittest tests.test_cmux_next_prepush_gate, new case test_a_pull_request_sweep_warns_on_a_base_commit_and_errors_on_its_own:

  • base commit on a PR run: a warning naming it, exit 0;
  • the same commit on a push sweep: an error, nonzero exit;
  • the PR's own sidebar commit: an error, nonzero exit, with the base warning next to it.

On the base it fails (unrecognized arguments: --own-range). On the head the whole file passes (40 tests).

Observed / Not run

  • Observed: the red and green above. risk_tier.py classify gives normal. The workflow YAML parses.
  • Not run: a pull request run of the workflow itself. This PR's own CI is that run.

Performance

No perf numbers: a CI script and a workflow step change only; no product hot path runs this code.

Changelog

none


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Stops a pull request's cmux-next sidebar sweep from failing on base commits that lack a Sidebar-Look: record, so next-autoland no longer reads those errors as the PR's own red and holds the PR.

On pull request runs, a commit without the owner's record that is outside the PR's range (HEAD^1..HEAD, passed as --own-range) now prints a ::warning naming the commit and plans/cmux-next/sidebar-owner.md; commits inside the range still print ::error and fail the sweep. Push runs of feat-cmux-next are unchanged: every commit without a record stays an error there, keeping the base's debt visible on the branch.