rule: auto-merge-race-with-follow-up-commit anti-pattern#4365
Merged
Conversation
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>
There was a problem hiding this comment.
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:
This was referenced May 19, 2026
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>
This was referenced May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends
.claude/rules/blocked-green-ci-investigate-threads.mdwith 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:
warningsas required during arm windowDetection via
bun tools/github/poll-pr-gate.ts <PR>warningsfield.Test plan
bun tools/hygiene/audit-tick-shard-relative-paths.ts --enforce --baselineexits 0277a0c7d; no canary)🤖 Generated with Claude Code