Skip to content

ci: watchdog re-reads a head whose mergeability is still being computed - #10186

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/watchdog-retry-unknown-10136
Oct 25, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
claude/watchdog-retry-unknown-10136

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

Source-of-truth Links

Governing issue or accepted claim: #10136
Acceptance delta (one sentence): the watchdog reports a conflicting labeled PR even when its mergeability had to be computed on the first read.

Proof

8 watchdog tests, the readiness contract tests and cargo xtask precommit pass locally on 554e138. Live check after merge: dispatch the watchdog and confirm #8833 and #9243 get the comment and status.


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!

Copy link
Copy Markdown
Member Author

Review of record, head 554e138

Angles: correctness and security, read against the diff (a small change to a workflow already reviewed in #10142).

  • Correctness: the loop reads at most three times and breaks on any computed state; [ ... ] && break is safe under set -e inside a loop body. A still-unknown state falls through to the existing branches, which write nothing for unknown, so the worst case is the old behavior. Added delay is at most 10 seconds per merge-ready same-repo PR, against a 10-minute job timeout. The new test fails when the loop is cut to a single read (sabotage run).
  • Security: no new inputs, permissions or writes; the extra reads use the same quoted gh api call, and the retry only delays the existing decision.
  • Findings: none blocking.

Local: 8 watchdog tests, check-workflows, check-changelog-fragments and precommit pass.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 25, 2026 02:57
@coderabbitai

coderabbitai Bot commented Oct 25, 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 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 163 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: 4d1b050a-8121-49a4-9896-3211ce9cb970
Commits

Reviewing files that changed from the base of the PR and between 21e89bb and 554e138.

Files selected for processing: 4
  • .github/workflows/pr-staleness-watchdog.yml
  • changelog.d/10136-watchdog-rereads-lazy-mergeability.md
  • 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.

@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!

@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 test does not directly assert that exactly two pull reads occurred or that the final disposition was based on dirty.
  • Confirm the PR claims a three-read retry policy, but the added test covers only the unknown-to-dirty second-read path, not exhaustion after three unknown responses.
  • Confirm persistent unknown mergeability falls back to the pre-existing no-report behavior after three reads, but that branch is not directly tested by the new regression.

Refuted

  • The retry loop could make the watchdog wait indefinitely or exceed its job budget.; refuted because: The loop is bounded to three reads and two five-second sleeps, adding at most ten seconds per same-repository merge-ready PR.
  • The test introduces a timing or flakiness problem because it sleeps in the workflow.; refuted because: The test creates an executable fake sleep that exits immediately, so the retry scenario is deterministic and does not incur real delays.
  • The policy budget increase from 95 to 100 is inconsistent with the source change.; refuted because: The only added workflow command is the looped live read, and the allowlist entry is updated to 100. actionlint passed, while zizmor evidence was unavailable.
  • The test duplicates workflow production logic in a way that weakens the architectural boundary.; refuted because: The fake gh server models GitHub's observable response sequence; production polling and reporting remain independently exercised through the workflow block.
  • The retry adds excessive runtime or violates the workflow run-block budget.; refuted because: The PR permits up to three five-second waits and the allowlist budget explicitly changes from 95 to 100; the prior review assessed the delay against the job timeout.

Parked follow-ups

  • The workflow waits after the third unknown read even though no further read follows, adding five seconds without changing the outcome.

@EffortlessSteven
EffortlessSteven merged commit 6b88bf0 into main Oct 25, 2026
48 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/watchdog-retry-unknown-10136 branch October 25, 2026 03:51
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