Repository navigation
実装: chatgpt_retro_execution_proof/v1 の evidence_refs 解決範囲を marker refs(run_report/retro_index コメント)まで拡張する #1799
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "chatgpt_retro_execution_proof/v1 の evidence_refs 解決範囲を marker refs(run_report/retro_index コメント)まで拡張し、正当な外部 ChatGPT レトロ証跡が unresolvable 誤判定されないようにする"
change_kind: mixedParent Issue
none
(Refs #1415: #1415 の作業中に発見した既存挙動の gap であり、#1415 自体はこの Issue の解決を待たない。単独改善として起票する。)
Parent Goal Ref
- Goal: N/A(親 Issue なし)
- Desired Destination: N/A
Current Validated Scope
scripts/check-chatgpt-retro-e2e-proof.mjsのisResolvableEvidenceRef()の github_comment 解決ロジック拡張docs/schemas/chatgpt-retro-execution-proof.schema.jsonへの additive optional field 追加tests/chatgpt-retro-e2e-proof-check.test.tsへの対応テスト追加
Remaining Parent Gaps
- なし(本 Issue は 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 の scope に含まれない独立した follow-up)
Background
Issue #1415(retro_live_verification dual-target closure artifact chain)の作業中に、scripts/check-chatgpt-retro-e2e-proof.mjs の isResolvableEvidenceRef() 関数直前(line 513-524 付近)に以下のコード内コメントを確認した:
Note (bounded scope): marker refs.run_reports[*].comment_url / refs.retro_index resolution described in the OWNER review requires a live-resolved marker payload that is not part of chatgpt_retro_execution_proof/v1's current schema shape (no "refs" object is carried on the proof). Extending resolution to those additional marker-derived comment URLs is deferred to a follow-up issue that also extends the marker payload schema; this checker only resolves what the proof itself declares.
現在の isResolvableEvidenceRef()(scripts/check-chatgpt-retro-e2e-proof.mjs line 525 以降)は、chatgpt_retrospective_result/v1 の findings[].evidence_refs[] が kind: "github_comment" を持つ場合、以下 3 種類の URL のみを解決可能と認める:
proof.operation_index_ref.comment_urlproof.pr_review_surface_live_proof_ref.comment_urlproof.chatgpt_context.marker_comment_url
一方、外部 ChatGPT セッション(Issue #1153・PR #1411 向け)から取得した genuine な chatgpt_retrospective_result/v1 は、正当な証拠として以下の URL も引用する:
agent_run_report/v1コメント URL(CHATGPT_RETRO_CONTEXT_V1marker のrefs.run_reports[].comment_urlに載っている値)agent_retro_index/v1コメント URL(refs.retro_index.comment_url)- PR review / review comment の URL
これらは chatgpt-retro-context-marker-helper.mjs の resolve-live コマンドが返す refs object には含まれるが、chatgpt_retro_execution_proof/v1 のスキーマ自体には refs が運ばれていないため、evidence_refs.unresolvable チェックで正当な証拠参照が「解決不能」として拒否される。
Outcome
docs/schemas/chatgpt-retro-execution-proof.schema.json に additive な optional field(例: chatgpt_context.additional_resolvable_comment_refs: [{comment_url, payload_digest}]。field 名・構造の詳細設計は実装時の検討に委ねる)を追加し、scripts/check-chatgpt-retro-e2e-proof.mjs の isResolvableEvidenceRef() がこれらの追加参照(marker refs.run_reports[].comment_url / refs.retro_index.comment_url 由来の comment URL)も digest 一致を条件に解決できるようにする。既存 fixture・既存 proof(追加 field なし)の後方互換性が維持され、tests/chatgpt-retro-e2e-proof-check.test.ts に新規ケースが追加された状態を完了とする。
In Scope
docs/schemas/chatgpt-retro-execution-proof.schema.jsonへ additive optional field を追加する(既存 required field・既存 property は変更しない)scripts/check-chatgpt-retro-e2e-proof.mjsのisResolvableEvidenceRef()を拡張し、新 field に列挙された{comment_url, payload_digest}エントリと一致するgithub_commentkind の evidence_ref を、対応する digest 一致を条件に resolvable と判定するisResolvableEvidenceRef()直前のコード内コメント(deferred 記述)を、拡張後の挙動に合わせて更新するtests/chatgpt-retro-e2e-proof-check.test.tsに新 field を持つ fixture のテストケースと、新 field なしの既存 fixture が引き続き PASS することを確認するテストケースを追加する
Out of Scope
chatgpt-retro-context-marker.schema.jsonのrefsobject 自体の構造変更chatgpt-retro-context-marker-helper.mjsのresolve-liveコマンドの出力仕様変更- Issue 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 の dual-target closure artifact chain 本体の実装
repo_file/github_issue/github_pr/web_dockind の解決ロジック変更
Acceptance Criteria
- AC1:
docs/schemas/chatgpt-retro-execution-proof.schema.jsonに新規 optional field が追加され、既存の required 配列・既存 property が変更されていない - AC2: 新 field に
comment_urlとpayload_digestの両方を持つエントリを含む proof fixture に対し、対応する github_comment evidence_ref(同一 comment_url・同一 digest)がisResolvableEvidenceRef()で resolvable と判定される - AC3: 新 field を持たない既存 proof fixture(後方互換ケース)が
check-chatgpt-retro-e2e-proof.mjsの既存テストで引き続き PASS する - AC4: 新 field 内のエントリと comment_url は一致するが digest が不一致な github_comment evidence_ref は unresolvable のままである
- AC5:
pnpm testが新規テストケースを含めて全件 PASS する
Verification Commands
schema が有効な JSON であり、既存 required 配列を破壊していないこと(AC1)を確認する。VC preflightのpython allowlist制約(runtime-smoke canonical script以外の python -m/-c 形式は不可)のため、実行はPRレビュー時に譲る:
# AC1
# preflight-scope: runtime_only
$ pnpm test新 field のエントリと一致する github_comment evidence_ref が resolvable と判定される新規テストケース(AC2)を確認する。pnpm allowlistはbare pnpm testのみを許可するため、対象ファイルの特定はPRレビュー時のtest実行結果で確認する:
# AC2
# preflight-scope: runtime_only
$ pnpm test新 field を持たない既存 proof fixture が引き続き PASS する後方互換テスト(AC3)を確認する:
# AC3
# preflight-scope: runtime_only
$ pnpm testcomment_url は一致するが digest が不一致な参照は unresolvable のままであること(AC4)を確認する:
# AC4
# preflight-scope: runtime_only
$ pnpm test全 Vitest テストが PASS すること(AC5)を確認する:
# AC5
$ pnpm testその他の標準ゲート:
$ pnpm typecheck$ pnpm lint$ pnpm buildAllowed Paths
- docs/schemas/chatgpt-retro-execution-proof.schema.json
- scripts/check-chatgpt-retro-e2e-proof.mjs
- tests/chatgpt-retro-e2e-proof-check.test.ts
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合(特に
chatgpt-retro-context-marker.schema.jsonやchatgpt-retro-context-marker-helper.mjsへの変更が必要になった場合) - In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Required Design References
- docs/dev/agent-retro-index.md
- docs/dev/agent-run-report.md
- docs/schemas/chatgpt-retro-execution-proof.schema.json
- docs/schemas/chatgpt-retro-context-marker.schema.json
Scope Delta(任意)
N/A
Notes for Reviewer
- 新 field の具体的なキー名・構造(例:
chatgpt_context.additional_resolvable_comment_refsvs 他の設計案)は実装時の詳細検討に委ねる。additive optional であること・既存 required 契約を壊さないことのみを本 Issue の制約とする。
Scope Overlap Note
Scope Collision (C1): related_issue=#1415, #1390, #1176, #420, #205; overlapping_paths=scripts/check-chatgpt-retro-e2e-proof.mjs, tests/chatgpt-retro-e2e-proof-check.test.ts.
non_conflict_reason:
- 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415: 本 Issue が発見された親コンテキスト(Refs 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415)。実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 は
isResolvableEvidenceRef()のコード内コメントで本 Issue のスコープを follow-up として明示的に deferral しており、実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 自体は本 Issue が扱う schema 拡張・resolver 拡張を実装しない。edit_intent は disjoint(実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 は live 検証・resolve-live status 記録、本 Issue は evidence_refs 解決範囲拡張)。 - 実装: visual diff AI/VLM triage を非ブロッキング助言として分離する #1390 / 導入: M4 Upgrade Loop 実装 parent tracker #1176 / 実装: playtest-log の JSON Schema / validator の追加 #420 / 実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205: いずれも
tests/scriptsを広範ディレクトリ単位で Allowed Paths に含めているための broad-path false positive であり、本 Issue が変更する具体ファイル(scripts/check-chatgpt-retro-e2e-proof.mjs/tests/chatgpt-retro-e2e-proof-check.test.ts)を対象にした実質的な作業記述はいずれの本文にも含まれない。
Activity
squne121 commentedon Jul 26, 2026
Contract Review Result
実装: chatgpt_retro_execution_proof/v1 の evidence_refs 解決範囲を marker ref…