Repository navigation
Closed
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: research
parent_issue: "#131"
goal_ref: "PR #1200 の verdict・current-head・evidence-quality を突合し、最も可能性の高い修正先を決定論的に特定する"
change_kind: research-onlyParent Issue
Outcome
PR #1200 の head 12a354122f03fe682d06a3cab7635628d6669be4 に対して、全 TEST_VERDICT_MACHINE/v1 / LOOP_VERDICT_V2 を時系列・証跡種別で突合し、「reviewer verdict は false positive だった」または「current-head 実装が #1195 契約未達だった」のどちらかが一次証跡で特定される。必要なら後続 implementation issue を 1 件に絞って起票できる状態になる。
In Scope
- PR Implement issue #1195: uv VC allowlist hardening #1200 の current head
12a354122f03fe682d06a3cab7635628d6669be4の全TEST_VERDICT_MACHINE/v1/LOOP_VERDICT_V2の時系列突合 - 証跡種別(behavioral / grep-only / PR body self-report / CI scoped)と fresh/stale の分類
- owner comment
#issuecomment-4815032007の negative cases と current-head 実装ファイルの exact ref 突合 - 以下の仮説を supported / refuted / unresolved で分類すること
- H1: reviewer は stale
TEST_VERDICT_MACHINEを current-head 証跡として誤用した - H2: reviewer は wrong head / wrong file source を読んだ
- H3: PR body self-report が actual code と矛盾していた
- H4: latest reviewer verdict は false positive ではなく、current-head implementation gap を正しく指摘した
- H5: CI evidence selection が stale / no-evidence / cancelled check を誤分類した
- H1: reviewer は stale
- fix destination の決定(H4 が supported の場合は
pr-review-judgeではなくissue-contract-review実装修正) - 後続 implementation issue が必要な場合の title / Allowed Paths / Acceptance Criteria / Verification Commands 下書き作成
Out of Scope
pr-review-judgeや reviewer worker の実装修正- PR Implement issue #1195: uv VC allowlist hardening #1200 以外の unrelated reviewer failure 調査
- 自動マージ運用そのものの再設計
Acceptance Criteria
- AC1: PR Implement issue #1195: uv VC allowlist hardening #1200 の全
TEST_VERDICT_MACHINE/v1と全LOOP_VERDICT_V2を、comment/review URL、comment_id/review_id、created_at/submitted_at、target/reviewed head SHA、verdict、fresh/stale 判定、証跡種別(behavioral / grep-only / PR body self-report / CI scoped)で時系列表にする。 - AC2: head
12a354122f03fe682d06a3cab7635628d6669be4の以下ファイルを exact ref で読み、owner comment4815032007の negative cases と突合する。.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py.claude/skills/issue-contract-review/tests/test_vc_format_and_command_policy.py
- AC3: 少なくとも次の仮説を supported / refuted / unresolved で分類する。
- H1: reviewer は stale TEST_VERDICT_MACHINE を current-head 証跡として誤用した
- H2: reviewer は wrong head / wrong file source を読んだ
- H3: PR body self-report が actual code と矛盾していた
- H4: latest reviewer verdict は false positive ではなく、current-head implementation gap を正しく指摘した
- H5: CI evidence selection が stale / no-evidence / cancelled check を誤分類した
- AC4:
false positiveと断定しない。H4 が supported の場合、fix destination はpr-review-judgeではなくissue-contract-review実装修正にする。 - AC5: 後続 implementation issue が必要な場合、title、Allowed Paths、Acceptance Criteria、Verification Commands を本文に下書きする。research-only Issue なので起票は別途明示する。
Verification Commands
# AC1
$ gh pr view 1200 --repo squne121/loop-protocol --json headRefOid,comments,reviews
# AC2
$ gh api repos/squne121/loop-protocol/contents/.claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py?ref=12a354122f03fe682d06a3cab7635628d6669be4
$ gh api repos/squne121/loop-protocol/contents/.claude/skills/issue-contract-review/scripts/tests/test_baseline_vc_preflight.py?ref=12a354122f03fe682d06a3cab7635628d6669be4
$ gh api repos/squne121/loop-protocol/contents/.claude/skills/issue-contract-review/tests/test_vc_format_and_command_policy.py?ref=12a354122f03fe682d06a3cab7635628d6669be4
# AC3
$ gh api repos/squne121/loop-protocol/issues/comments/4815032007
# AC4
$ gh pr view 1200 --repo squne121/loop-protocol --json reviews
# AC5
$ gh issue view 131 --repo squne121/loop-protocol --json state,urlAllowed Paths
- 読み取り専用。リポジトリ変更なし(既定)
Stop Conditions
- Outcome / Scope / AC が検索可能な形で記載されていない場合は即停止
- Allowed Paths 外への書き込みを試みた場合は即停止
- 権限不足(permission denied)により操作が完了できない場合は即停止
- 成果物の書き込みに失敗した場合(I/O エラー等)は即停止
- GitHub read-back が partial / degraded で current head の file 内容を確認できない場合は即停止
- exact ref での file 読み取りが失敗する場合は即停止
Handoff Contract
Current ObjectiveBounded Current ContextOpen QuestionsNext ActionArtifact Refs
Metadata
Metadata
Assignees
Labels
No labels
Activity
squne121 commentedon Jun 27, 2026
判定
REQUEST_CHANGES。#1205 は調査 Issue として必要ですが、現本文のままでは「PR #1200 reviewer false positive」を証明する設計になっていません。むしろ一次証跡上は、少なくとも PR #1200 head
12a354122f03fe682d06a3cab7635628d6669be4については、reviewer の REQUEST_CHANGES が false positive ではなく、実装側の #1195 exact-argv 契約未達を突いている可能性が高いです。#1205 は open でコメントなし、Outcome は PR #1200 head
12a354...と owner comment#issuecomment-4815032007に対する pr-review-judge の false positive REQUEST_CHANGES 原因特定です。AC は、current-head 証跡・latest reviewer verdict・原因候補・fix destination・後続 implementation issue の判断を要求しています。PR #1200 自体は merged 済みで、head SHA は
12a354122f03fe682d06a3cab7635628d6669be4、merge commit は456f0dd0451819d9e36d4b8e39483a2a30259d76です。PR 本文は「path-qualified uv は拒否」「option 順序変更・重複・path-qualified interpreter は not controlled」と主張していますが、実ファイルはその主張と矛盾します。P0 ブロッカー
P0-1: #1205 は「false positive」を前提化しすぎている
#1205 の Outcome は「なぜ pr-review-judge が false positive REQUEST_CHANGES を返したか」と書いていますが、これは結論を先取りしています。調査 Issue なら、仮説に 「latest reviewer verdict は正しく、PR #1200 の実装が #1195 契約未達だった」 を明示的に入れるべきです。
実際、merge commit 側の
baseline_vc_preflight.pyは_is_uv_lock_check()でPath(argv[0]).name == "uv"を使っており、["uv", "lock", "--check"]の完全一致ではありません。runtime smoke 側もPath(argv[0]).name != "uv"と innerPath(argv[i]).name in ("python", "python3")を使い、さらに option 判定はseen_optionsの set 比較です。これは path-qualified executable と option 重複・順序差分を exact contract から漏らします。P0-2: owner comment #4815032007 の指摘と current-head 実装が一致している
owner comment
#issuecomment-4815032007は、Path(argv[0]).name == "uv"により./uvや/tmp/uvも通り得ること、#1195 AC1 は["uv", "lock", "--check"]完全一致のみであること、runtime smoke の inner command でも./pythonや/tmp/python3が通り得ることを P0 として指摘しています。その指摘は repo asset と一致します。テストも
test_uv_lock_check_exact_only()という名前に反して/usr/bin/uvを positive case として許可し、runtime smoke でも/usr/bin/uv ... python3を positive case にしています。したがって #1205 の AC2 は、「false positive の原因候補」を探す前に、owner comment の negative cases が current head で実際に fail-close されているかを先に検証する形へ直すべきです。
P0-3: TEST_VERDICT_MACHINE が grep 存在確認に寄りすぎている
PR #1200 の early
TEST_VERDICT_MACHINE/v1は PASS ですが、内容はrg -n def test_uv_lock_check_exact_only ...や docs 内のuv lock --check検索で、behavioral negative cases の実行ではありません。#1195 の本質は「許可してよい exact shape と、許可してはいけない near-miss shape の境界」です。関数名や docs 文言の存在確認では、
/usr/bin/uvpositive、./python、duplicate option、reordered option のような reviewer 指摘を検出できません。#1205 はTEST_VERDICT_MACHINEの fresh/stale だけでなく、証跡の質、つまり grep-only か behavioral execution かを AC に入れる必要があります。P0-4: fix destination の候補が狭すぎる
#1205 は fix destination を
pr-review-judge、review subagent launch contract、evidence selection に絞ろうとしています。これは早いです。現時点で最も強い fix destination は、むしろissue-contract-reviewのbaseline_vc_preflight.pyとその tests です。pr-review-judge 側の証跡ポリシーは、TEST_VERDICT_MACHINE、CI_CHECK_RUN_SCOPED、PR_BODY_SELF_REPORT の順で扱い、stale head や self-report only を APPROVE 禁止にしています。 ここを直す前に、PR #1200 の actual code が #1195 契約を満たしているかを潰すべきです。
P0-5: CI evidence の扱いも「head bound」だけでは不足
ci_verdict_summary.pyは--expected-head-shaを取り、check run の head SHA 補完も行います。 これは方向性として正しいです。GitHub Check Runs API も check run にhead_sha,status,conclusionを持ちます。([GitHub Docs]1)ただし、この script には「checks が 0 件なら
all_pass」という fail-open 寄りの分岐があります。#1205 の主対象ではないとしても、CI 証跡の信頼性調査をやるなら、この分岐は別 Issue 候補として記録すべきです。技術調査から見た妥当な境界
uv 公式 docs では
uv runは command/script を実行し、command 以降の引数は uv option として解釈されません。([Astral Docs]2)--isolatedは fresh environment を使わせる option で、--with系は追加依存を layered environment に入れられます。([Astral Docs]2) ([Astral Docs]2)--directoryは実行前にディレクトリを変更し、--projectは別ディレクトリから project discovery を行います。([Astral Docs]2) つまり VC preflight の allowlist は、uv CLI と同じ柔軟性を許すべきではなく、repo の trust boundary として exact argv に閉じる判断が妥当です。Python
subprocessは sequence args を推奨し、sequence の first item が実行 program になります。([Python documentation]3)shell=Falseは shell metacharacter 対策には有効ですが、./uvや/tmp/python3のような executable path を許してよい理由にはなりません。むしろ path-qualified executable を明示的に拒否する必要があります。#1205 の修正文案
#1205 はこの AC に差し替えるべきです。
後続 implementation issue 草案
Title
実装: issue-contract-review の uv runtime smoke allowlist を exact argv に閉じ直すGoal
#1195 / PR #1200 の follow-up として、
uv lock --checkと runtime smoke の allowlist を basename 判定・set 判定ではなく exact argv 判定に閉じ、path-qualified executable、option reorder、duplicate option を fail-close する。Allowed Paths
Acceptance Criteria
Verification Commands
Claude Code / Codex CLI 実行プロンプト
最終結論として、#1205 は 「reviewer false positive 調査」ではなく「PR #1200 verdict/current-head/evidence-quality reconciliation 調査」へ改題・修正するのが安全です。現一次証跡では、後続修正先は
pr-review-judgeより先にissue-contract-reviewの uv allowlist 実装・テストです。[-]調査: PR #1200 reviewer false positive の一次証跡を確定する[/-][+]調査: PR #1200 verdict・current-head・evidence-quality reconciliation 調査[/+]squne121 commentedon Jun 27, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jun 27, 2026
Research Completion: #1205 — AC1-AC5 達成報告
AC1: TEST_VERDICT_MACHINE/v1 / LOOP_VERDICT_V2 時系列表
PR merge: 2026-06-27T06:13:45Z, merge_commit=456f0dd0451819d9e36d4b8e39483a2a30259d76, merged with Review 7 REQUEST_CHANGES still open.
AC2: owner comment 4815032007 と exact ref (head 12a354) 実装の突合
owner comment 4815032007 (2026-06-27T03:27:29Z) が要求した修正 vs 実際のコード (head 12a354 = current main):
P0-1:
_is_uv_lock_checkexact argvargv == ["uv", "lock", "--check"]の exact comparisonPath(argv[0]).name == "uv" and argv[1] == "lock" and argv[2] == "--check"/usr/bin/uv lock --check,./uv lock --check,/tmp/uv lock --checkが通る。P0-2: inner interpreter の path-qualified 許可
cmd = argv[i]で exact basename のみ (if cmd not in ("python", "python3"))cmd = Path(argv[i]).name./python,/tmp/python3が通る。P0-3: option reorder / duplicate 許可
argv in _ALLOWED_RUNTIME_SMOKE_PREFIXESexact list matchseen_options: set[str]で集合比較--locked --isolated --no-default-groups(reorder) および--isolated --isolated --locked --no-default-groups(duplicate) が通る。テスト (head 12a354):
/usr/bin/uvの negative case テストは追加なし (owner comment 要求未対応)./uv,/tmp/uv,./python,/tmp/python3, option reorder/duplicate の negative case テスト追加なしAC3: H1-H5 判定
Path().name) と set 比較のままで矛盾AC4: false positive 断定しない
H4 が supported のため、Review 7 の REQUEST_CHANGES は false positive ではない。fix destination は pr-review-judge ではなく issue-contract-review 実装修正。#1205 を「false positive 調査として閉じる」は不適切。
AC5: 後続 implementation issue
H4 supported のため、以下の implementation issue が必要:
Title:
実装: issue-contract-review の uv VC allowlist を exact argv に閉じ直す修正対象:
_is_uv_lock_check:argv == ["uv", "lock", "--check"]exact list comparison のみ (Path().name 除去)_is_uv_runtime_smoke_command: exact 2 sequence のみ許可、Path(argv[i]).nameとset()比較を除去./uv,/usr/bin/uv,/tmp/uv, path-qualified python/python3, option reorder, duplicate option を blocked として確認research-only conditions を満たした。follow-up implementation issue を起票する。
squne121 commentedon Jun 27, 2026
全 Phase 完了報告
Phase 1: Research AC 達成(本コメント上部の投稿済み内容参照)
H4 が supported と判定。Review 7 (PRR_kwDOSfQcDc8AAAABETv6Xw) の REQUEST_CHANGES は false positive でなく、head 12a354 の実装に basename 判定と set 比較が残存していたことを確認。
Phase 2: Implementation issue 起票
Phase 3-4: 実装・テスト
修正内容:
_is_uv_lock_check:Path(argv[0]).name == "uv"→argv == ["uv", "lock", "--check"]_is_uv_runtime_smoke_command: basename + set 比較 → canonical 2 形式タプル比較テスト結果: 189 passed, 1 skipped(全テスト通過)
Phase 5: Draft PR 作成
PR #1211「fix(#1210): uv VC allowlist を exact argv 比較に閉じ直す」
Phase 6: CI / Review ループ
Phase 7: マージ・クローズ
この Issue の調査目的(H1-H5 分類・false positive 判定)はすべて達成された。