Skip to content

rule: auto-merge-race-with-follow-up-commit anti-pattern#4365

Merged
AceHack merged 1 commit into
mainfrom
rule/auto-merge-race-anti-pattern-2026-05-19
May 19, 2026
Merged

rule: auto-merge-race-with-follow-up-commit anti-pattern#4365
AceHack merged 1 commit into
mainfrom
rule/auto-merge-race-anti-pattern-2026-05-19

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 19, 2026

Summary

Extends .claude/rules/blocked-green-ci-investigate-threads.md with the auto-merge-race-with-follow-up-commit anti-pattern.

Empirical anchor from this session's PR #4357 (2026-05-19T08:03Z-08:16Z): arming auto-merge with a non-required check failing + pushing a follow-up commit to fix it is a race window. The CLEAN-gate transition fires on required-checks-only state; if all required checks complete before the follow-up commit's CI run starts, auto-merge fires on the first commit's content and the follow-up lands on main never. Substrate-honest correction required a second PR (#4358).

Adds 3-step operational discipline in priority order:

  1. Don't arm auto-merge until all commits pushed (preferred; arming is cheap and reversible)
  2. If arming early, treat non-required warnings as required during arm window
  3. Accept first-commit content + ship follow-up as separate PR

Detection via bun tools/github/poll-pr-gate.ts <PR> warnings field.

Test plan

🤖 Generated with Claude Code

Empirical anchor from PR #4357 (2026-05-19T08:03Z-08:16Z this session):
arming auto-merge with a non-required check failing + pushing a
follow-up commit to fix it is a race window. CLEAN-gate transition
fires on required-checks-only state; if required checks complete
before the follow-up's CI run starts, auto-merge ships the first
commit's content.

Operational discipline added in 3-step priority order: don't arm
until all commits pushed; if arming early, treat non-required
warnings as required during arm window; otherwise accept first-commit
content + ship follow-up as separate PR.

Detection via `bun tools/github/poll-pr-gate.ts <PR>` warnings field.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 19, 2026 08:44
@AceHack AceHack enabled auto-merge (squash) May 19, 2026 08:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Extends the blocked-green-CI rule doc with a new anti-pattern section documenting the auto-merge race window when a follow-up commit is pushed to fix a non-required check. Provides empirical anchor (PR #4357/#4358), a 3-step operational discipline, and a detection recipe via poll-pr-gate.ts.

Changes:

  • Adds "Auto-merge-race-with-follow-up-commit anti-pattern" subsection
  • Documents 3 prioritized resolutions (don't arm early; treat warnings as required; accept first-commit + separate fix PR)
  • Cross-links to empirical-anchor PRs #4357 and #4358

@AceHack AceHack merged commit 8f9d04a into main May 19, 2026
30 checks passed
@AceHack AceHack deleted the rule/auto-merge-race-anti-pattern-2026-05-19 branch May 19, 2026 08:46
AceHack added a commit that referenced this pull request May 19, 2026
…r + 12-peer + 5-Lior saturation (#4368)

Sentinel was MISSING at cold-boot (CronList → empty); re-armed dd1af34b
with <<autonomous-loop>> sentinel every minute. Normal tier (3924/5000
GraphQL; 28min to reset). Peer saturation: 12 claude-code + 5 gemini-Lior.
Root worktree contaminated on stale otto/2012z-...-2026-05-18 branch with
~30 working-tree modifications; isolated worktree at
/private/tmp/zeta-otto-cli-1005z-coldboot anchored on origin/main
SHA 8056b17 per zeta-expected-branch.md race-window-caveat +
claim-acquire-before-worktree-work.md saturation-ceiling.

ls-tree count: 53 entries (canary-clean per
codeql-no-source-on-docs-only-pr-is-broken-commit-canary.md).
Lint clean (audit-tick-shard-relative-paths.ts).

Per auto-merge-race-with-follow-up-commit anti-pattern (#4365): no
follow-up commit planned on this branch.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants