Repository navigation
feat: .gemini/settings.json に Serena MCP excludeTools denylist を追加 (#140) - #261
Conversation
) mcpServers.serena に excludeTools 配列を追加し、SERENA_DANGEROUS_TOOLS (21 ツール)を列挙する。これにより preflight_gemini_headless.py の local_asset_research dangerous tool denylist チェックが PASS し、 codebase-investigator SubAgent が Gemini に委譲できる状態になる。 設定ファイルが未追跡だったため、初回コミットとして追加する。 trust: false と includeTools(read-only 6 ツール)の既存値は保持。 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
TEST_VERDICT:
result: PASS
mergeable: MERGEABLE
merge_state_status: BEHIND
baseline_only: false
verification_commands_pass: 5
verification_commands_fail: 0検証結果レポートIssue #140:
|
| AC | 確認コマンド | 実行結果(要約) | 判定 |
|---|---|---|---|
| AC1 | 21 dangerous tools を excludeTools に確認 | 全ツールが存在 | PASS |
| AC2 | preflight_gemini_headless.py 実行 | ok: true, denylist/excludeTools エラーなし | PASS |
| AC3 | trust が false か確認 | trust: false | PASS |
| AC4 | includeTools が 6 read-only tools か確認 | 完全一致 | PASS |
| AC5 | PR 本文に Known remaining preflight errors 記載 | 明示されている(warnings のみ、non-blocking) | PASS |
標準品質ゲート
| コマンド | 結果 |
|---|---|
pnpm typecheck |
PASS |
pnpm lint |
PASS |
pnpm test |
PASS (5 tests, 4 files) |
pnpm build |
PASS |
uv run pytest test_model_routing.py |
PASS (21 tests) |
総合判定
- 全 AC PASS: YES
- 品質ゲート PASS: YES
- マージ可能状態: MERGEABLE (main に 3 commits behind)
Generated with Claude Code
squne121
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BEHIND
- BEHIND は conflict blocker ではないが、マージ前に base branch との同期が必要。
Evidence Check
AC coverage:
- AC1: PASS —
excludeToolsに 21 ツール全含有を diff と TEST_VERDICT で確認済み - AC2: PASS — runtime verification evidence あり(preflight ok:true, local_asset_research.ok:true, errors:[])。SKIP のみ・fallback PASS ではなく実実行証跡
- AC3: PASS — diff で
trust: falseを確認 - AC4: PASS —
includeToolsに read-only 6 ツールのみ(find_file, find_referencing_symbols, find_symbol, get_symbols_overview, list_dir, search_for_pattern) - AC5: PASS — known remaining warnings(terminal color, ripgrep fallback)を PR 本文に明示、non-blocking であると明記
Allowed Paths: 遵守 — gh pr diff --name-only の出力は .gemini/settings.json のみ。Allowed Paths(.gemini/settings.json)と完全一致。
CI Verification: 全 5 チェック PASS(build / lint / python-test / test / typecheck)
検証コマンド結果: PR 本文の ## Verification Commands 実行結果 セクションに AC1〜AC4 の実行結果が記載済み。TEST_VERDICT_MACHINE コメントで verification_commands_pass:5, fail:0 を確認。
Runtime Verification(decision: immediate): AC2 の runtime-verification 証跡が PR 本文に存在し、SKIP のみ / fallback FAIL 相当の記述なし。要件を満たす。
Schema Change Applicability: .gemini/settings.json の変更は schema-governance.md の Initial Known Schemas に該当しない config 変更であり、schema_change_applicability: not_schema_change と判定。Schema Consumer Inventory 不要。
Blockers
-
Safety Claim Matrix 欠如(APPROVE 禁止)
本 PR は
.gemini/settings.jsonのmcpServers.serenaにtrust、excludeTools、includeToolsを設定し、MCP tool access control を構成する変更である。pr-review-judge SKILL の Safety Claim Gate 判定基準:
- PR diff/本文に
trust、MCP (mcpServers)、tool(excludeTools/includeTools)のキーワードが含まれる - 安全境界(MCP tool denylist / allowlist)に直接関わる変更である
上記より safety-sensitive PR と判定。しかし PR 本文に
## Safety Claim Matrixセクションが存在しない。必要な対応: PR 本文に
## Safety Claim Matrixセクションを追加し、以下を記載すること:- Claim 列:
trust: false 保持、excludeTools による危険ツール排除、includeTools による read-only 限定 - Implemented? 列: 各 Claim の実装状況
- Not controlled 列:
.gemini/settings.jsonの設定が実際に Gemini CLI に適用されるかは Gemini CLI 側の読み込み実装に依存(本 PR では未制御) - Evidence 列: AC2/AC3/AC4 の検証コマンド結果への参照
- Follow-up 列: Not controlled 項目に対する follow-up Issue 参照(該当する場合)
- PR diff/本文に
Non-blockers(任意改善)
mergeStateStatus: BEHIND— main に 3 commits 遅れている。マージ前にgit merge mainまたは rebase を実施することを推奨(コンフリクトリスク軽減)。Safety Claim Matrix 追加と合わせて対応可能。
LOOP_VERDICT
LOOP_VERDICT:
verdict: REQUEST_CHANGES
blockers:
- "Safety Claim Matrix セクションが PR 本文に存在しない(MCP tool access control 変更は safety-sensitive)"
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: 1d7164bd60643b14680c92d2f52a7efe3889c340
follow_up_issue_requests: []
squne121
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
iteration: 1 (前回: REQUEST_CHANGES — Safety Claim Matrix 欠落)
Mergeability
- mergeable=MERGEABLE, mergeStateStatus=BEHIND
- BEHIND は conflict blocker ではない(main より 3 commits 遅れているが、マージ可能)
Evidence Check
AC coverage:
- AC1 (excludeTools 21 ツール全含有): PASS — Verification Commands 実行結果に根拠あり
- AC2 (preflight denylist チェック): PASS —
ok: true,local_asset_research.errors: []を記録。Runtime Verification (decision: immediate) の実行証跡あり、SKIP / fallback PASS なし - AC3 (trust: false 保持): PASS — 根拠あり
- AC4 (includeTools read-only 6 ツール保持): PASS — 根拠あり
- AC5 (残余エラー明示): PASS — warnings(non-blocking 2 件)を明示。denylist / excludeTools 系エラーなし
Allowed Paths: 遵守 — 変更ファイルは .gemini/settings.json のみ(Allowed Paths 内)
CI Verification: 全 5 チェック pass(build / lint / python-test / test / typecheck)
検証コマンド結果: ## Verification Commands 実行結果 セクションに各 AC の実行結果(PASS / 出力)を記録済み
scope 混入: なし
Runtime Verification Evidence (immediate): ## Verification Commands 実行結果 > AC2 に preflight 実行ログあり。SKIP / fallback PASS なし — blocker なし
Safety Claim Gate:
- safety-sensitive 判定: 該当(
trust,MCP,excludeTools,toolキーワード含む) ## Safety Claim Matrixセクション: 存在する- Not controlled 範囲: 明示されている(Serena MCP 本体・Gemini CLI その他設定)
- Follow-up: Issue #256(upstream drift 追跡)が参照されている
- PR タイトルに無限定安全主張なし
- 備考: マトリクス列名が SKILL.md 規定(
Implemented? / Not controlled / Evidence / Follow-up)と異なり(種別 / 根拠 / 証跡)、「Not controlled」が列ではなく本文 prose に記載されている。ただし実質的な情報(非制御範囲の特定・follow-up Issue 参照)は存在するため blocker としない。
Schema Change Applicability: not_schema_change — .gemini/settings.json は consumer 境界をまたぐ contract schema ではない。Schema Consumer Inventory 提出不要。
Blockers
なし
Non-blockers(任意改善)
- Safety Claim Matrix の列名を SKILL.md 規定(
Claim / Implemented? / Not controlled / Evidence / Follow-up)に合わせることで、次回 pr-review-judge の自動検査がより明確になる。今後同種の MCP 設定変更 PR では PR テンプレートに列名を含める運用を推奨(PR 本文の観察事項に同旨の note あり)。
LOOP_VERDICT
LOOP_VERDICT:
verdict: APPROVE
blockers: []
mergeable: MERGEABLE
mergeStateStatus: BEHIND
reviewed_head_sha: 1d7164bd60643b14680c92d2f52a7efe3889c340
follow_up_issue_requests:
- title: "Safety Claim Matrix 列フォーマットを PR テンプレートに追加し、MCP 設定変更 PR の標準化"
issue_kind: implementation
severity: optional_follow_up
source:
kind: pr_review
url: "https://github.com/squne121/loop-protocol/pull/261"
note_id: "1"
dedupe_key: "follow-up:squne121/loop-protocol:https://github.com/squne121/loop-protocol/pull/261:1"
desired_destination: "PR テンプレートまたは implement-issue skill の PR 本文生成ステップに Safety Claim Matrix(規定列名)が含まれ、MCP 設定変更 PR で列欠落が発生しない"
validated_scope_delta: "PR テンプレートまたは implement-issue skill に Safety Claim Matrix セクション(Claim / Implemented? / Not controlled / Evidence / Follow-up 列)を追加"
origin_skill: pr-review-judge
labels:
- triage-required
Summary
.gemini/settings.jsonのmcpServers.serenaにexcludeTools配列を追加し、SERENA_DANGEROUS_TOOLS(21 ツール)を列挙するpreflight_gemini_headless.pyのlocal_asset_researchdangerous tool denylist チェックが PASS するtrust: falseとincludeTools(read-only 6 ツール)の既存値は保持Closes #140
Safety Claim Matrix
本 PR は
.gemini/settings.jsonの MCP tool access control 設定(trust,excludeTools,includeTools)を変更するため、safety-sensitive な変更として扱う。trust: false— Serena MCP は untrusted として扱われるexcludeToolsに SERENA_DANGEROUS_TOOLS 21 ツールを列挙includeToolsは read-only 6 ツールのみ本 PR がコントロールしないこと:
includeToolsリストの変更(変更なし・既存値保持のみ)本 PR でコントロールできない範囲の follow-up:
SERENA_DANGEROUS_TOOLSの Serena upstream drift 検証(ツール名の乖離リスク追跡)変更内容
.gemini/settings.jsonのmcpServers.serenaにexcludeToolsフィールドを追加:Verification Commands 実行結果
AC1: excludeTools の存在と21ツール全含有確認
AC2: preflight denylist チェック
preflight 全体結果(
/tmp/preflight_ac2_result.json):ok: truefailure_reason: nulllocal_asset_research.ok: truelocal_asset_research.errors: []validated_tool_profiles: ["no_tools", "grounded_research", "local_asset_research", "proposal_only", "github_research"](全5プロファイル検証済み)AC3: trust が false であること
AC4: includeTools が read-only 6 ツールのみ
AC5: Known remaining preflight errors
preflight 実行結果:
ok: true,failure_reason: null。denylist / excludeTools 系以外の残余エラーなし。warnings(non-blocking):
"Warning: True color (24-bit) support not detected. Using a terminal with true color enabled will result in a better visual experience.""Ripgrep is not available. Falling back to GrepTool."これらは環境の警告であり、preflight の合否判定には影響しない。
標準品質ゲート
pnpm typecheckpnpm lintpnpm testpnpm builduv run pytest test_model_routing.pyAllowed Paths 遵守
変更ファイル:
.gemini/settings.jsonのみ(Allowed Paths 内)観察事項・改善提案
.gemini/settings.jsonは本 PR 以前、git 未追跡状態だった(?? .gemini/としてgit statusに出現)。本 PR で初めて repository-tracked ファイルになる。errorsフィールドを参照しているが実際はfailure_reasonに格納」→ 本 PR では修正版コマンド(failure_reason参照)を使用し、PASS を確認済み。Issue 実装: .gemini/settings.json に Serena MCP excludeTools denylist を追加し local_asset_research preflight を通過させる #140 の VC コマンドがfailure_reasonではなくerrorsフィールドを参照している問題は、Issue 本文の VC 設計ミスとして記録する(実装への影響なし)。SERENA_DANGEROUS_TOOLSのツール名は本リポジトリの preflight 契約に対する denylist であり、Serena upstream の最新ツール集合との完全な一致を保証するものではない(Known Risk: Issue 改善: SERENA_DANGEROUS_TOOLS のツール名と Serena upstream 公式ツール名の乖離を定期検証・更新する仕組みを整備する #256 で追跡)。trust/MCP/toolキーワードを含む config 変更は pr-review-judge の Safety Claim Gate で safety-sensitive と判定される。今後同種の MCP 設定変更 PR では、PR テンプレートまたは implement-issue skill の PR 本文生成ステップに Safety Claim Matrix セクションを含める運用を検討する(follow-up)。Contract Snapshot
#140 (comment)