Skip to content

Install the fleet no-op merge guard shim — a PR must not merge green and change nothing - #218

Merged
ALLiDoizCode merged 1 commit into
mainfrom
ci/empty-pr-guard-shim
Aug 16, 2026
Merged

Install the fleet no-op merge guard shim — a PR must not merge green and change nothing#218
ALLiDoizCode merged 1 commit into
mainfrom
ci/empty-pr-guard-shim

Conversation

@ALLiDoizCode

Copy link
Copy Markdown

Installs this repo's copy of the fleet no-op merge guard, landed in toon-meta#405.

What it guards. connector#1008 merged as 610c6860 and git show 610c6860 --numstat returns zero files — a second PR opened from the same branch 17 minutes after connector#1000 had already merged that branch's content, so its squash landed an empty commit while its title and ticket history claimed the work was done. Green checks, a closed ticket, a merge commit, and no change. Nothing noticed; a human caught it by diffing the file.

Nothing could have caught it from the PR page either: GitHub's Files-changed tab is the three-dot diff and block#1008's was not empty. What was empty was the merge result.

What this file does. Forwards this repo's pull_request events to toon-protocol/toon-meta/.github/workflows/empty-pr-guard.yml@main, which checks out refs/pull/N/merge — the merge of the head branch into the base tip, which a pull_request run already checks out — and diffs it against its base parent. That diff is what the squash commit would carry. Empty diff, empty merge, red check with a message naming the shape and the recovery.

Verbatim copy of the canonical shim at toon-meta/scripts/factory/empty-pr-guard-shim.yml, diffed against it before this PR was opened.

No credential, no branch filter. No secrets: inherit — the guard makes no API call and no write, so handing it FACTORY_OPS_TOKEN would widen a monitored credential for nothing. No sandcastle//agent/ filter — a human's duplicate PR is exactly what merged empty.

How it blocks. checksVerdict counts any non-plumbing red check as failing, so from this merge on, an empty PR here is ineligible for the fleet auto-merge pass — no branch-protection change needed. Making it hard-block a human merge is a separate, per-repo choice: add the job to this repo's aggregate required check.

Behaviour on a legitimate no-op: there isn't one. Checked across all eleven factory repos before building this — nothing here merges an empty PR on purpose, and no release, tag or deploy flow rides an empty commit (moving tags move by docker buildx imagetools create). A conflicted PR, which has no merge ref, warns and passes.

Part of the guard's fleet fan-out. Full rationale: toon-meta/FACTORY.md → "Empty-PR guard (no-op merges)".

🤖 Generated with Claude Code

connector#1008 merged as 610c6860 and `git show 610c6860 --numstat` returns
zero files: a duplicate PR from an already-merged branch, whose squash landed
an empty commit while its title and ticket history claimed the work was done.
Green checks, a closed ticket, and no change.

GitHub's Files-changed tab could not have shown it — that is the THREE-dot
diff, and block#1008's was not empty. What was empty was the MERGE RESULT.

This shim forwards this repo's pull_request events to toon-meta's
empty-pr-guard.yml, which diffs `refs/pull/N/merge` against its base parent —
the diff the squash commit would actually carry. Verbatim copy of the canonical
shim at toon-meta/scripts/factory/empty-pr-guard-shim.yml.

No `secrets: inherit` (the guard makes no API call and no write) and no branch
filter (a human's duplicate PR is exactly what merged empty).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ALLiDoizCode
ALLiDoizCode enabled auto-merge (squash) August 16, 2026 20:37
@ALLiDoizCode
ALLiDoizCode merged commit 5d0ff45 into main Aug 16, 2026
24 checks passed
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.

1 participant