Repository navigation
fix: complete issue-1215 publish guard updates - #1217
Conversation
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=
CONFLICTING, merge_state_status=DIRTY
Evidence Check
- AC coverage: PR 本文の
## 受け入れ条件の達成状況は 7 AC をすべて記載 - Allowed Paths:
origin/main...FETCH_HEADの changed files 8 件は Issue #1215 の Allowed Paths 内 - CI Verification:
ci_verdict_summary.pyはstatus: stale_head_sha/no checks reported on the 'worktree-issue-1215-dedicated-worktree-git-add-local-main-br' branchを返し、canonical な CI 証跡を確認できない - 検証コマンド結果: PR 本文で
pnpm typecheck/pnpm lint/pnpm test/pnpm buildが未実行のままになっている。focused pytest の自己申告だけでは APPROVE 不可
Blockers
- PR が
CONFLICTING/DIRTYのため merge-blocking - canonical verification evidence が不足しているため merge-blocking
Non-blockers
- Draft 状態そのものは blocker ではない
LOOP_VERDICT_V2
verdict: REQUEST_CHANGES
reviewed_head_sha: "ba2da747f5c06c23b8a9e541b04d50c3c56305dc"
merge_ready: false
mergeability:
mergeable: "CONFLICTING"
merge_state_status: "DIRTY"
blockers:
- "mergeability blocker: mergeable=CONFLICTING, merge_state_status=DIRTY"
- "canonical verification evidence missing: ci_verdict_summary.py returned stale_head_sha with no checks reported for this head, and PR body self-report alone cannot approve"
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=
CONFLICTING, merge_state_status=DIRTY
Evidence Check
- AC coverage: PR 本文の
## 受け入れ条件の達成状況は Issue #1215 の AC1-AC7 をすべて[x]で記載 - Allowed Paths: PR changed files 8 件は Issue #1215 の Allowed Paths 内
- CI Verification:
ci_verdict_summary.pyは current head844459ae816b9f74d5feac1f8488f5309407d9b4に対してstatus: gh_errorとno checks reported on the 'worktree-issue-1215-dedicated-worktree-git-add-local-main-br' branchを返し、canonical な CI 証跡を確認できない - 検証コマンド結果: PR 本文には標準 4 コマンドと focused pytest の自己申告があるが、
TEST_VERDICT_MACHINE/CI_CHECK_RUN_SCOPEDは見当たらず、self-report 単独では APPROVE 不可
Blockers
- PR が
CONFLICTING/DIRTYのため merge-blocking - canonical verification evidence が不足しているため merge-blocking
Non-blockers
- Draft 状態そのものは blocker ではない
LOOP_VERDICT_V2
verdict: REQUEST_CHANGES
reviewed_head_sha: "844459ae816b9f74d5feac1f8488f5309407d9b4"
merge_ready: false
mergeability:
mergeable: "CONFLICTING"
merge_state_status: "DIRTY"
blockers:
- "mergeability blocker: mergeable=CONFLICTING, merge_state_status=DIRTY"
- "canonical verification evidence missing: ci_verdict_summary.py returned gh_error with no checks reported for this head, and PR body self-report alone cannot approve"
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
allowed_paths_gate_source: review_subagent# Conflicts: # tests/codex/test_local_main_branch_guard.py
Preview URLPreview removed (PR #1217 closed). |
|
Verdict: REQUEST_CHANGES Mergeability
Evidence CheckAC Coverage (Issue #1215 vs PR Body)
Allowed Paths 手動照合 (8 files)
手動照合では逸脱なし。形式ゲートは indeterminate (後述 blockers 参照)。 CI Verification (head e290557)
TEST_VERDICT_MACHINE コメント不在。CI_VERDICT_SUMMARY_V1: pending_or_queued (exit 20 相当)。 Safety Claim Matrix Schema Change Applicability Blockers
Non-blockers
LOOP_VERDICT_V2verdict: REQUEST_CHANGES
|
…_WORKTREE_CONTEXT
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
left a comment
There was a problem hiding this comment.
ALLOWED_PATHS_GATE_RESULT_V1
{
"status": "ok",
"produced_at": "2026-06-28T01:57:28Z",
"produced_by": "allowed_paths_review_gate.py",
"producer_role": "review_subagent",
"worker_report_used_as_canonical": false,
"pr_number": 1217,
"base_ref": "main",
"base_sha": "d5d6743e27fa9adc091381374238946c5789f95a",
"head_sha": "cc1d71fe743909789b5a75215624ad87b2dbf0af",
"reviewed_head_sha": "cc1d71fe743909789b5a75215624ad87b2dbf0af",
"changed_files_source": "git_diff_base_head",
"allowed_paths_source": "linked_issue_contract_snapshot",
"changed_files_count": 9,
"changed_files": [
".claude/hooks/tests/test_issue1215_git_add_allow.py",
".claude/hooks/tests/test_issue1215_git_add_block.py",
".claude/hooks/tests/test_issue1215_publish_resume.py",
".claude/hooks/tests/test_local_main_branch_guard.py",
".claude/hooks/worktree_scope_guard.py",
"scripts/agent-guards/local_main_branch_guard.py",
"tests/codex/test_local_main_branch_guard.py",
"tests/fixtures/hooks/issue1215-permissionrequest-dedicated-worktree-git-add.json",
"tests/fixtures/hooks/issue1215-pretooluse-dedicated-worktree-git-add.json"
],
"allowed_paths_list": [
".claude/hooks/**",
"docs/dev/hook-boundaries.md",
"scripts/agent-guards/local_main_branch_guard.py",
"scripts/agent-guards/utils/**",
"scripts/agent-guards/worktree_catalog.py",
"scripts/agent-guards/worktree_scope_guard.py",
"tests/codex/test_local_main_branch_guard.py",
"tests/codex/test_worktree_scope_guard.py",
"tests/fixtures/hooks/issue1215-permissionrequest-dedicated-worktree-git-add.json",
"tests/fixtures/hooks/issue1215-pretooluse-dedicated-worktree-git-add.json"
],
"violations": [],
"contract_fingerprint": {
"allowed_paths_normalized_sha256": "467d6fde57bd00ab9971ded1f6056ce299ce0980b5f33db1c56939bd1a6b6352",
"base_ref": "main",
"base_sha_at_snapshot": "d5d6743e27fa9adc091381374238946c5789f95a",
"contract_body_sha256": "sha256:fdd02dbff43a8e724c3aa336b2e564db168e02c9edb57edd6ea663a4ae6910af",
"contract_source_id": "IC_kwDOSfQcDc8AAAABHxZU7g",
"contract_source_kind": "issue_comment",
"issue_number": 1215
},
"execution_context": {
"worktree_root": "/home/squne/projects/LOOP_PROTOCOL",
"generated_at": "2026-06-28T01:57:28Z",
"tool_version": "1.2.0"
},
"reason": "All changed files are within allowed paths"
}
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: cc1d71fe743909789b5a75215624ad87b2dbf0af
pr_number: 1217
linked_issue: 1215
reviewed_at: "2026-06-28T02:00:00Z"
allowed_paths_gate:
status: ok
violations: []
changed_files_count: 9
changed_files:
- .claude/hooks/tests/test_issue1215_git_add_allow.py
- .claude/hooks/tests/test_issue1215_git_add_block.py
- .claude/hooks/tests/test_issue1215_publish_resume.py
- .claude/hooks/tests/test_local_main_branch_guard.py
- .claude/hooks/worktree_scope_guard.py
- scripts/agent-guards/local_main_branch_guard.py
- tests/codex/test_local_main_branch_guard.py
- tests/fixtures/hooks/issue1215-permissionrequest-dedicated-worktree-git-add.json
- tests/fixtures/hooks/issue1215-pretooluse-dedicated-worktree-git-add.json
contract_fingerprint_matched: true
ci_verdict:
overall: pass
jobs:
- name: python-test
result: pass
- name: test
result: pass
- name: lint
result: pass
- name: typecheck
result: pass
- name: build
result: pass
- name: e2e
result: pass
- name: node-backed-hook-tests
result: pass
- name: check-hook-integrity
result: pass
- name: actionlint
result: pass
- name: validate-generated-artifact
result: pass
- name: deploy-pr
result: pass
- name: ci-verdict-summary
result: pass
ac_coverage:
AC1:
status: PASS
evidence: "test_issue1215_worktree_context" found in tests/codex/test_local_main_branch_guard.py
AC2:
status: PASS
evidence: "test_issue1215_no_git_add_exception" found in tests/codex/test_local_main_branch_guard.py
AC3:
status: PASS
evidence: .claude/hooks/tests/test_issue1215_git_add_allow.py exists at head SHA
AC4:
status: PASS
evidence: .claude/hooks/tests/test_issue1215_git_add_block.py exists at head SHA
AC5:
status: PASS
evidence: tests/fixtures/hooks/issue1215-pretooluse-dedicated-worktree-git-add.json and issue1215-permissionrequest-dedicated-worktree-git-add.json both exist at head SHA
AC6:
status: PASS
evidence: "linked_issue_worktree_context" present in scripts/agent-guards/local_main_branch_guard.py (line 51, 330, 1538) and tests/codex/test_local_main_branch_guard.py (line 1373)
AC7:
status: PASS
evidence: .claude/hooks/tests/test_issue1215_publish_resume.py exists at head SHA
implementation_notes: |
local_main_branch_guard.py: is_local_root_context() now calls get_primary_worktree_path() and
returns False early when cwd is inside a linked worktree (real_root != real_primary).
New is_linked_issue_worktree_context() and REASON_LINKED_ISSUE_WORKTREE_CONTEXT distinguish
linked-worktree allow from generic not-local-root-context allow.
evaluate() now emits linked_issue_worktree_context reason code for dedicated worktrees,
satisfying AC1 and AC2 without adding git-add pathspec exceptions to this guard.
worktree_scope_guard.py and hook tests round out AC3–AC7.
結論: REQUEST_CHANGESPR #1217 は、Issue #1215 の意図である「 現 head は P0:
|
…re cwd - Add `_extract_inner_git_argv` to unwrap bash -lc / command / env / rtk wrappers before pathspec validation (Fix 1 P0) - Add `_extract_inner_python_argv` and update `_is_direct_publish_termination_command` to detect publish script through env/command/bash-lc wrappers (Fix 4 P1) - Extend `_is_git_add_pathspec_violation` with `cwd` parameter to skip global git options (-C <path>) and block directory-wide pathspecs via `os.path.isdir` check (Fix 2 P0) - Fix fixture `cwd: ""` → `cwd: "/tmp/worktree-issue-1215-test"` in both PreToolUse and PermissionRequest JSON fixtures (Fix 3 P0) - Add regression tests: wrapper git add, git -C add, directory pathspec, magic pathspec (:/, :(glob)**), --pathspec-from-file space-separated form (Fix 6 P0) All 13 issue1215 tests pass; full hook suite 943 tests pass.
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
verdict: REQUEST_CHANGES
reviewed_head_sha: "dcf1b8ba45662e1bcbb4b5b4bcd6cc12dffc701c"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
is_draft: true
blockers:
- id: ALLOWED_PATHS_GATE_FAIL_CLOSED
summary: "allowed_paths_gate: fail_closed — 10 ファイルが Allowed Paths 外"
detail: |
git diff d5d6743e...dcf1b8ba の結果、10 ファイルが
Issue 1215 の contract Allowed Paths に含まれていない。
root cause: PR 1218 (fix 1213: E501 解消) が origin/main にマージされた後、
ワーカーが git merge origin/main を実行したことで PR ブランチに取り込まれた。
PR head でのこれらファイルの内容は origin/main と同一であり、
feature 実装によって変更されたものではない。
しかし gate は base_sha_at_snapshot (d5d6743e) 起点で判定するため fail_closed となる。
violation_dirs:
- .claude/skills/issue-contract-review/scripts/tests/ (2 files)
- .claude/skills/issue-refinement-loop/tests/ (2 files)
- scripts/agent-guards/ (2 files: skill_runtime_command_policy + skill_runtime_exec)
- scripts/agent-guards/tests/ (1 file)
- scripts/ci/ (1 file)
- scripts/ci/tests/ (1 file)
- scripts/tests/ (1 file)
remediation: |
Issue 1215 の contract snapshot を現在の origin/main HEAD
(eb66fcca2d374a40ed57ba33e7bf74a0278ba5af) を base_sha_at_snapshot として
fresh contract review を実施し、新しい go を取得してから impl-review-loop を再実行する。
stale base_sha によって gate が合法的なメインブランチ sync を violation として検出している。
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []Allowed Paths Gate
schema: ALLOWED_PATHS_GATE_RESULT_V1
status: fail_closed
producer_role: review_subagent
worker_report_used_as_canonical: false
pr_number: 1217
base_ref: main
base_sha: d5d6743e27fa9adc091381374238946c5789f95a
head_sha: dcf1b8ba45662e1bcbb4b5b4bcd6cc12dffc701c
reviewed_head_sha: dcf1b8ba45662e1bcbb4b5b4bcd6cc12dffc701c
changed_files_source: git_diff_base_head
allowed_paths_source: linked_issue_contract_snapshot
changed_files_count: 19
violations_count: 10
expected_contract_fingerprint_matched: true
contract_source_kind: issue_comment
contract_source_id: IC_kwDOSfQcDc8AAAABHxZU7g
reason: "10 file(s) outside allowed paths"
root_cause: >
PR ブランチが git merge origin/main を実行して PR 1218 の E501 fixes を取り込んだ。
base_sha_at_snapshot (d5d6743e) は PR 1218 マージ前の origin/main を指しているため
E501 fix ファイルが diff に含まれる。
実際の feature 変更 (9 ファイル) はすべて Allowed Paths 内。
current_origin_main_sha: eb66fcca2d374a40ed57ba33e7bf74a0278ba5afCI Evidence
- source: CI_CHECK_RUN_SCOPED (ci_verdict_summary.py exit 0)
- head_sha: dcf1b8b
- status: all_pass
- pass jobs (13): ci-verdict-summary, e2e, typecheck, lint, build, test, python-test, node-backed-hook-tests, actionlint, check-hook-integrity, deploy-pr, validate-generated-artifact, PR Body Japanese Check
- skipped/excluded: 5 (retrospective checks)
- CI run: https://github.com/squne121/loop-protocol/actions/runs/28308931995
AC Coverage (Issue 1215)
VCs は git show dcf1b8b: で PR head のファイル内容に対して評価した。
| AC | 確認結果 | 判定 |
|---|---|---|
| AC1 | issue1215_worktree_context @ tests/codex/test_local_main_branch_guard.py:1362 (PR head) | PASS |
| AC2 | issue1215_no_git_add_exception @ tests/codex/test_local_main_branch_guard.py:1384 (PR head) | PASS |
| AC3 | .claude/hooks/tests/test_issue1215_git_add_allow.py 存在 | PASS |
| AC4 | .claude/hooks/tests/test_issue1215_git_add_block.py 存在 | PASS |
| AC5 | fixtures/hooks/issue1215-{pretooluse,permissionrequest}-dedicated-worktree-git-add.json 2件存在 | PASS |
| AC6 | linked_issue_worktree_context @ local_main_branch_guard.py:51 (REASON_LINKED_ISSUE_WORKTREE_CONTEXT) および tests/codex/test_local_main_branch_guard.py:1373 (PR head) | PASS |
| AC7 | .claude/hooks/tests/test_issue1215_publish_resume.py 存在 | PASS |
CI python-test PASS (全テストスイート)。
Safety Claim Matrix
3 行すべて Implemented: yes / Not controlled: (空) / evidence: focused test 参照あり。確認済み。
Schema Consumer Gate
schema_change_applicability: not_schema_change — N/A。確認済み。
判定根拠
- CI: all_pass (exit 0)
- mergeability: MERGEABLE/CLEAN (Draft)
- allowed_paths_gate: fail_closed (merge-blocking)
- AC coverage: 全 7 件 PASS (PR head 内容で確認)
- safety/schema: 問題なし
allowed_paths_gate fail_closed のため REQUEST_CHANGES。
stale base_sha_at_snapshot 問題: origin/main HEAD (eb66fcc) を base_sha として fresh contract review を実施後、impl-review-loop を再実行する。
squne121
left a comment
There was a problem hiding this comment.
ALLOWED_PATHS_GATE_RESULT_V1
{
"status": "ok",
"produced_at": "2026-06-28T02:51:45Z",
"produced_by": "allowed_paths_review_gate.py",
"producer_role": "review_subagent",
"worker_report_used_as_canonical": false,
"pr_number": 1217,
"base_ref": "main",
"base_sha": "eb66fcca2d374a40ed57ba33e7bf74a0278ba5af",
"head_sha": "dcf1b8ba45662e1bcbb4b5b4bcd6cc12dffc701c",
"reviewed_head_sha": "dcf1b8ba45662e1bcbb4b5b4bcd6cc12dffc701c",
"changed_files_source": "git_diff_base_head",
"allowed_paths_source": "linked_issue_contract_snapshot",
"changed_files_count": 9,
"changed_files": [
".claude/hooks/tests/test_issue1215_git_add_allow.py",
".claude/hooks/tests/test_issue1215_git_add_block.py",
".claude/hooks/tests/test_issue1215_publish_resume.py",
".claude/hooks/tests/test_local_main_branch_guard.py",
".claude/hooks/worktree_scope_guard.py",
"scripts/agent-guards/local_main_branch_guard.py",
"tests/codex/test_local_main_branch_guard.py",
"tests/fixtures/hooks/issue1215-permissionrequest-dedicated-worktree-git-add.json",
"tests/fixtures/hooks/issue1215-pretooluse-dedicated-worktree-git-add.json"
],
"violations": [],
"contract_fingerprint": {
"allowed_paths_normalized_sha256": "467d6fde57bd00ab9971ded1f6056ce299ce0980b5f33db1c56939bd1a6b6352",
"base_ref": "main",
"base_sha_at_snapshot": "eb66fcca2d374a40ed57ba33e7bf74a0278ba5af",
"contract_body_sha256": "sha256:fdd02dbff43a8e724c3aa336b2e564db168e02c9edb57edd6ea663a4ae6910af",
"contract_source_id": "IC_kwDOSfQcDc8AAAABHxZU7g",
"contract_source_kind": "issue_comment",
"issue_number": 1215
}
}全 9 ファイルが Allowed Paths 内。base_sha = eb66fcc (PR #1218 マージ後の origin/main HEAD) を使用。前回 d5d6743 で生じた E501 ファイル混入誤判定は解消済み。
squne121
left a comment
There was a problem hiding this comment.
LOOP_VERDICT_V2
verdict: APPROVE
reviewed_head_sha: "dcf1b8ba45662e1bcbb4b5b4bcd6cc12dffc701c"
merge_ready: true
mergeability:
mergeable: MERGEABLE
merge_state_status: CLEAN
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests:
- title: "ci_verdict_summary.py: (Check Japanese Content, PR Body Japanese Check) を HEAD_SHA_NULL_SKIPPED_EXCLUDE_RULES に追加する"
reason: >
PR #1217 のレビューで、run 28309217620 (retrospective) の PR Body Japanese Check が
head_sha=null + conclusion=skipped で HEAD_SHA_NULL_SKIPPED_EXCLUDE_RULES 未登録のため
ci_verdict_summary.py が exit 10 を返す false positive を確認。
実際の PR Body Japanese Check は run 28308931997 (head_sha dcf1b8ba) で SUCCESS。
("Check Japanese Content", "PR Body Japanese Check") を除外ルールに追加することで解消できる。
allowed_paths_gate:
status: ok
producer_role: review_subagent
worker_report_used_as_canonical: false
base_sha: "eb66fcca2d374a40ed57ba33e7bf74a0278ba5af"
head_sha: "dcf1b8ba45662e1bcbb4b5b4bcd6cc12dffc701c"
violations: []
contract_fingerprint_match: true
contract_source_kind: issue_comment
contract_source_id: "IC_kwDOSfQcDc8AAAABHxZU7g"
expected_contract_fingerprint_verified: trueCI 判定
ci_verdict_summary.py: exit 10 (failed_checks: ["PR Body Japanese Check"])
これは false positive。根拠:
- run 28309217620 (retrospective push event): PR Body Japanese Check = SKIPPED, head_sha=null
- run 28308931997 (PR push CI): PR Body Japanese Check = SUCCESS, head_sha=dcf1b8ba
gh pr checks でも bucket=pass / state=SUCCESS のエントリが存在することを確認済み。
head_sha=null + conclusion=skipped のエントリが HEAD_SHA_NULL_SKIPPED_EXCLUDE_RULES に未登録のため
ツールが failure 扱いしている。実 CI 必須ジョブはすべて SUCCESS (e2e, typecheck, lint, test, build, python-test, node-backed-hook-tests, actionlint, ci-verdict-summary, check-hook-integrity, validate-generated-artifact)。
CI 証拠種別: CI_CHECK_RUN_SCOPED (gh pr checks 直接確認、false positive 明記)
AC カバレッジ
| AC | 判定 | 証拠 |
|---|---|---|
| AC1 (linked worktree context allow) | PASS | test_issue1215_worktree_context in tests/codex/test_local_main_branch_guard.py L1362 |
| AC2 (context 判定のみ、git add 例外なし) | PASS | test_issue1215_no_git_add_exception in tests/codex/test_local_main_branch_guard.py L1384 |
| AC3 (worktree_scope_guard: explicit pathspec のみ allow) | PASS | .claude/hooks/tests/test_issue1215_git_add_allow.py 存在確認 |
| AC4 (git add . / -A / --all / pathspec-from-file / wrapper block) | PASS | .claude/hooks/tests/test_issue1215_git_add_block.py に git add . / -A / --all / --pathspec-from-file / bash -lc / command / env wrapper パターン確認 |
| AC5 (fixture files) | PASS | 両 JSON fixture ファイルが PR HEAD に存在 |
| AC6 (linked_issue_worktree_context reason code) | PASS | REASON_LINKED_ISSUE_WORKTREE_CONTEXT = "linked_issue_worktree_context" in scripts/agent-guards/local_main_branch_guard.py L51 + is_linked_issue_worktree_context L332 |
| AC7 (publish resume test) | PASS | .claude/hooks/tests/test_issue1215_publish_resume.py に direct publish block + controlled skill mutation allow テスト |
Allowed Paths Gate
status: ok — 9 ファイル全て Allowed Paths 内 (base_sha=eb66fcca 使用、前回 d5d6743 誤判定を解消)
Schema / Safety
- Schema Change Applicability: not_schema_change (確認)
- Safety Claim Matrix: 3 claim すべて実装済み・証跡あり・Not controlled 空
注記
PR は Draft 状態。merge_ready: true は review 観点の判定。Draft 解除は人間操作が必要。
Summary
local_main_branch_guardが linked issue worktree context を早期 allow できるようにし、reason code をlinked_issue_worktree_contextで追跡可能にしたworktree_scope_guardにgit addの explicit pathspec のみを許可する判定を追加し、広域 staging を fail-closed にした受け入れ条件の達成状況
local_main_branch_guardが root checkout 誤認を避けて allow することを fixture/test で確認local_main_branch_guardがgit addの command-specific 例外ではなく context 判定のみを担当するよう更新worktree_scope_guardが explicit pathspec 以外のgit addを block する focused test を追加git add ./-A/--all/ glob /--pathspec-from-fileを block する coverage を追加tests/fixtures/hooks/issue1215-pretooluse-dedicated-worktree-git-add.jsonとtests/fixtures/hooks/issue1215-permissionrequest-dedicated-worktree-git-add.jsonを追加linked_issue_worktree_contextreason code を code/test で追跡可能にしたgit add実行で publish blocker の再現/解消を確認検証コマンド結果
pnpm typecheckpnpm lintpnpm testpnpm builduv run --with pytest pytest tests/codex/test_local_main_branch_guard.py -k issue1215 -q(focused 検証 PASS)uv run --with pytest pytest .claude/hooks/tests/test_issue1215_git_add_allow.py .claude/hooks/tests/test_issue1215_git_add_block.py .claude/hooks/tests/test_issue1215_publish_resume.py -q(focused 検証 PASS)uv run --with pytest pytest .claude/hooks/tests/test_worktree_scope_guard.py -k "publish_termination_direct_denied_real_hook or publish_termination_executor_allowed_real_hook" -q(focused 検証 PASS)Allowed Paths 遵守
.claude/hooks/worktree_scope_guard.pyscripts/agent-guards/local_main_branch_guard.pytests/codex/test_local_main_branch_guard.py.claude/hooks/tests/test_issue1215_git_add_allow.py.claude/hooks/tests/test_issue1215_git_add_block.py.claude/hooks/tests/test_issue1215_publish_resume.pytests/fixtures/hooks/issue1215-pretooluse-dedicated-worktree-git-add.jsontests/fixtures/hooks/issue1215-permissionrequest-dedicated-worktree-git-add.jsonChecks
pnpm typecheckpnpm lintpnpm testpnpm buildSchema Change Applicability
not_schema_changeSchema Consumer Inventory
該当なし(N/A): schema change ではない。
互換性判断 (Compatibility Decision)
N/A(変更種別は該当なし)N/A(互換性影響は該当なし)N/A(移行作業は不要)N/A(追加移行や follow-up は不要)Safety Claim Matrix
local_main_branch_guardが linked issue worktree context を allow し、root default branch guard と責務分離されるtests/codex/test_local_main_branch_guard.py -k issue1215 -qworktree_scope_guardは explicit pathspec 以外のgit addを block する.claude/hooks/tests/test_issue1215_git_add_allow.py .claude/hooks/tests/test_issue1215_git_add_block.py.claude/hooks/tests/test_issue1215_publish_resume.pyとtest_worktree_scope_guard.py -k "publish_termination_direct_denied_real_hook or publish_termination_executor_allowed_real_hook"Notes