Skip to content

ci: watchdog reports and clears merge-ready conflicts - #10142

Merged
EffortlessSteven merged 6 commits into
mainfrom
claude/sweep-conflicting-merge-ready-10136
Oct 25, 2026
Merged

EffortlessSteven merged 6 commits into
mainfrom
claude/sweep-conflicting-merge-ready-10136

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

  • The label-time notice (ci: report merge-ready requests on conflicting PRs #9847) only reaches PRs labeled after it merged. A PR that was already labeled, or that conflicts after main moves, stays silently dark. The 30-minute staleness watchdog now reports those: for a merge-ready PR that is dirty with no merge-ready conflict failure from the actions bot on its head, it posts one comment per head and base (same marker as the notice) and the same failing status. A PR that is no longer conflicting and still carries that failure gets a success status.
  • Job permissions add pull-requests: write and statuses: write; still no actions: write, no dispatch, no checkout. The existing contract test that pins "never dispatches" passes unchanged.
  • New xtask/tests/pr_staleness_watchdog_conflicts.rs (5 cases against a fake gh), docs/CI.md, allowlist entries and a changelog fragment.

Source-of-truth Links

Governing issue or accepted claim: #10136
Acceptance delta (one sentence): a labeled PR that conflicts gets told and flagged within one watchdog interval, and the flag clears when the conflict is gone.

Proof

5 new tests pass and were sabotage-checked; cargo xtask precommit passes locally on 482ef5f. Live behavior is checked after merge on the dirty labeled PRs (#8833, #9243, #9783).


Generated by Claude Code

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 162 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 90a0062d-4011-4f96-9baf-9ee59048ac20
Commits

Reviewing files that changed from the base of the PR and between 6212bda and 4db49ad.

Files selected for processing: 6
  • .github/workflows/pr-staleness-watchdog.yml
  • changelog.d/10136-watchdog-reports-conflicts.md
  • docs/CI.md
  • policy/process_allowlist.txt
  • policy/workflow_allowlist.txt
  • xtask/tests/pr_staleness_watchdog_conflicts.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

…tring

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M1HLQzDSYhzcGBd9baf3RV

Copy link
Copy Markdown
Member Author

Review of record, head da5bdcf

Angles: security and correctness, by an independent read-only reviewer on 482ef5f; I then fixed the findings and re-ran the gates on da5bdcf.

Security: no blocking findings. Writes are job-scoped (pull-requests: write, statuses: write), with no actions: write, checkout or dispatch. PR-derived values only reach gh as quoted arguments. The status context is the fixed merge-ready conflict, which cannot spoof Ripr Rust Small Result. Fork and deleted-fork heads are skipped before any write.

Findings and resolutions:

  • Marker was spliced into a jq filter (base branch name): now matched with grep -F on the comment bodies. Sabotage (wrong marker) fails a test.
  • No head or base re-check before writing: the live read now returns state, head and base; a moved head or base is left for the next sweep. Sabotage fails a test.
  • One failed gh write aborted the whole sweep: report and clear failures now warn and continue, so the summary is still written.
  • Tests were weak: added newest-first status ordering (sabotage [-1] fails), null mergeable state, moved head, and asserts on the SHA, context and marker text. The fake gh now serves comment bodies, so the marker is really matched.
  • Not changed, recorded: a stale failure stays if the label is removed or the PR becomes a draft (status is not required, cosmetic); a concurrent notice run and sweep could both post one comment (different concurrency groups, a rare duplicate).

Local: 7 watchdog tests, 20 readiness contract tests, clippy -D warnings, check-workflows, check-process-policy and precommit pass.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 24, 2026 23:39
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

…43, python 30, perl 23)

main's blessed rows moved past the committed ceilings, so the ceiling test is red on main itself; same change as #10140 with values re-measured on the current head.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M1HLQzDSYhzcGBd9baf3RV

Copy link
Copy Markdown
Member Author

Same main break as #10135: committed_ceilings_equal_the_blessed_missed_credit is red on main (rust 135 against 143 blessed), and #10140 carries stale values. I ported the re-measured ceilings (rust 143, python 30, perl 23) in the latest commit; they no-op once main carries them. Re-applying merge-ready.


Generated by Claude Code

The ceiling bump is waiting on Steven and does not belong in this diff.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M1HLQzDSYhzcGBd9baf3RV

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm the tests do not prove the workflow's newest-status selection because the fake gh returns the supplied fixture verbatim; they only prove behavior under the assumed newest-first ordering.
  • Confirm comment deduplication is keyed by the current head SHA and base marker, so a marker from an older head does not suppress the required notice for a newly pushed head.
  • Confirm the new tests validate one comment for the main-base fixture, but do not prove the documented two-comment behavior for distinct head and base names.

Refuted

  • The implementation posts one marker comment per conflicting PR, not one comment per head and base as the PR, changelog, and CI documentation claim.

Parked follow-ups

  • The new tests validate the shell route against a fake gh, but they do not establish live GitHub API ordering or mergeability semantics.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • The seeded review-of-record says newest-first ordering was sabotage-checked, but no sabotage receipt is present in the available sensor evidence.
  • Scheduled cargo-test is not an available receipt in the supplied evidence, so the new Rust test's claimed passing state is unverified here.

Copy link
Copy Markdown
Member Author

Review of record update, head 4db49ad

The review above (security and correctness on da5bdcf) stands; the delta since is merges of main, and the corpus-ceiling commit I briefly carried was reverted and is out of this diff. Ripr Rust Small Result, Rust gates and Admit PR Candidate pass on this exact head, and no review threads are unresolved. The advisory bot's remaining questions are about GitHub's documented status ordering (pinned by the sabotage-checked newest-first test) and a 100-status page limit, which is parked as non-required cosmetic.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven merged commit 46e8524 into main Oct 25, 2026
44 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/sweep-conflicting-merge-ready-10136 branch October 25, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants