Skip git-written Merge, Revert and fixup subjects in the guardrails PreToolUse convention guard
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
調査の方向性
stdin形式のチェック付近にある plugins/guardrails/hooks/block-convention-violation.sh を読み、そのスキップリストを plugins/guardrails/git-hooks/commit-msg-convention.sh のものと比較してください。merge subjectを除外するfixtureパターンを使って、block-convention-violation.test.sh に回帰テストを追加してください。gitが書き込んだ Merge main abc into feature というsubjectが通り、Mergers and acquisitions は引き続き拒否されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Part of #20534
Loosens the PreToolUse convention check slightly: needs the owner's yes.
Steps to reproduce
- In a repository whose
subject_patterndoes not itself allowMerge .+(for example a ticket-key pattern), a subagent runsgit -C $W merge --no-ff --no-commit <branch>. - It commits with a heredoc:
W=<repo>; git -C $W commit -F - <<'EOF'/Merge main abc into feature/EOF.
Expected behavior
The subject git itself writes for a merge, revert, fixup, squash or amend passes, as the installed commit-msg git hook already allows.
Actual behavior
block-convention-violation.sh refuses the subject. The -m retry passes, because the guard checks only the stdin form (((stdin_form)) || return 0, plugins/guardrails/hooks/block-convention-violation.sh:382).
Severity
Low
Severity justification
One refusal and a retry per merge commit written through a heredoc; nothing is lost.
Suggested fix location
block-convention-violation.sh:393-395: after [[ -n "$subj" ]] || return 0, return 0 for "fixup! "* | "squash! "* | "amend! "* | "Merge "* | 'Revert "'*, copied character for character from plugins/guardrails/git-hooks/commit-msg-convention.sh:64.
Evidence
- Verified by reading
origin/main(6f9409abe9): the skip list exists only in the git hook (commit-msg-convention.sh:64). - Not reproduced here: this repository's own pattern includes
Merge .+|Revert ".+, so the probe passes in this repo; reproducing needs a fixture whosesubject_patternlacks them. - Root cause left open:
sequencer_in_progress(:236, called at:384) misses becausehook::git_effective_dir_toinhook-utils.shdoes not expand-C $W, so the in-progress merge is not seen. - The item's author ran a sandbox copy with this patch: suite PASS=181 FAIL=0; the full Bash guard chain gave 0 on merge, revert and fixup subjects and 2 on junk subjects. Not re-run this pass.
Acceptance criteria
- In a fixture repo with a pattern lacking Merge, a heredoc commit with subject
Merge main abc into featurethroughW=<repo>; git -C $Wwith no MERGE_HEAD exits 0. -
Mergers and acquisitionsis still refused in that fixture. -
block-convention-violation.test.shpins both.
Constraints and gotchas
- In a repo with a
subject_patternbut no commit-msg hook installed, a non-merge-Fheredoc commit starting with one of these prefixes would no longer be checked at PreToolUse. - Separate defect, not covered: the subject is taken from an earlier non-commit heredoc (see #20535 case 3).
Context
Source: local handoff item 20261201-165317 section 7 (retired into this issue).
- 主要言語
- Shell
- スター
- 22
- フォーク
- 2
- 平均マージ
- 1時間 54分
- マージ済み PR(30日)
- 938
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
melodic-software/claude-code-plugins のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
melodic-software/claude-code-plugins#20573 ·
メンテナーはふだん 1 日以内に返信
-
needs-owner-decision
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
melodic-software/claude-code-plugins#20541 ·
メンテナーはふだん 1 日以内に返信
-
Replace attribution setup's "until the plugin migrates" sentence with what the plugin actually doesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
melodic-software/claude-code-plugins#20531 ·
メンテナーはふだん 1 日以内に返信
-
Tighten bugs scan, setup and write wording on filing authority, migration phrasing and coaching textオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
melodic-software/claude-code-plugins#20530 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
melodic-software/claude-code-plugins#20526 ·
メンテナーはふだん 1 日以内に返信
melodic-software/claude-code-plugins の issue をすべて見る
似ている issue
-
Battery "top up once" ends immediately when UPower reports fully-charged below 100%対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
omacom/omarchy#21286 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
libretro/libretro-super#2238 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ChurchCRM/docs.churchcrm.io#328 ·
メンテナーはふだん 1 日以内に返信
-
type/documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
c-w-z/commit-decision-record#90 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
bmaltais/StartDrive#17 ·