Skip to content

CI shepherd: permanent auto-merge refusal -> shepherd:needs-owner, no retry storm (#6061) - #6290

Merged
squid-protocol merged 1 commit into
mainfrom
churn/6061-20261023T2008Z
Oct 23, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/6061-20261023T2008Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Fixes the CI-shepherd storm in #6061 (a permanent auto-merge refusal failed every pass and flapped needs-fix).

  • apply(): a permission refusal (without workflow scope, "refusing to allow a Personal Access Token", 403-style) on gh pr merge --auto adds shepherd:needs-owner and posts one comment saying why; no FAILED line, so the run exits 0.
  • decide(): no auto-merge attempt while shepherd:needs-owner is set with shepherd:merge; the label is sticky and suppresses needs-fix, so a pass never removes a status the next pass re-adds. It clears when shepherd:merge goes.
  • Tests replay the Det Sweep: Db2 shards restore the pinned Db2's first start instead of repeating it (Part of #5882) #5950 sequence (6 passes, refusal + the shepherd's own red check): one merge attempt, one label, one comment, no DELETEs, no needs-fix. Other apply failures still report FAILED.
  • docs/ci.md: label row. Optional pre-check of .github/workflows/ paths not done.

Owner decisions

Owner OK (2026-10-23): edit the shepherd script (shepherd_gh.py); add the regression test in tests/tools/test_shepherd_gh.py replaying the #5950 sequence. Do not edit .github/workflows.

Class / Sibling gaps

Class: a permanent (non-transient) gh refusal in apply() retried every pass and counted as failure. Handled: auto-merge on, the only call that hit it. Sibling gaps: other apply() ops (ready, rerun, dispatch, update_main, labels) that could hit the same 403 still report FAILED (rarer, no loop observed); the label is created on first use by the API (default colour) until ensure-labels next runs. Not done: pre-checking workflow-file paths.

Gates: pr_gates --fast 7/7; tests/tools/test_shepherd_gh.py 104 passed. ensure-labels runs in the workflow, which I did not edit.

🤖 Generated with Claude Code

…er once and stops retrying (#6061)

apply() recognises the workflow-scope / token-permission refusal, labels the PR and comments once, and does not
report FAILED (exit 0). decide() skips auto-merge while the label is set and keeps it sticky, so needs-fix no longer
flaps against the shepherd's own red run. Regression test replays the #5950 sequence.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 23, 2026 20:13
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 23, 2026 20:14
@squid-protocol
squid-protocol merged commit 148e7f5 into main Oct 23, 2026
44 checks passed
@squid-protocol
squid-protocol deleted the churn/6061-20261023T2008Z branch October 23, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant