Skip to content

docs: verify_pr_reviewer_permission_boundary.py の stale な #25816 コメントを修正 - #2484

Merged
squne121 merged 3 commits into
mainfrom
worktree-issue-2430-upstream-25816-stale-comment
Sep 3, 2026
Merged

squne121 merged 3 commits into
mainfrom
worktree-issue-2430-upstream-25816-stale-comment

Conversation

@squne121

@squne121 squne121 commented Sep 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • scripts/agent-ops/verify_pr_reviewer_permission_boundary.py 内に残っていた、upstream anthropics/claude-code#25816 が現在も OPEN、または worktree 上の project-agent discovery が現在も confirmed broken であるかのように読める stale な current-state claim を、2 回のコミットに分けて計 5 箇所修正した。
    • 1 回目のコミットで module docstring「Agent discovery route」セクション、UPSTREAM_WORKTREE_AGENT_DISCOVERY_BUG_REF 定数付近のコメント、build_agents_json_passthrough_argv 呼び出し箇所のインラインコメントの計 3 箇所を修正した。
    • この 1 回目のコミットでは "Issue #25816 workaround" という stale な表現が 2 箇所(--agents JSON passthrough セクション見出し直前の divider comment、および build_agents_json_passthrough_argv 関数自身の docstring)で見落とされ、修正されずに残っていた。PR review の REQUEST_CHANGES でこれが指摘され、2 回目のコミット(本 fix_delta)でこの残存 2 箇所を修正した。
  • upstream #25816 は CLOSED であり、Claude Code v2.1.47(2026-02-18 リリース、release notes: "Fixed custom agents and skills not being discovered when running from a git worktree ... (#25816)")で修正済みであることを明記した。
  • 2 回目のコミットではさらに、1 回目のコミットで残っていた 2 つの過度に広範な current-state claim を、実態に即した記述へ縮小した。
    • module docstring の「file-based lookup is no longer known to be broken from a worktree cwd on a current Claude Code install」という一般化された無限定の主張を、「#25816 の startup-time worktree discovery defect が v2.1.47 で修正された」という具体的な事実の記述に縮小し、worktree-cwd discovery 全般に他の既知の問題が一切ないことまでは主張しないと明記した。
    • module docstring の「removing any ambiguity about which effective agent definition ... is actually in force at runtime」という主張を、「候補定義を session scope で明示的に供給することで、候補プロジェクト定義と lower-priority な project/user/plugin discovery path との間の曖昧性を除去する(session-local --agents は higher-priority な managed settings に優先しない、という現行の Claude Code precedence の範囲内)」という、実際の Claude Code の優先順位ルールを超えて一般化しない記述に縮小した。
  • --agents JSON passthrough を現在も使用し続けている理由を、historical 理由(#25816 の workaround として導入された経緯)と current 理由(candidate-head の .claude/agents/pr-reviewer.md agent definition を毎回 fresh に session-local binding するという現行の目的)に区別して記述した。
  • project .claude/agents/ discovery(file-based, --agent <name>)と --agents session-local JSON binding は、引き続き明確に区別された別経路として記述し、同値視する記述は加えていない。
  • コメント・docstring のみの変更で、実行ロジック(translate_agent_definition_to_agents_json / build_agents_json_passthrough_argv / 分類関数等の挙動)は 2 回のコミットいずれでも変更していない。

Checks

  • pnpm typecheck(tsc --noEmit exit 0)
  • pnpm lint(eslint . — No issues found)
  • pnpm test(vitest run — Test Files 105 passed / Tests 1874 passed)
  • pnpm build(tsc && vite build exit 0)
  • uv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py(24 passed)
  • 本 fix_delta(2 回目のコミット)でも、上記コマンド全てを worktree 内で再実行し、全て PASS を確認した(本 PR が Python スクリプトのコメント・docstring のみを変更するものであり src/ 配下への影響は想定していないが、プロジェクト規約の必須検証コマンドに従い実際にローカル実行して確認した)。

Schema Change Applicability

  • decision: not_schema_change
  • reason: 対象ファイル内のコメント・docstring テキストの修正のみであり、producer-consumer 境界をまたぐ machine-readable contract(YAML schema、CLI 引数契約、schema_summary フィールド等)の追加・変更・削除を一切行わない。実行ロジック・関数シグネチャ・CLI 引数・exit code は 2 回のコミットいずれでも変更していない。

Schema Consumer Inventory

N/A(not_schema_change のため)。

Safety Claim Matrix

Allowed Path scripts/agent-ops/verify_pr_reviewer_permission_boundary.py はファイル名に permission を含むため safety-sensitive PR として扱う。

Claim Implemented? Not controlled Evidence Follow-up
本 PR(2 回のコミット計)は対象ファイルのコメント・docstring テキストのみを修正し、preflight_capability / translate_agent_definition_to_agents_json / build_agents_json_passthrough_argv / classify_positive_case / classify_deny_case / _tool_call_not_attempted 等、既存の permission-boundary probe の実行ロジック・判定条件を一切変更しない yes n/a git diff は対象ファイル 1 件のみで、変更箇所は module docstring の該当セクション(2 箇所)、UPSTREAM_WORKTREE_AGENT_DISCOVERY_BUG_REF 付近のコメント、--agents JSON passthrough divider comment、build_agents_json_passthrough_argv 関数の docstring とその呼び出し箇所のインラインコメントの計 5 箇所に限定される。両コミットとも python3 -m py_compile が成功しており構文・実行可能コードは無傷 N/A
upstream anthropics/claude-code#25816 が CLOSED / Claude Code v2.1.47 で修正済みであるという記述内容は、issue-refinement-loop の web-researcher による一次資料(GitHub Issue ページ、公式リリースノート)fact-check で事前検証済みの事実であり、本 PR はその検証済み事実を本文に反映しただけで新たな未検証の外部主張を追加しない yes n/a Issue #2430 本文の Runtime Verification Applicability セクションに fact-check の実施経緯が明記されている。本 fix_delta 後は rg -c "v2.1.47" が 4 件ヒットすることを確認済み(1 回目のコミット時点の 3 件 + 2 回目のコミットで縮小した module docstring の主張に v2.1.47 参照を 1 件追加) N/A

記載ルール遵守: Not controlled は全行 n/a のため、無限定の safe / read-only / sandboxed / isolated / complete の主張は本 PR 本文に含めていない。

Notes

検証コマンド結果

Issue #2430 の Verification Commands(AC1〜AC4)に加え、PR review REQUEST_CHANGES で追加指摘された検証コマンドも実行し、全て PASS を確認した。

$ ! rg -q "confirmed OPEN upstream Claude Code bug" scripts/agent-ops/verify_pr_reviewer_permission_boundary.py
$ echo $?
0

$ ! rg -q "confirmed broken from a git-worktree cwd upstream" scripts/agent-ops/verify_pr_reviewer_permission_boundary.py
$ echo $?
0

$ ! rg -q "Issue #25816 workaround" scripts/agent-ops/verify_pr_reviewer_permission_boundary.py
$ echo $?
0

$ rg -c "v2.1.47" scripts/agent-ops/verify_pr_reviewer_permission_boundary.py
4

$ python3 -m py_compile scripts/agent-ops/verify_pr_reviewer_permission_boundary.py
$ echo $?
0

いずれも exit 0(PASS)。

…を修正 (#2430)

upstream anthropics/claude-code#25816 は CLOSED / Claude Code v2.1.47 で修正済み。
module docstring・定数コメント・呼び出し箇所インラインコメントの3箇所に残っていた
「現在も OPEN / confirmed broken」という記述を修正し、--agents JSON passthrough を
retain している理由を historical(#25816 workaround)と current(candidate-head の
agent definition を session-local に fresh binding し曖昧性を避けるため)に区別して
記述した。ロジック変更なし(コメントのみ)。

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

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #2484 closed).

@squne121

squne121 commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

PR Review Verdict (impl-review-loop Step 4)

Verdict: APPROVE

Independently verified against head bfb73cbf6df860298fbb916ee7abdfd1ce90a8a9:

  • Diff scope: exactly scripts/agent-ops/verify_pr_reviewer_permission_boundary.py (Allowed Paths gate: status: ok, no violations).
  • AC1-AC4 re-executed at the exact head blob and match: AC1 (! rg -q "confirmed OPEN upstream Claude Code bug" → exit 0), AC2 (! rg -q "confirmed broken from a git-worktree cwd upstream" → exit 0), AC3 (rg -c "v2.1.47" → 3), AC4 (python3 -m py_compile → exit 0).
  • Required CI (validate-generated-artifact, lint, test, build, typecheck) all SUCCESS at this exact head, no staleness.
  • Historical (upstream #25816 workaround) vs. current (session-local fresh binding to avoid effective-definition ambiguity) retention rationale is clearly distinguished.
  • .claude/agents/ file-based discovery vs. --agents session-local JSON binding remain described as distinct, non-equivalent mechanisms.
  • No scope creep: run_worktree_agent_runtime_smoke.py untouched, no new tests/harnesses/schemas/artifacts.

Non-blocking warning: PR body uses alternate section headings ("Checks" / "検証コマンド結果") instead of the canonical "## 受け入れ条件の達成状況" / "## Allowed Paths 遵守" / "## Runtime Verification Evidence" headings. Substance independently reproduced and correct, so treated as formatting variance (consistent with prior merged PR #2478).

verdict: APPROVE
reviewed_head_sha: "bfb73cbf6df860298fbb916ee7abdfd1ce90a8a9"
blockers: []
warnings:
  - "PR body uses alternate section headings (Checks / 検証コマンド結果) instead of the canonical AC-status headings; substance independently verified as present and correct, treated as non-blocking formatting variance consistent with prior merged PR #2478."

@squne121

squne121 commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

判定

REQUEST_CHANGES を推奨します。

PR #2484 は方向性そのものは正しく、ロジック変更もありません。head bfb73cb... は draft / mergeable で、既存 impl-review-loop レビューは APPROVE、AC1–AC4 と CI も再確認済みと報告されています。

ただし、このPRの目的である「stale な #25816 説明を除去する」がまだ完遂されていません。さらに、新しく追加した current-state wording にも過剰な断定があります。

P1 — Issue #25816 workaround が2箇所そのまま残っている

変更後の同一ファイルにはまだ、

# ─── Agent discovery: --agents JSON passthrough (Issue #25816 workaround) ──

と、

session-local ``--agents <json>`` payload instead of the file-based
``--agent <name>`` project-discovery lookup alone (Issue #25816
workaround, see module docstring).

が残っています。

これは細かい言い回しではありません。Issue #2430 の直前の敵対的レビュー自身が、passthrough builder: Issue #25816 workaround を stale surface として明示的に列挙していました。そのレビューの主張は「特定の2文だけでなく同一ファイルの current-failure 表現全体を閉じる」ことでした。

ところが今回のPR本文は「同一ファイル内の3箇所すべてを修正した」と宣言しています。 実際には上記2箇所が残っているため、PR Summary の completeness claim 自体が成立していません。

これは既存 APPROVE が見落としている blocker と判断します。

最小修正で十分です。例えば、

# Agent discovery: --agents JSON passthrough
# (introduced historically for #25816; retained for candidate-definition binding)

および、

... project-discovery lookup alone
(historically introduced for #25816; see module docstring).

程度でよく、ロジック・テスト・新規harnessは不要です。


P1 — stale claim を消す代わりに、別の広すぎる current-state claim を追加している

新しいmodule docstringは、

the file-based lookup is no longer known to be broken from a worktree cwd on a current Claude Code install

としています。

anthropics/claude-code#25816 が CLOSED なのは正しいです。v2.1.47 の公式リリースも、git worktree で custom agents / skills が発見されない問題を修正したと明記しています。

しかし、「#25816 の具体的な障害が修正された」以上の一般化は避けるべきです。2026年8月19日には、Claude Code 2.1.224 で「git worktree 内の project custom agents が /compact 後に全消失する」という別の open bug #88023 が報告されています。つまり「worktree cwd ではもう broken と知られていない」という一般論は、少なくとも現在の公開情報に対して強すぎます。([GitHub]1)

今回のprobeは fresh process なので #88023 の /compact 症状には直接当たりません。したがって、必要なのは追加harnessではなくclaimを狭めることです。

推奨表現は、

#25816's startup-time worktree discovery defect was fixed in Claude Code v2.1.47.

程度です。

「現在のClaude Codeではworktree discoveryは壊れていない」という可変な状態まで文書に固定しない方が、今回と同じ stale-comment cleanup を将来繰り返さずに済みます。


P1/P2 — --agents が「実効 definition の曖昧性を除去する」という説明は絶対保証ではない

今回の新しい中心的説明は、candidate の .claude/agents/pr-reviewer.md を --agents に渡すことで、

removing any ambiguity about which effective agent definition ... is actually in force

としています。

ここも少し強すぎます。

Claude Code の現行公式priorityは、

  1. Managed settings
  2. --agents
  3. project .claude/agents/
  4. user
  5. plugin

です。つまり --agents は project/user/plugin の同名定義には勝ちますが、managed definition には勝ちません。公式docsも --agents を session scope / priority 2 と明記しています。([Claude]2)

しかも repository 自身の PR #2429 は既にこのpriority順を認識しており、Tier 2 を「candidate-head の .md をfreshに --agents へ渡す candidate-definition binding」として限定的に定義しています。

個人趣味環境では managed settings の同名 pr-reviewer が存在する可能性は低いので、新しいmanaged-settings detectorやsecurity gateを作る価値はありません。単にコメントを、

eliminates ambiguity between the candidate project definition and lower-priority project/user/plugin discovery paths

あるいはもっと簡潔に、

explicitly supplies the candidate definition at session scope

まで弱めれば十分です。


P2 — 同じファイル内の「公式 --agents 全16フィールド」という別の説明も、現在のdocsとはずれている

これは #2484 の blocker にはしませんが、WEB照合で見つかった隣接事項です。

同ファイルは _AGENTS_JSON_OFFICIAL_FIELDS を16項目として、

All officially-documented --agents ... fields ... verified 2026-08-29

としています。

しかし現在の公式docsが --agents JSONについて列挙しているのは description, tools, disallowedTools, model, permissionMode, mcpServers, hooks, maxTurns, skills, initialPrompt, memory, effort, background, isolation と prompt で、repo側allowlistの color / experimental はその一覧にありません。また v2.1.242+ は --agents JSONをstartup時にvalidationすると公式CLI referenceにあります。([Claude]2) ([Claude]3)

幸い現在の pr-reviewer.md は tools, disallowedTools, model, effort, permissionMode, skills, hooks 等だけを使っており、今回の実経路には影響していません。

したがって #2484 にスコープを広げる必要はありません。将来 color / experimental をcandidate agentに使う段階で確認すれば足ります。


推奨する修正量

このPRは大きくしない方がよいです。追加コミット1個、コメントだけで終えるのが適切です。

  1. 残っている2つの Issue #25816 workaround を historical wording に変更。
  2. no longer known to be broken ... current install を「#25816 の具体的障害は v2.1.47 でfix」に限定。
  3. removing any ambiguity about which effective agent definition を session/project discovery 間の優先関係に限定する。
  4. VC にこれだけ追加する。
! rg -q "Issue #25816 workaround" \
  scripts/agent-ops/verify_pr_reviewer_permission_boundary.py

これなら、今回既に起きた「AC1/AC2はPASSなのに stale workaround wording が残る」を直接防げます。

python3 -m py_compile は残してよいですが、新しいruntime smoke、permission probe、schema、artifact、security harnessは不要です。コメント修正のために Claude Code をlive起動する価値もありません。

最終評価

現headのままは merge 非推奨。REQUEST_CHANGES。

主因はセキュリティではなく、PR #2484 が自分自身の目的と過去レビューで指定された stale surface を完全には閉じていないことです。修正は非常に小さくできます。修正後は、個人開発としてそれ以上の検証を積み増さずそのままマージ候補にしてよいと考えます。

@squne121

squne121 commented Sep 3, 2026

Copy link
Copy Markdown
Owner Author

確認した限り、PR #2484 は現在も open / draft / mergeable、head は bfb73cbf… のままで、敵対的レビュー後の修正コミットはまだありません。 敵対的レビューで指摘された Issue #25816 workaround の残存2箇所も、現headで実際に確認できます。

推奨は、今回のコメントを trusted human fix_delta として impl-review-loop を #2430 / PR #2484 から再開することです。既存の APPROVE は敵対的レビューより前のhead評価なので、修正後headでは Step 2 → CI → Step 4 を新規に取り直します。修正自体はコメント限定で、追加runtime smokeやpermission harnessは不要です。敵対的レビューの「worktree discovery 全般が現在壊れていない、と一般化しない」は妥当で、別件 #88023 は現在も open です。([GitHub]1) また --agents の優先順位も Managed settings が最上位、--agents が2位なので、「effective definition の曖昧性を完全に除去」という表現は狭めるべきです。([Claude]2)

一方、敵対的レビュー中の非blockerである _AGENTS_JSON_OFFICIAL_FIELDS は今回触らない方がよいです。現行公式docsでは color はすでに --agents の対応フィールドとして明記されており、コメント中の「color は公式一覧にない」という部分は現在の一次資料とは一致しません。([Claude]2)

以下を新しい Claude Code セッションにそのまま渡す想定です。

PR #2484 / Issue #2430 の impl-review-loop を、現在の状態から再開してください。

対象:

  • Repository: squne121/loop-protocol
  • Implementation Issue: #2430
  • Existing PR: #2484
  • trusted human context / fix_delta anchor:
    https://github.com/squne121/loop-protocol/pull/2484#issuecomment-5526232591

目的は、PR #2484 の敵対的レビューで判明した blocker を最小修正し、実装 → 検証 → PR review のループを、人間の途中承認なしで merge 直前の状態まで完了することです。

実際の merge は絶対に実行しないでください。

1. Authority / startup

最初に repository 内の最新の

.claude/skills/impl-review-loop/SKILL.md

をロードし、その canonical procedure、steps、scripts、routing contract を正本として従ってください。

Issue #2430、PR #2484、PR comments、current head、current branch/worktree、CI を live に再取得してください。

この invocation は、上記 anchor comment の REQUEST_CHANGES を修正要求 fix_delta として処理して、その修正を自律的に続行することを明示的に指示しています。

したがって anchor comment 内の REQUEST_CHANGES という語を、この invocation に対する「作業停止」の human veto と解釈しないでください。

anchor comment は trusted human context として

human_context_comment_urls

に明示的に渡してください。

過去の APPROVE verdict は anchor comment より前の評価なので、最終 verdict として再利用しないでください。

current head が変わった後は必ず current-head evidence を取得し直してください。

2. Autonomy

通常の実装作業について人間承認を求めないでください。

以下はこの invocation で事前承認済みです。

  • Allowed Paths 内の編集
  • 必要な formatter / lint / typecheck / test / verification command の実行
  • git add / commit
  • repository が定義する正規 publish lane による既存 PR branch への push
  • PR body の修正
  • PR comment / impl-review-loop report の更新
  • current-head CI の待機・確認
  • implementation-worker / test-runner / pr-reviewer の再実行
  • REQUEST_CHANGES → fix → verify → rereview の反復

AskUserQuestion 等で通常の変更方針・commit・push・test・review 再実行について確認しないでください。

ただし repository の canonical hard stop は尊重してください。

actual Git conflict、Allowed Paths 外の実装変更が不可避、secret/protected-path decision gate、実行ロジック変更が必要、repo guard が機械的に publish を拒否して安全に解決不能、その他 impl-review-loop が明示する genuine hard stop に到達した場合だけ停止してください。

force push、guard bypass、merge は行わないでください。

SubAgent が単に human_review_required: true を自己申告しただけなら、それ自体を停止理由にせず、現行 impl-review-loop contract に従って warning として処理し、可能ならループを継続してください。

3. SubAgent execution — completion を必ず待つこと

各実装・検証・レビューは impl-review-loop が指定する SubAgent に委譲してください。

少なくとも、

  • implementation → implementation-worker
  • verification → test-runner
  • PR review → pr-reviewer

を canonical procedure に従って使用してください。

SubAgent を起動しただけで次の Step に進まないでください。

各 SubAgent dispatch 後、その SubAgent が terminal state に到達し、最終結果を返すまで必ず待ってください。

background execution を使用した場合も、root/main thread は completion を明示的に回収するまで先へ進まないでください。

SubAgent がまだ running の状態で、

  • 次 Step を開始する
  • verdict を推測する
  • loop を終了する
  • 最終報告を書く

ことを禁止します。

完了した SubAgent の結果を LOOP_STATE に反映してから次 Step に進んでください。

Issue #2430 の Stop Conditions に抵触する nested SubAgent delegation は行わないでください。root orchestrator → canonical Step SubAgent の委譲に留めてください。

4. 今回の fix_delta

anchor comment の blocker を、scope を広げずに処理してください。

対象ファイルは原則として

scripts/agent-ops/verify_pr_reviewer_permission_boundary.py

のみです。

A. 残存する Issue #25816 workaround

current head に残っている少なくとも以下の2箇所を historical wording に変更してください。

1つ目:

# ─── Agent discovery: --agents JSON passthrough (Issue #25816 workaround) ──

2つ目:

project-discovery lookup alone (Issue #25816 workaround, see module docstring).

「現在も #25816 のための workaround である」と読めないよう、

  • historically introduced for #25816
  • currently retained for candidate-definition/session-local binding

を明確に分離してください。

B. worktree discovery についての過剰な current-state claim

以下のような一般化:

no longer known to be broken from a worktree cwd on a current Claude Code install

は削除または狭めてください。

主張は #25816 固有の確認済み事実に限定してください。

例えば意味として、

#25816's startup-time worktree discovery defect was fixed in Claude Code v2.1.47.

程度に限定します。

「現在の Claude Code の worktree discovery 全般には既知問題がない」という claim は作らないでください。

追加 runtime smoke は不要です。

C. --agents の binding claim を限定

以下のような絶対表現:

removing any ambiguity about which effective agent definition ... is actually in force

は狭めてください。

現行 Claude Code の precedence では managed settings が --agents より上位です。

したがって、

explicitly supplies the candidate definition at session scope

または、

candidate project definition と lower-priority project/user/plugin discovery paths の間の曖昧性を除く、

という限定された説明にしてください。

managed settings の detector、追加 security gate、追加 harness は作らないでください。

5. 今回スコープに入れない事項

anchor comment の adjacent P2 で言及された

_AGENTS_JSON_OFFICIAL_FIELDS

や color / experimental の整理は PR #2484 では行わないでください。

これは blocker ではありません。

また、現行 Claude Code 公式 docs では color は --agents の対応フィールドとして記載されています。

したがって、この adjacent finding を根拠に field allowlist を変更しないでください。

以下も変更しないでください。

  • run_worktree_agent_runtime_smoke.py
  • permission-boundary probe の実行ロジック
  • agent discovery route の再設計
  • schema
  • artifact
  • security harness
  • runtime smoke の新設
  • unrelated comments

コメント/docstringの正確性修正に限定してください。

6. Verification Command の追加

既存 AC1〜AC4 は維持してください。

さらに今回見落とされた stale surface の回帰防止として、少なくとも以下を verification に追加してください。

! rg -q "Issue #25816 workaround" \
  scripts/agent-ops/verify_pr_reviewer_permission_boundary.py

既存の、

! rg -q "confirmed OPEN upstream Claude Code bug" \
  scripts/agent-ops/verify_pr_reviewer_permission_boundary.py

! rg -q "confirmed broken from a git-worktree cwd upstream" \
  scripts/agent-ops/verify_pr_reviewer_permission_boundary.py

rg -c "v2.1.47" \
  scripts/agent-ops/verify_pr_reviewer_permission_boundary.py

python3 -m py_compile \
  scripts/agent-ops/verify_pr_reviewer_permission_boundary.py

も再実行してください。

repository canonical procedure が要求する lint / test / typecheck / build / CI も current head に対して実行・確認してください。

コメント変更だけであることを理由に、必要な canonical verification を捏造・省略しないでください。

一方で、新しい Claude Code live runtime probe は追加しないでください。

7. PR body hygiene

修正後、PR body の Summary と verification evidence も実態に合わせて更新してください。

現在の

「同一ファイル内の3箇所すべてを修正した」

という brittle な completeness claim は、今回追加で残存2箇所を直すため、そのまま使わないでください。

例えば、

  • 元Issueで列挙された current-failure claims
  • 同一ファイルに残っていた Issue #25816 workaround wording
  • overly broad current-state wording

を解消した、と実態に一致する記述へ更新してください。

また、

「effective agent definition の曖昧性を完全に除去」

という PR body の claim も、実際の precedence に合わせて session-local candidate binding の限定的な説明へ修正してください。

追加した rg verification の結果も PR body に記録してください。

8. Commit / push

変更を確認後、implementation-worker に canonical procedure で commit させてください。

既存 PR #2484 の branch に publish してください。

新規 PR を作らないでください。

force push は禁止です。

push 後は live PR head SHA を再取得し、local/published head が一致していることを確認してください。

9. 修正後は必ず新headで loop を続行

push した時点で以前の

  • verification evidence
  • CI evidence
  • APPROVE verdict

は current-head authority として再利用しないでください。

新しい head に対して Step 2 Verification を実行してください。

test-runner の完了を必ず待ってください。

その後 current-head CI を確認し、必要な required checks が完了するまで canonical wait procedure に従ってください。

それから Step 4 PR Review を pr-reviewer に委譲してください。

pr-reviewer の完了を必ず待ってください。

reviewer は current head SHA に束縛してください。

10. Review loop

新しい reviewer verdict が REQUEST_CHANGES の場合、

blockers を fix_delta として implementation-worker に返し、

Implementation
→ Verification
→ PR Review

を再度実行してください。

この反復について途中の人間承認を求めないでください。

stale-head verdict なら current head で再reviewしてください。

branch が BEHIND なら impl-review-loop の canonical update_branch route に従い、worker 完了を待った後 Verification / PR Review を再取得してください。

warning のみで blocker がない場合は、不必要な追加設計・harness・security mechanism を増やさないでください。

11. 終了地点

次の状態まで自律的に進めてください。

  • current head に対する verification が PASS
  • current head に対する required CI が PASS
  • current head に対する pr-reviewer verdict が APPROVE
  • blockers: []
  • Allowed Paths violation なし
  • live mergeability に actual conflict なし
  • PR body が current implementation/evidence と一致
  • 未解決の今回scope内 blocker なし

ここまで到達したら、impl-review-loop の canonical terminal result / completion report を出してください。

PRの merge は実行しないでください。

また、repository contract が GitHub Draft → Ready の遷移を人間操作として予約している場合、その境界自体を勝手に変更しないでください。実装・検証・レビューが完了した draft_pr_ready 相当の地点を「merge直前」の完了地点として扱ってください。

最後の報告には最低限、

  • final head SHA
  • commit
  • changed files
  • verification results
  • CI results
  • final reviewer verdict
  • blockers / warnings
  • live mergeability
  • PR URL
  • merge 未実行であること

を含めてください。

特に重要なのは、anchor の REQUEST_CHANGES を今回の再開セッションでは停止命令ではなく fix_delta と明記した点と、SubAgent を dispatch しただけで進まず「完了を待つ」と明文化した点です。現行 impl-review-loop 自体も REQUEST_CHANGES を修正ループへ返し、APPROVE後の実マージ判断は人間側に残す設計です。

…rbroad claims

前回のコミットでは module docstring・UPSTREAM_WORKTREE_AGENT_DISCOVERY_BUG_REF・
build_agents_json_passthrough_argv の3箇所を修正したが、PR review REQUEST_CHANGES
で以下が指摘された:

1. divider comment (`--agents JSON passthrough (Issue #25816 workaround)`) と
   build_agents_json_passthrough_argv の docstring 内の残存 "Issue #25816
   workaround" 表現が2箇所修正されずに残っていた。
2. module docstring の "no longer known to be broken ... on a current
   Claude Code install" という一般化された主張が過度に広範だった。
3. module docstring の "removing any ambiguity about which effective agent
   definition ... is actually in force" という主張が、session-local
   --agents が higher-priority managed settings に優先しないという実際の
   Claude Code precedence を超えて過大に一般化されていた。

このコミットは、残存する2箇所の "Issue #25816 workaround" 表現を除去し、
過度に広範な2つの主張を実態に即した記述へ縮小する。ロジック変更なし
(コメント・docstring のみ)。

Issue: #2430
@squne121
squne121 marked this pull request as ready for review September 3, 2026 13:32
@squne121
squne121 merged commit d9f5e98 into main Sep 3, 2026
44 checks passed
@squne121
squne121 deleted the worktree-issue-2430-upstream-25816-stale-comment branch September 3, 2026 13:46
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.

実装: verify_pr_reviewer_permission_boundary.py の stale な upstream #25816 コメントを修正する

1 participant