Skip to content

調査: Refs-only PR の human-context intake を closing relation と独立に束縛する最小修正を確定する #2890

Open

Description

@squne121

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

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

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 -q

Allowed 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.py
  • docs/dev/github-ops.md
  • docs/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

Delivery Rule

本 Issue は focused investigation と再発防止の最小実装案まで。#2842 の Allowed Paths は拡張せず、#2878 を再実装しない。新たな implementation contract が必要なら結果で明示し、現 PR の成功判定と混同しない。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions