Skip to content

docs(git-plugin): match the merge-chain late-commit exemption in git-merge-hazards - #3270

Open
laurigates wants to merge 2 commits into
mainfrom
docs/merge-hazards-exemption-3254
Open

laurigates wants to merge 2 commits into
mainfrom
docs/merge-hazards-exemption-3254

Conversation

@laurigates

Copy link
Copy Markdown
Owner

git-merge-hazards described the serial-merge late-commit guard more loosely
than 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-branch
merge 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 conflict
agent's own Merge branch main into … commit would pass, even though it
carries a conflict resolution nobody has reviewed.

Changes

  • SKILL.md §6 states the exemption as the script implements it, and why
    your own merge of main is refused. The file stays under the 10,000-char
    ceiling that test-no-force-stack.sh enforces.
  • references/serial-merge-chain.md prose matches the script. The guard
    snippet 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.md has a new "Known limits" section with
    the 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 in
    GitHub's web conflict editor also passes the exemption, although it
    contains a resolution. merge-chain.sh itself is unchanged.
  • references/delta-apply-stack.md and references/no-force-push-stack.md
    no longer claim the guard allows a bot's merge commit, and no longer use
    "non-merge commit" wording.
  • Regression check: a new §10 in scripts/tests/test-merge-chain.sh.
    • It greps for the stale wording.
    • It extracts the snippet, runs bash -n on it, and executes it against a
      stub gh. A GitHub-made merge passes; an agent's merge and a
      single-parent Merge … commit are refused.
  • A regression-ledger row.

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-commit passes, including check-docs-index (STATUS=OK).

Fixes #3254


Generated by Claude Code

…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
@github-actions github-actions Bot added docs Documentation changes git-plugin Git plugin related labels Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Plugin Compliance Review

Plugin plugin.json Frontmatter Body Marketplace Release Config Bash Patterns Descriptions When-to-Use Size Overall
git-plugin ✅ ✅ ✅ ✅ ✅ ✅ ⚠️ ⚠️ ⚠️ ⚠️

Recommendations

  • ⚠️ git-plugin/gh-cli-agentic: description is 210 chars — over the 200-char target band (see .claude/rules/skill-quality.md)
  • ⚠️ git-plugin/git-push: description is 237 chars — over the 200-char target band (see .claude/rules/skill-quality.md)
  • ⚠️ git-plugin/github-issue-autodetect: description is 230 chars — over the 200-char target band (see .claude/rules/skill-quality.md)
  • ⚠️ git-plugin/github-pr-title: description is 221 chars — over the 200-char target band (see .claude/rules/skill-quality.md)
  • ⚠️ git-plugin/release-please-protection: description is 251 chars — over the 200-char target band (see .claude/rules/skill-quality.md)
  • ⚠️ git-plugin/git-upstream-fix-check: SKILL.md has no '## When to Use This Skill' section — recommended where sibling skills compete for the same intent, otherwise the description carries the trigger (see .claude/rules/context-engineering.md)
  • ⚠️ git-plugin/git-repo-delete-check: SKILL.md has no '## When to Use This Skill' section — recommended where sibling skills compete for the same intent, otherwise the description carries the trigger (see .claude/rules/context-engineering.md)
  • ⚠️ git-plugin/git-issue-scoping: SKILL.md has no '## When to Use This Skill' section — recommended where sibling skills compete for the same intent, otherwise the description carries the trigger (see .claude/rules/context-engineering.md)
  • ⚠️ git-plugin/git-pr: SKILL.md is 10549 chars (~2637 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-commit-push-pr: SKILL.md is 10627 chars (~2656 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-pr-feedback: SKILL.md is 18746 chars (~4686 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-commit-workflow: SKILL.md is 11052 chars (~2763 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-issue: SKILL.md is 15561 chars (~3890 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-upstream-pr-diverged: SKILL.md is 10474 chars (~2618 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-conflicts: SKILL.md is 11315 chars (~2828 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-issue-scoping: SKILL.md is 10046 chars (~2511 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-local-hazards: SKILL.md is 10013 chars (~2503 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)
  • ⚠️ git-plugin/git-triage: SKILL.md is 10007 chars (~2501 tokens, >10000) — consider extracting to REFERENCE.md or scripts/ (ceiling: 26000 chars / ~6500 tokens)

@claude

claude Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Skill Quality Review

  • git-plugin/skills/git-merge-hazards/SKILL.md: passes all checks. It has a When to Use decision table and an Agentic Optimizations table. The description is phrased around user intents (merging a PR or a stacked chain, auditing whether a branch landed, merging over red CI). model and effort are unset, so both are inherited, which is appropriate. There is no REFERENCE.md; the supporting files are under references/ and scripts/, which are not part of this checklist.

Approved for skill quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation changes git-plugin Git plugin related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] git-merge-hazards: §6 prose and serial-merge-chain.md guard are looser than merge-chain.sh

2 participants