Skip to content

fix: markerless PR の Allowed Paths glob 被覆を共有 matcher で判定する - #2985

Merged
squne121 merged 2 commits into
mainfrom
worktree-issue-2972-markerless-pr-allowed-paths-glob-entry
Oct 8, 2026
Merged

squne121 merged 2 commits into
mainfrom
worktree-issue-2972-markerless-pr-allowed-paths-glob-entry

Conversation

@squne121

@squne121 squne121 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • markerless の open/draft PR が glob の Allowed Paths を被覆していても誤って reconciliation_required になる事象を修正した。Closes 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972
  • wildcard なしの entry は従来の完全一致・directory-prefix を維持し、明示 wildcard のみ共有 AllowedPathsMatcher の safe subset を read-only 再利用する。
  • PR files のうち各 entry に一致する file が 1 件以上あれば被覆とし、追加の unrelated file は拒否しない。fake gh の実 composition を正負両方で固定した。

受け入れ条件の達成状況

  • AC1: plain entry の完全一致・配下・兄弟 prefix 非一致を unit test で確認した。
  • AC2: trailing /**、1 segment の *、mid-path **、./ 正規化を unit test で確認した。
  • AC3: 兄弟 prefix、segment 数、partial *、不正 path/pattern の fail-closed を確認した。
  • AC4: 複数 entry の all-of、entry 欠落と unrelated PR file の許容を確認した。
  • AC5: 既存 unit test file の全 72 件が成功した。
  • AC6: fake gh の populated files で open/draft とも existing_pr_resume、markerless_allowed_paths_coverage、resume_existing_pr を確認した。
  • AC7: tests 配下のみ欠落した open/draft は reconciliation_required、open_draft_scope_ownership_not_exact となり resume を拒否した。
  • AC8: 既存登録済みの 2 test files のみ追加し、skill tests directory 全体を確認した。

検証コマンド結果

$ rg -q '^def test_markerless_plain_entry_legacy' .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py
$ rg -q '^def test_markerless_wildcard_safe_subset' .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py
$ rg -q '^def test_markerless_wildcard_fail_closed' .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py
$ rg -q '^def test_markerless_all_of_coverage' .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py
$ rg -q '^def test_markerless_glob_intake_positive' .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py
$ rg -q '^def test_markerless_glob_intake_negative' .claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py
6/6 PASS
$ uv run pytest .claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py
72 passed
$ uv run pytest .claude/skills/impl-review-loop/tests/
1023 passed, 1 skipped, 2 deselected, 1 xfailed
$ pnpm typecheck && pnpm lint && pnpm test && pnpm build
全て PASS(Vitest 108 files / 1943 tests)
$ uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py
24 passed
$ uv run ruff check <変更 3 files>
PASS

Allowed Paths 遵守

  • 変更ファイル: .claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py、.claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py、.claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py。
  • Allowed Paths 逸脱: なし。共有 matcher 自体は変更していない。

Checks

  • pnpm typecheck を実行して成功した。
  • pnpm lint を実行して成功した。
  • pnpm test を実行して成功した。
  • pnpm build を実行して成功した。

Schema Change Applicability

  • decision: not_schema_change
  • reason: markerless の ownership coverage 判定のみを修正し、schema のキー・型・producer-consumer wire は変更しない。

Schema Consumer Inventory

  • N/A: schema 変更はなく、共有 matcher の既存公開 API を read-only で再利用する。
  • change_type: N/A、compatibility: N/A、migration_required: N/A、migration_or_followup: N/A。理由は schema 差分が存在しないため。

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
markerless open/draft の被覆は各 Allowed Paths entry に対応する PR file が 1 件以上ある場合のみ成立する yes - unit tests と fake gh intake の正負テスト、AC1–8 N/A
PR files の全件許可判定は別の review gate の責務であり、この ownership 判定では行わない yes - unrelated PR file を追加しても被覆を維持する AC4、AC6 N/A

Notes

IMPLEMENTATION_SCOPE_COVERAGE_V1:
  schema_version: "IMPLEMENTATION_SCOPE_COVERAGE_V1"
  issue_number: 2972
  issue_body_sha256: "sha256:6870a98be59741fc25062a443d26c2dcb0d07d64039a9fb15fb79af4c7511233"
  normalized_scope_manifest_sha256: "sha256:8c73358ebdc70dafd0853d52db742e18b798cb7761dc29af7cd1e4975816c7b0"
  pr_head_sha: "2d3e241dd62c4ccd8d17bc38342d1c78c7fc1576"
  scope_manifest: {"acceptance_criteria": ["/** の兄弟 prefix、* に対する 0/複数 segment、partial-segment * / 不正 repo-relative pattern・file は誤被覆しない(fail-closed)。", "AC6 と同じ fake transport / markerless open/draft fixture から tests 配下の file のみ欠落させると current_scope_ownership=False、reconciliation_required / open_draft_scope_ownership_not_exact となり、resume_existing_pr action に進まない。", "Allowed Paths が複数ある場合、**各 entry** に少なくとも 1 PR file が一致したときだけ True。どれか 1 entry に対応する file が欠落すれば False。一方、追加の unrelated PR file があっても coverage は True のまま(全 PR files の許可判定にしない)。", "explicit wildcard entry は共有 AllowedPathsMatcher の safe-subset grammar に一致する。<dir>/** 配下、* の 1 segment、mid-path ** の 0/複数 segment を正しく扱い、./ 正規化を保つ。", "wildcard のない plain entry は file 完全一致または E/ 配下を従来どおり被覆し、単なる兄弟 prefix は被覆しない。literal-only を exact-only matcher semantics に退行させない。", "新規テストは既存の登録済み .claude/skills/impl-review-loop/tests/ 内の上記 2 file に限り、同 directory の pytest 全体が成功する。", "既存 intake integration test の fake gh transport で、Issue body の exact file 2 件 + tests/** 1 件と、全 entry を被覆する populated PR files を持つ markerless open/draft PR を production composition に通すと、candidate の current_scope_ownership=True、existing_pr_resume / markerless_allowed_paths_coverage、pre_step1_data_plane.action=resume_existing_pr となる。", "既存 unit test file 全体が成功し、markerless open/draft resume / reconciliation や marker 付き・その他 fail-closed rules は退行しない。"], "allowed_paths": [".claude/skills/impl-review-loop/scripts/implementation_landed_evidence.py", ".claude/skills/impl-review-loop/tests/test_implementation_landed_evidence.py", ".claude/skills/impl-review-loop/tests/test_implementation_landed_intake_integration.py"], "change_kind": "code", "goal_ref": "markerless な open/draft PR の Allowed Paths 被覆判定が glob entry を解釈できるようにし、被覆している PR が誤って reconciliation_required にならないようにする", "in_scope": ["_allowed_paths_covered() の all-of coverage(Allowed Paths の各 entry が少なくとも 1 PR file に一致)を維持し、PR files 全件を Allowed Paths に制約する別 gate に変更しない。", "explicit wildcard entry(* / ** を含む)は既存の scripts/agent-guards/changed_file_matcher.py::AllowedPathsMatcher を read-only で再利用し、その safe-subset grammar(literal segment、* はちょうど 1 segment、** は 0 個以上の segment・mid-path 可、leading ./ 正規化)と整合させる。partial-segment * / 不正 path は fail-closed。共有 matcher の実装や他 consumer の grammar は変更しない。", "wildcard のない plain entry は従来の P == E または E/ 配下の directory-prefix 判定を維持する。./ 正規化と無効な repo-relative path の fail-closed は共有 matcher に合わせる。literal entry を matcher の exact-only semantics に置換しない。", "既存 intake integration test へ fake gh transport の markerless open/draft PR fixture(Issue body の exact file 2 件 + tests/** 1 件、PR view の populated files)を追加し、collect_candidate_inputs() / build_intake_capsule.py::_collect_implementation_landed_evidence() の production composition から positive / negative disposition と pre-Step-1 action を検証する。", "既存 unit test に plain entry、trailing /**、*、mid-path **、./、無効 pattern / path、prefix sibling の positive / negative を追加する。"], "schema_version": "IMPLEMENTATION_SCOPE_MANIFEST_V1"}

この PR は自動支援で作成されました。
🤖 Generated with Claude Code

Wildcard のない entry は既存のディレクトリ prefix 判定を維持し、明示 wildcard は共有 matcher の safe subset を再利用する。fake gh の production intake positive/negative 回帰を固定する。

Co-Authored-By: Claude Code <[email protected]>
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #2985 closed).

@squne121

squne121 commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

レビュー判定: APPROVE

Issue #2972 の AC1–AC8 を確認しました。plain entry の従来の directory-prefix 判定を維持し、明示 wildcard は共有 matcher の safe subset を使用しています。all-of coverage と全変更ファイルの許可判定を混同していません。open/draft 双方の fake-gh 正負テストは production composition から pre-Step-1 action まで検証しています。

PR reference policy は closing_required / valid、live Issue に対する rename-aware Allowed Paths gate は ok(変更3ファイル)、独立 VC は exact head で 8/8 PASS。required CI は current head で passed です。各 entry の欠落ケースと wildcard の列挙ケースについて個別の実行 assertion も確認しました。

verdict: APPROVE
reviewed_head_sha: "2d3e241dd62c4ccd8d17bc38342d1c78c7fc1576"
blockers: []
warnings: []

@squne121

squne121 commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

レビュー判定: REQUEST_CHANGES

現在の HEAD 0e01a02a1097466f0b63fb4764507cb81004bd25 の差分・AC1–AC8 の assertion・live Issue に対する Allowed Paths gate(3ファイル、status ok)を確認しました。参照ポリシーは closing_required / valid、必須 CI 5件および独立 VC 8件は PASS です。merge-only 更新による PR スコープ外差分はありません。

未解決事項

追加 CI 証跡が未確定です。ci_verdict_summary.py は対象 HEAD について exit 20(python-test-core 進行中、deploy-pr 失敗)。後者のログは Playwright Chromium 起動直後の SIGSEGV を示します。両チェックの再確認・解消が必要です。

verdict: REQUEST_CHANGES
reviewed_head_sha: "0e01a02a1097466f0b63fb4764507cb81004bd25"
blockers:
  - "追加CI証跡未確定: ci_verdict_summary.py exit 20; python-test-core 進行中、deploy-pr 失敗(Chromium SIGSEGV)。"
warnings: []

@squne121

squne121 commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

レビュー判定: APPROVE

Issue #2972 の AC1–AC8 と現 HEAD の差分を独立に再確認しました。plain entry の従来の prefix 判定、共有 matcher による明示 wildcard、all-of coverage、open/draft の fake-gh 正負テストは契約に一致します。列挙ケースごとの executable assertions も確認しました(PR_REVIEW_JUDGE_EVIDENCE_COVERAGE_RULE_APPLIED)。

live Issue に対する rename-aware Allowed Paths 判定は ok(変更3ファイル)。reference policy は closing_required / valid。現 HEAD に束縛した required CI は passed、追加 CI は all_pass。deploy-pages の attempt 2 は deploy-pr: success、ci の python-test-core も success で、以前の CI 未確定 blocker は解消しています。Draft 状態そのものはレビュー blocker ではありません。

  • Mergeability: 現在の HEAD は MERGEABLE / CLEAN(終了判定は別途、正規の terminal gate に委ねます)。
  • Evidence Check: 独立 Verification Commands 8/8 PASS、必須 CI と追加 CI は現 HEAD で PASS。
  • Blockers: ありません。
  • Non-blockers: ありません。
verdict: APPROVE
reviewed_head_sha: "0e01a02a1097466f0b63fb4764507cb81004bd25"
blockers: []
warnings: []

@squne121

squne121 commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

PR #2985 敵対的レビュー

対象: PR #2985 / 関連 Issue #2972

1. 確認済みの状態

項目 | 確認結果 -- | -- PR | OPEN / Draft HEAD | 0e01a02 変更範囲 | Python 3ファイル Issue 契約 | AC1–AC8 GitHub Actions | 対象 HEAD の5 workflow が成功 最新の既存レビュー | APPROVE 未解決 review thread | 0件

以前の REQUEST_CHANGES は、追加 CI の未確定と Playwright Chromium の SIGSEGV が原因でした。後続の再実行が成功し、最新レビュー では解消済みと報告されています。

変更の中心は、markerless な既存 PR が Allowed Paths の tests/** などを正しく被覆している場合、誤って reconciliation_required と判定しないようにする修正です。

2. Findings

重大度順。いずれも今回の差分が新たに作った欠陥とは確認していませんが、同じ intake 経路に残る問題です。

P2 — PR files の100件制限による被覆判定の false-negative

問題

collect_candidate_inputs() は gh pr view --json ...files で変更ファイルを取得し、その配列を _allowed_paths_covered() に渡します。

しかし、GitHub CLI の upstream Issue #13338 では、gh pr view --json files が100件で切り詰められる問題が報告されています。

GitHub

例えば101番目以降にだけ tests/** を満たす変更があると、実際には全 Allowed Paths を被覆しているのに reconciliation_required になります。

Evidence

implementation_landed_evidence.py L709–771

最小修正案

changedFiles と取得件数を比較し、不完全な場合だけ GitHub PR files API の pagination で補完する。GitHub REST API はページネーションを提供しますが、最大3000件の制限があります。

GitHub Docs

現 PR 自体は3ファイルなので直接の blocker ではありません。

P2 — markerless candidate の PR body 更新を freshness rebind が検出しない

問題

_live_freshness_reference() は PR body と closing references を再取得しています。しかし通常の markerless candidate については、再取得した body の marker 状態を再評価しません。

このため、collection 後に PR body が変更されても、HEAD・Issue body・main が不変なら、古い current_scope_ownership=True に基づき existing_pr_resume が成立する可能性があります。

特に、markerless から malformed marker へ変更された場合に、本来の fail-closed 判断が適用されない競合が考えられます。

Evidence

implementation_landed_evidence.py L953–1086

最小修正案

既に再取得している body を使い、markerless candidate の marker 状態と closing authority の意味論的変化だけを再確認する。HEAD を変えず PR body だけ更新する fake-transport regression を追加する。

これは静的なコード経路分析による finding で、競合タイミングの実機再現までは実施していません。

3. 良好だった実装

今回の差分については、以下を確認しました。

  • wildcard-free entry の既存 directory-prefix semantics を維持している。

  • *、**、mid-path ** を共有 AllowedPathsMatcher に委譲し、独自 matcher を重複実装していない。

  • invalid path / pattern の主要な negative cases がテストされている。

  • all-of coverage と、全変更ファイルの Allowed Paths 許可判定を混同していない。

  • open/draft 双方で fake gh transport から pre-Step-1 routing まで検証している。

公式 Git 仕様でも trailing /** と mid-path ** の意味論は確認できます。ただし repository の matcher は意図的な safe subset であり、gitignore 全文法へ変更する必要はありません。

gitignore Documentation

4. 推奨判定

今回の差分に対する新規の merge-blocking defect は確認できませんでした。

現 HEAD の CI では python-test-core、python-test、ci-verdict-summary、deploy-pr が成功しています。独立したローカルテスト再実行は行っていません。

私の推奨は、PR #2985 の現在の実装は維持し、上記2件を別スコープの再発防止候補として扱うことです。100件制限への対応や freshness 改善のために、今回の小さな修正へ新たな gate・schema・approval layer を追加する必要はありません。

なお、既存の APPROVE は PR conversation コメント上の判定であり、GitHub の正式な review submission は取得できていません。Draft を解除する場合も、repository-native terminal gate を最終確認したうえで人間の merge 判断へ進めるのが適切です。

@squne121

squne121 commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

推奨アクション

PR #2985 の既存実装を維持し、impl-review-loop で最終検証・再レビューを実行して、マージ判断直前まで到達させる方針を推奨します。

指定された 敵対的レビューコメント #6058053421 には、同じ intake 経路に関する P2 finding が2件あります。

  1. PR files の100件制限:変更ファイルの取得漏れによって Allowed Paths の被覆判定が false-negative になる可能性。
  2. PR body の freshness rebind:収集後に markerless PR の body が変更された場合、古い ownership 判定が使われる可能性。

レビューコメント自体は、どちらも今回の差分が新たに導入した欠陥とは認定しておらず、別スコープでの対処を推奨しています。

したがって、#2972 の Allowed Paths を無理に拡張せず、2件は独立した再発防止 Issue の候補として扱うのが適切です。既存 Issue の重複検索と証拠確認を行い、必要なら別途起票します。

添付の実行ログでは、PR #2985 は一度 step5-terminal-gate の approved に到達しています。ただし、新しい実行ではその結果を無条件に再利用せず、現在の HEAD・CI・mergeability を再確認させます。

貼り付けたテキスト(1).txt

追加の live GitHub 確認では、PR #2985 は OPEN / Draft、HEAD は 0e01a02a1097466f0b63fb4764507cb81004bd25、main は 4afb0551d64aaebb9cca867c59f58c8c30550838 でした。対象 HEAD の5つの workflow は成功し、未解決 review thread は0件です。

なお、100件制限は GitHub CLI の upstream Issue #13338 でも報告されており、REST PR files API は最大3000件までページネーションを提供します。別 Issue の技術的根拠として利用できます。

image

GitHub

+1

Claude-GPT 向け実行プロンプト

repo: squne121/loop-protocol

対象:

あなたは既に repository-owned Claude-GPT profile の interactive fresh Claude Code session で auto mode として起動している。

現在の session、Claude Code harness、Claude-GPT launcher/profile、backend integration をそのまま利用する。再起動・モデル切替・permission mode 変更は不要。bypassPermissions、--dangerously-skip-permissions は使用しない。

目的

既存 PR #2985 を再利用し、指定された敵対的レビューを検証したうえで、current impl-review-loop に従い、人間が merge 判断できる直前まで自律的に完遂する。

必要なら次を実行する。

fresh intake → existing PR resume → verification → review → fix (必要な場合) → re-test → fresh re-review → terminal gate

調査・提案だけで終了しない。

ただし、前回の loop は draft_pr_ready / approved に到達済みである。既に成立した実装を理由なく作り直さず、現 HEAD と証拠が fresh であれば追加 code mutation は行わない。

今回の実ユーザーによる明示的承認

これは GitHub コメントや過去の agent report が権限を自動生成するものではなく、現在の実ユーザーからの新しい実行依頼・承認である。

以下の通常作業を、この invocation で事前承認する。

これらについて反復ごとの人間承認を要求しない。通常の failure は修正・再実行して進む。

ただし、この承認は permission classifier、repository の deterministic authority、Allowed Paths、canonical human_judgment_required 等を無効化しない。実際に拒否された操作は迂回せず、許可された経路での再評価を行う。

禁止事項:

  • PR の実 merge、auto-merge の有効化
  • force push、履歴破壊
  • unrelated branch/worktree の変更・削除
  • 他タスクの dirty work の破棄
  • secret/credential の取得・変更・公開
  • permission bypass
  • Issue 契約に反する scope expansion
  • stale evidence を用いた成功宣言

1. Fresh state の取得

開始直後に live GitHub と current repository を確認する。

  1. PR fix: markerless PR の Allowed Paths glob 被覆を共有 matcher で判定する #2985 の OPEN/Draft 状態、HEAD、base SHA、mergeability、mergeStateStatus
  2. Issue 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の最新本文・AC1–AC8・Allowed Paths・Stop Conditions
  3. 対象 comment 6058053421 の全文、投稿者、所属 PR、更新時刻
  4. 現在の全 review、未解決 thread、最新コメントと feedback
  5. 現 HEAD の required CI と追加 CI、attempt、失敗ログ
  6. current main HEAD、PR の behind 状態
  7. 専用 branch/worktree、clean/dirty state、既存 LOOP_STATE/terminal evidence
  8. 同一 Issue を扱う別 PR がないこと

前回の参考値:

  • PR HEAD: 0e01a02a1097466f0b63fb4764507cb81004bd25
  • main: 4afb0551d64aaebb9cca867c59f58c8c30550838
  • worktree: .claude/worktrees/issue-2972-markerless-pr-allowed-paths-glob-entry
  • branch: worktree-issue-2972-markerless-pr-allowed-paths-glob-entry

これらは snapshot にすぎない。現在の判断は live readback に基づける。

2. Current Skill と authority の確認

まず current repository の .claude/skills/impl-review-loop/SKILL.md を明示的にロードし、MUST_READ references と steps を読む。

少なくとも次を確認する。

  • CLAUDE.md および関連 .claude/rules/**
  • steps/preparation.md
  • steps/step-1-implementation.md
  • steps/step-2-verification.md
  • steps/step-4-pr-review.md
  • steps/step-5-feedback-and-termination.md
  • steps/step-5-mergeability-handling.md
  • .claude/agents/implementation-worker.md
  • .claude/agents/test-runner.md
  • .claude/agents/pr-reviewer.md
  • docs/dev/workflow.md
  • docs/dev/runtime-verification-policy.md

current impl-review-loop の canonical producer/checker/router が判断 authority である。

既存 PR の resume として進め、Step 1 の新規実装開始処理を不必要に再実行しない。新しい実装が必要になった場合のみ、current Skill の root-owned synchronous entry contract に従う。

3. 敵対的レビューコメントへの対応

指定コメントには P2 finding が2件ある。

Finding A: PR files の100件制限

gh pr view --json files の truncation により、Allowed Paths coverage が false-negative になる可能性。

調査対象:

  • collect_candidate_inputs()
  • _allowed_paths_covered()
  • changedFiles と取得済み files の関係
  • GitHub CLI upstream cli/cli#13338
  • GitHub REST PR files pagination と3000件上限

Finding B: markerless PR body の freshness

収集後に PR body の marker semantics が変化しても、既存の current_scope_ownership を再利用してしまう可能性。

調査対象:

  • _live_freshness_reference()
  • resolve_landing_disposition_with_freshness_rebind()
  • markerless / malformed marker の判定分岐
  • closing authority の意味論的変更
  • HEAD 不変・PR body 変更の race

Disposition

両 finding は、今回の #2972 のコード差分が新規導入した merge blocker とは確認されていない。

最初に current source / tests / 既存 Issue を再確認し、次の原則で扱う。

  1. 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の既存 AC1–AC8 が成立している場合、2件を理由に fix: markerless PR の Allowed Paths glob 被覆を共有 matcher で判定する #2985 を不要に修正しない。
  2. 本当に独立した残余 defect なら separate follow-up として扱う。
  3. 既存 Issue を all-state で検索し、同一 Outcome を所有する Issue があれば重複起票せずリンクする。
  4. 未起票で再現可能な defect なら、repository の canonical follow-up materialization route と Stop Conditions が許す範囲で起票する。
  5. Issue 化する場合は root cause、producer/consumer 経路、再現条件、期待結果、最小修正案、production-shaped regression、非対象範囲を明記する。
  6. 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の実装範囲や Allowed Paths を無断拡張しない。

この invocation は独立 follow-up の通常起票を事前承認するが、#2972 の canonical Stop Conditions によって別途分離が要求される場合はその route に従う。follow-up のために既存 PR の正常な merge-readiness 判定を不必要に妨げない。

新しい gate、schema、approval layer、generic glob library の追加を既定方針にしない。

4. SubAgent を必ず使用し、完了を待つ

current Skill が定義する責務分離を維持する。

  • implementation-worker: 必要な実装修正、fix_delta、update_branch、PR 更新
  • test-runner: current HEAD に対する独立 Verification Commands と regression verification
  • pr-reviewer: current HEAD の独立レビュー、AC、Allowed Paths、CI evidence の評価
  • 必要であれば codebase-investigator: 上記2件の P2 finding の read-only 調査

SubAgent dispatch 時には、次を必ず明示する。

  • target Issue/PR と expected HEAD
  • task、expected outcome
  • authoritative Skill/SSOT
  • Allowed Paths と禁止事項
  • 独立して取得すべき evidence
  • worktree / cwd の要件
  • expected structured terminal result

SubAgent を dispatch しただけで完了扱いにしない。

各 SubAgent について:

  • terminal completion を待つ
  • 最終結果を取得する
  • expected HEAD と evidence binding を照合する
  • tool の失敗・取消・未完了を PASS にしない
  • downstream の依存作業は結果を join してから起動する

独立した read-only 調査は並列化可能だが、verification → review → judgment の依存順序は守る。

nested delegation は current SubAgent contract が許す場合だけ使用する。

5. Verification / Review / Repair

PR #2985 の現行実装について、Issue #2972 の AC1–AC8 を再評価する。

重点:

  • wildcard-free plain entry の legacy directory-prefix compatibility
  • 明示 wildcard の AllowedPathsMatcher safe-subset semantics
  • * / ** / mid-path ** / leading ./
  • invalid pattern/path の fail-closed
  • 各 Allowed Paths entry の all-of coverage
  • unrelated PR file を ownership coverage の拒否条件にしないこと
  • fake gh transport の open/draft positive・negative
  • pre-Step-1 existing_pr_resume / reconciliation_required routing

Verification Commands は live Issue 本文から逐語抽出し、正しい Issue 専用 worktree で実行する。

前回ログでは、test-runner が誤って root/main checkout で実行したため証拠が無効になった。再発防止のため、各 command の実行時に cwd と HEAD を確認する。command hash の転記・binding も検証する。

required CI と追加 CI を現 HEAD で確認する。

  • CI pending は必要な範囲で完了を確認
  • 修復可能な CI failure はログから原因分類し、自動修復・再検証
  • 一時的な runner/browser 障害は current workflow で許される bounded retry
  • 以前の deploy-pr Chromium SIGSEGV は再実行成功済みだが、新たな失敗があれば改めて確認
  • test failure と環境由来 failure を混同しない

pr-reviewer が REQUEST_CHANGES を返した場合、current canonical loop に従って fix → re-test → fresh re-review を実施する。

HEAD が変われば旧 test/review approval を再利用しない。必ず新 HEAD に証拠を束縛し直す。

PR body の evidence-only 問題は current body-only repair lane の eligibility checker が適格と判断した場合だけ使用する。

6. Terminal gate

終了判定には current canonical step5-terminal-gate を使用する。

少なくとも次を確認する。

  • Issue AC1–AC8 が成立
  • verification が current PR HEAD で PASS
  • required CI が PASS
  • current Skill が要求する追加 CI evidence が成立
  • independent reviewer verdict が APPROVE
  • reviewer blockers == []
  • reviewed_head_sha == live PR HEAD
  • Allowed Paths gate が ok
  • 未解決の substantive review finding なし
  • live mergeability が approved route を満たす
  • GitHub main drift と worktree state が整合

mergeStateStatus: BEHIND なら canonical update_branch 経路を利用し、HEAD 更新後の再検証・再レビューまで行う。

UNKNOWN 等の一時状態は current Skill の bounded retry に従い、即座に human escalation としない。

route: approved が成立してはじめて draft_pr_ready 相当の terminal result とする。

前回の approved は参考 evidence とし、新 invocation における terminal gate 成功を捏造しない。

7. 停止境界

通常の test failure、修正可能な review finding、stale HEAD、修復可能な CI failure、PR body evidence 同期は停止理由にしない。

本当に停止する場合は以下に限定する。

  • canonical max_iterations 到達
  • live human stop
  • actual irreconcilable Git conflict
  • repository authority 外の変更が不可避
  • genuine human_judgment_required
  • secret/credential 操作
  • destructive operation
  • permission bypass が必要
  • current canonical recovery 後も evidence integrity を維持できない

停止が必要になっても、それまでの検証済み成果物を保持し、exact blocker を報告する。

8. 最終報告

作業が完了したら以下を証拠付きで報告する。

最終到達点は、人間が PR #2985 の merge 判断をできる状態である。

実際の merge、auto-merge、force push、不可逆 cleanup は行わない。

既存 PR を維持し、不要な変更や重複 Issue を増やさず、current repository-native workflow で完了させること。

このプロンプトは、既に approved を得た PR を不要に作り直さず、fresh な証拠で終了判定を再成立させる構成です。auto mode の安全判定自体を無効化するものではありませんが、通常の修正・GitHub 更新・CI 再実行については明示的な実行承認を含めています。

@squne121

squne121 commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

impl-review-loop 独立 PR レビュー(2026-10-08)

  • Mergeability: レビュー対象 HEAD 0e01a02a1097466f0b63fb4764507cb81004bd25。PR は OPEN / Draft、mergeable MERGEABLE、merge state CLEAN。Draft フラグの変更やマージは行わない。
  • Evidence Check: Issue 実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする #2972 の AC1–AC8 は live contract と実 assertion を照合した。独立 VC 8/8 PASS(AC5: 72 passed、AC8: 1326 passed・1 skipped・1 xfailed)。追加品質ゲートの typecheck、lint、1943 tests、build、model routing 24 tests は PASS。対象 HEAD の required CI 6/6 と追加 CI は成功。Allowed Paths は変更3ファイルと一致し、closing reference は valid。
  • Blockers: なし。現在の3ファイルの matcher 実装・テストに差分由来の blocker は認められない。
  • Non-blockers: 指定された敵対的レビュー の2件は再現済み。gh pr view の files 100件切り詰めによる ownership false-negative と、HEAD 不変で PR body marker または closing authority が変化した場合の freshness rebind 漏れは、いずれも本 PR 前から存在する別スコープの producer/rebind 問題。既存 Issue の重複を調べたうえで独立 follow-up として扱う。
verdict: APPROVE
reviewed_head_sha: "0e01a02a1097466f0b63fb4764507cb81004bd25"
blockers: []
warnings:
  - "別スコープ既存問題: gh pr view の files 100件切り詰めによる ownership false-negative。"
  - "別スコープ既存問題: markerless candidate の body/closing authority 変更を freshness rebind が検出しない。"

このレビュー verdict は terminal approval ではない。step5-terminal-gate の current-head 判定を別途実施する。

@squne121

squne121 commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

review loop の作業履歴

@squne121
squne121 marked this pull request as ready for review October 8, 2026 11:28
@squne121
squne121 merged commit d76e69f into main Oct 8, 2026
48 of 49 checks passed
@squne121
squne121 deleted the worktree-issue-2972-markerless-pr-allowed-paths-glob-entry branch October 8, 2026 11:43
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.

実装: markerless 既存 PR の Allowed Paths 被覆判定が glob entry(/**)を解釈できるようにする

1 participant