Repository navigation
Open
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: research
parent_issue: "none"
goal_ref: "operator が明示選択した non-closing PR の human-context を、安全な Issue identity binding を保ちながら intake できる最小修正と再発防止 regression を確定する"
change_kind: research-only
dedupe_key: "impl-review-loop:refs-only-pr-human-context-intake:v1"Parent Issue
なし。#2842 / PR #2861 は発見元。#2878 の明示的 Out of Scope を切り出した独立 follow-up。
Background / Observed Evidence
- 停止・再開対象: fix: trusted human-context contract-update の安全性と producer 到達性を修正 #2861 (comment)
- fresh review: fix: trusted human-context contract-update の安全性と producer 到達性を修正 #2861 (comment)
- モデル差か設定差かという operator の質問: fix: trusted human-context contract-update の安全性と producer 到達性を修正 #2861 (comment)
- ユーザー提供の実行ログでは、Issue 実装: trusted human-context の contract_update mutation lane が、freeform directive から不正な patch operation を導出し、失敗理由を出さずに停止する欠陥を是正する #2842 に対する intake capsule が
human_supplied_comment_pr_not_closing_target_issue:5962272383を fatal_errors に記録し、context_inputs.human_suppliedは空、source_integrity.evidence_completeは false だった。対象 PR fix: trusted human-context contract-update の安全性と producer 到達性を修正 #2861 は明示的な two-phase delivery decision に従いRefs #2842、closingIssuesReferences: []を維持していた。 - 上記は提供ログの事実であり、起票時に fresh capsule を実行した結果ではない。source comment は fix: trusted human-context contract-update の安全性と producer 到達性を修正 #2861 (comment) 。
- 現行 実装: PR Closes/Refs 選択と post-merge OPEN close gate を整合する #2878 は PR reference producer/validator/reviewer、repair、および post-merge identity binding を所有する一方、
build_intake_capsule.py::_pr_closes_target_issue()の non-closing context URL 対応は明示的に Out of Scope。実装: PR Closes/Refs 選択と post-merge OPEN close gate を整合する #2878 の完了だけで本 intake 制限が解消するとは扱わない。 - 同じ提供ログには、SubAgent に Issue 起票を委譲した際、auto-mode classifier が「transcript のレビュー依頼しか受けていない」として external write を拒否した記録もある。この拒否を intake エラーが引き起こしたという因果は未確認。主モデル、permission classifier、launcher/profile、context transport、repository rule を同一原因として断定しない。
Outcome
Refs-only PR に対する intake の実際の rejection path と accepted trust model を確認し、Issue link identity と automatic-close authorization を分離した最小修正案・positive/negative regression を本 Issue に残す。許可のない引用・SubAgent の承認自己申告を user authority に昇格させず、必要な正当な operator-selected context だけを回復する。
In Scope
build_intake_capsule.py、既存 tests、preparation 手順の read-only 調査と、既存 production entrypoint による isolated/fake-GitHub fixture の再現。- 明示的な対象 repo / Issue / PR / comment ID、comment の実所属、現在の PR 本文と Issue 本文、trusted operator selection / author policy、freshness をどう束縛しているかを確認する。
- 実装: PR Closes/Refs 選択と post-merge OPEN close gate を整合する #2878 の reference authority evaluator が着地済みか確認し、存在する場合はその再利用を第一候補とする。未着地の API や proposed marker を実装済みと仮定しない。
- PR comment intake と、ユーザーが直接承認した decision を対象 Issue comment に正規に記録する経路の違いを確認する。後者を利用する場合も provenance を正しく記録し、元の PR comment を Issue comment と偽装しない。
- regression は最低限、正当な non-closing binding、通常の closing binding、cross-repo/別Issue/別PR、曖昧な複数参照、missing authority、stale body、API failure、引用・SubAgent 自己申告しかない入力を含む。
- 権限拒否との因果は、同じ sanitized 入力・current code の観測で言える範囲のみ分類する。GPT family の一般的性質で説明しない。
Out of Scope
- 実装: PR Closes/Refs 選択と post-merge OPEN close gate を整合する #2878 の evaluator/producer/reviewer/post-merge consumer の重複実装。
- PR fix: trusted human-context contract-update の安全性と producer 到達性を修正 #2861 の実装・本文・branch と Issue 実装: trusted human-context の contract_update mutation lane が、freeform directive から不正な patch operation を導出し、失敗理由を出さずに停止する欠陥を是正する #2842 の body の変更、merge / auto-merge / Issue close。
- 調査: main-drift の upstream-only 取込みと Issue 外の新規変更を区別して再開できる条件を確定する #2889 の main-drift classification、実装: historical 非必須 deploy-pr CANCELLED の current-head review false-block を解消する #2884 の CI cancellation 判定。
- accepted trust model の緩和、refs 文字列または branch 名だけからの無条件 authority 付与。
- permission mode / launcher / proxy / system prompt の変更、private transcript / credential の読み出し、classifier 回避。
- generic parity framework、approval layer、常設観測 gate、新 schema family。
Acceptance Criteria
- AC1: current source ref と実際の拒否分岐を固定し、既存 production function/entrypoint を用いた再現結果を示す。提供ログ由来の結果と fresh 結果を区別する。
- AC2: 実装: PR Closes/Refs 選択と post-merge OPEN close gate を整合する #2878 の current scope / landing status と責務境界を確認し、同一 evaluator の再利用または未着地依存を明記する。
- AC3: 正当な operator-selected Refs-only context の受理に必要な evidence を列挙し、missing/ambiguous/stale/untrusted 入力を引き続き拒否する fixture matrix を作る。受理しても close authorization を返さない。
- AC4: caller → capsule → context_inputs → SubAgent dispatch のどこで直接指示/引用/生成物が分類されるかを確認する。auto-mode write denial との因果を未観測なら unresolved と記載する。
- AC5: 最小 candidate paths、existing schema 内での対応可否、変更後に production orchestration を通す regression、通常 closing path の非退行を具体化する。テストローカルの模倣関数だけを検証する案にしない。
- AC6: 調査結果・推奨修正・残る不確実性を本 Issue のコメントへ記録する。実装未実施なら解消済みと報告しない。
Verification Commands
これらは調査入口であり、取得コマンドの exit 0 や既存 suite PASS 単独では新しい non-closing support の証拠にならない。
$ gh issue view 2878 --repo squne121/loop-protocol --json state,body
$ gh api repos/squne121/loop-protocol/issues/comments/5962272383
$ rg -n '_pr_closes_target_issue|human_supplied_comment_pr_not_closing_target_issue|human_supplied' .claude/skills/impl-review-loop/scripts/build_intake_capsule.py .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py -qAllowed Paths
読み取り専用。tracked file の変更はしない。
.claude/skills/impl-review-loop/scripts/build_intake_capsule.py.claude/skills/impl-review-loop/tests/test_build_intake_capsule.py.claude/skills/impl-review-loop/steps/preparation.md.claude/skills/impl-review-loop/steps/context-protocol-and-guardrails.md.claude/skills/open-pr/scripts/validate_pr_body.pydocs/dev/github-ops.mddocs/dev/agent-skill-boundaries.md
既存の許可された一時領域の synthetic fixture / bounded diagnostic artifact と、本 Issue の結果コメントのみ書き込み可。
Runtime Verification Applicability
- decision: not_applicable
- reason: research-only。intake の deterministic behavior の観測と修正設計まで。Claude/GPT の live A/B acceptance や外部 mutation を行う runtime trial は本 Issue では要求しない。
Stop Conditions
- tracked code / schema の変更、private transcript の取得、permission bypass が必要になった場合。
- 別 Issue の scope を無断拡張しなければ調査できない場合。
- authority を示す一次入力を確認できず、生成した承認を authority として扱う必要が生じた場合。
Required Skills
なし。
Required Design References
docs/dev/github-ops.md.claude/skills/impl-review-loop/steps/preparation.md- Issue 実装: PR Closes/Refs 選択と post-merge OPEN close gate を整合する #2878
Delivery Rule
本 Issue は focused investigation と再発防止の最小実装案まで。#2842 の Allowed Paths は拡張せず、#2878 を再実装しない。新たな implementation contract が必要なら結果で明示し、現 PR の成功判定と混同しない。
Metadata
Metadata
Assignees
Labels
No labels
Activity