Repository navigation
docs(git-plugin): match the merge-chain late-commit exemption in git-merge-hazards - #3270
Open
laurigates wants to merge 2 commits into
Open
laurigates wants to merge 2 commits into
laurigates wants to merge 2 commits into
Conversation
…merge-hazards SKILL.md §6 and references/serial-merge-chain.md told readers to refuse "any non-merge commit" after review, and the hand-run guard exempted any commit whose subject starts with "Merge". merge-chain.sh (#3251) exempts only a commit with two or more parents whose committer is noreply@github.com, so a conflict agent's own merge of main is refused: its conflict resolution is unreviewed code. The hand-run snippet now runs the script's GraphQL read and jq filter, with a REST equivalent for sessions without GraphQL. A new known-limits section records that the committer email can be forged (signature wasSignedByGitHub would harden it) and that a web conflict-editor merge passes the exemption. delta-apply-stack.md and no-force-push-stack.md restated the old rule and are corrected. test-merge-chain.sh now extracts the snippet and runs it against a stub gh. Fixes #3254 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JkCD9AQTeRXMLXJVNViRp7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JkCD9AQTeRXMLXJVNViRp7
Contributor
Plugin Compliance Review
Recommendations
|
Contributor
Skill Quality Review
Approved for skill quality. |
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.
git-merge-hazardsdescribed the serial-merge late-commit guard more looselythan
scripts/merge-chain.sh(#3251) enforces it.The script exempts a commit newer than the review timestamp only if it has
two or more parents and GitHub committed it
(
committer.email == noreply@github.com, which is what an update-branchmerge looks like). It never looks at the subject line.
The docs said "refuse any non-merge commit". The hand-run snippet exempted
any commit whose subject starts with
Merge. Under that snippet, a conflictagent's own
Merge branch main into …commit would pass, even though itcarries a conflict resolution nobody has reviewed.
Changes
SKILL.md§6 states the exemption as the script implements it, and whyyour own merge of
mainis refused. The file stays under the 10,000-charceiling that
test-no-force-stack.shenforces.references/serial-merge-chain.mdprose matches the script. The guardsnippet now uses the script's own commits query and the same parent-count
plus committer test. It stops when the commit list is cut off, and it
merges pinned to the head it read. For sessions without GraphQL, one line
gives the REST equivalent.
references/serial-merge-chain.mdhas a new "Known limits" section withthe two feat(git-plugin): add merge-chain.sh merge shepherd to git-merge-hazards #3251 verifier points. Committer email can be forged; checking
signature { wasSignedByGitHub }would harden that. A merge made inGitHub's web conflict editor also passes the exemption, although it
contains a resolution.
merge-chain.shitself is unchanged.references/delta-apply-stack.mdandreferences/no-force-push-stack.mdno longer claim the guard allows a bot's merge commit, and no longer use
"non-merge commit" wording.
scripts/tests/test-merge-chain.sh.bash -non it, and executes it against astub
gh. A GitHub-made merge passes; an agent's merge and asingle-parent
Merge …commit are refused.Tests
test-merge-chain.sh: 116 passed, 0 failed.test-no-force-stack.sh: 356 passed, 0 failed.test-push-refspec.sh: 18 passed, 0 failed.pre-commitpasses, includingcheck-docs-index(STATUS=OK).Fixes #3254
Generated by Claude Code