Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1153"
goal_ref: "ChatGPT GitHub connector retro E2E proof の live 検証(#1415)を実行可能にするため、retro-live-verification の producer/verifier を実装し pnpm gate allowlist に登録する"
change_kind: mixedParent Issue
Parent Goal Ref
- Goal: EntireCLI + Latitude の観測データを既存の
agent_run_report/v1/agent_retro_index/v1に接続し、GitHub 経由の ChatGPT レトロ動線を確立する - Desired Destination:
agent_run_report/agent_retro_indexを正本として、GitHub connector から ChatGPT がレトロスペクティブを再現可能に実行できる状態
Current Validated Scope
docs/schemas/retro-live-verification.schema.jsonを新規追加し、canonical verification comment のペイロード(schema/producer/verifier/runtime provenance/canonicalization profile)を定義するscripts/generate-retro-live-verification.mjsを新規追加し、resolver 自身の実行出力に依存しない事前固定の trusted expectation manifest を生成するscripts/post-retro-live-verification.mjsを新規追加し、canonical verification comment を single-writer 前提(expected_previous_digest/ post-write readback / 投稿主体の trusted actor allowlist 照合)で upsert するscripts/check-retro-live-verification.mjsを新規追加し、GraphQL レスポンスのerrors検査と pagination 完全性検査を含む verifier を実装するpackage.jsonにretro-live-verification:generate/retro-live-verification:post/retro-live-verification:verifyの 3 script を追加する.claude/skills/issue-contract-review/scripts/pnpm_gate_registry.pyの_SCRIPTS/_GATESに上記 3 script をGateDescriptorとして登録し、manifest_integrity_digest検証を通過させる.claude/skills/issue-contract-review/tests/test_pnpm_gate_security_boundary.pyの既存 allowlist assertion を拡張し、新規 3 gate を含めて検証する(既存 gate の削除・弱体化は禁止)tests/retro-live-verification.test.tsとtests/fixtures/retro-live-verification/(negative fixture 含む)を新規追加する.github/workflows/retro-live-verification.ymlを新規追加し、canonical comment 投稿を single-writer workflow + concurrency group に限定する
Remaining Parent Gaps
- 本 Issue merge 後、実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 の Verification Commands を現行 CLI 契約(
chatgpt-retro-context:assert-liveの 4 必須引数を含む)と本 Issue で追加するretro-live-verification:*gate に追従させる修正は 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 側で別途行う - PR review / review comment / review thread を GitHub API から独立再取得し
selected_review_id等を相互結合する完全な live 再検証ロジック(OWNER レビュー P0-4)のchatgpt-retro-e2e-proofchecker との統合は本 Issue の scope 外(follow-up) - 既存 marker resolver(
scripts/agent-logs/lib/chatgpt-retro-context-marker-helper.mjs)本体への trusted actor allowlist 導入(OWNER レビュー P0-5 のうち marker resolver 側)は本 Issue の Allowed Paths に含まれないため follow-up とする - Latitude Cloud real pilot、EntireCLI real checkpoint ingestion、Claude Code / Codex CLI / Google Antigravity の real capture capability 確定は引き続き未着手
Outcome
retro-live-verification の producer(post)/ verifier(verify)/ generator(generate)スクリプトと schema・workflow・negative fixtures 一式を実装し、pnpm_gate_registry.py の allowlist に対応する GateDescriptor を登録して、pnpm retro-live-verification:post / :verify / :generate が Verification Command として実行可能になり、tests/retro-live-verification.test.ts と test_pnpm_gate_security_boundary.py がいずれも PASS している状態。
In Scope
docs/schemas/retro-live-verification.schema.json(retro_live_verification/v2相当。context_assertions/pr_review_binding/execution_boundary/canonical_comment/runtime_provenance/canonicalization_profileフィールドを含む)の新規作成scripts/generate-retro-live-verification.mjs(trusted expectation manifest generator)の新規実装scripts/post-retro-live-verification.mjs(canonical comment producer。投稿主体の trusted actor allowlist 照合・expected_previous_digest必須・post-write readback を含む)の新規実装scripts/check-retro-live-verification.mjs(verifier。GraphQLerrorsfail-closed 検査・pagination 完全性検査・schema 準拠検査を含む)の新規実装package.jsonへのretro-live-verification:generate/retro-live-verification:post/retro-live-verification:verifyscript 追加pnpm_gate_registry.pyへの 3GateDescriptor追加(gate_id/request_argv/script_name/closure)test_pnpm_gate_security_boundary.pyの allowlist assertion 拡張(新規 3 gate を含める)tests/retro-live-verification.test.tsとtests/fixtures/retro-live-verification/(malformed GraphQL partial response・非信頼 marker author・stale digest 等の negative fixture を含む)の新規追加.github/workflows/retro-live-verification.yml(concurrencygroup による single-writer 制約)の新規追加
Out of Scope
- 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 自身の Verification Commands・Allowed Paths・change_kind の更新(本 Issue merge 後に 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 側で実施)
chatgpt-retro-context:assert-liveの CLI 引数契約自体の変更(既に--marker-comment-url/--expected-digest/--expected-payload-digest/--expected-matched-comment-countが必須実装済み。本 Issue はこれを消費する manifest generator のみを追加する)- 既存 marker resolver(
chatgpt-retro-context-marker-helper.mjs)への trusted actor allowlist 導入 - PR review / review comment / review thread の GitHub API からの独立再取得を含む
chatgpt-retro-e2e-proofchecker(scripts/check-chatgpt-retro-e2e-proof.mjs)自体の改修 canonical-json-v1の RFC 8785 準拠プロファイルへの移行(本 Issue では schema にcanonicalization_profileフィールドを追加するのみで、既存 canonicalization 実装の置き換えは follow-up)- Latitude Cloud real pilot の実施
- EntireCLI real checkpoint ingestion
- Claude Code / Codex CLI / Google Antigravity の real capture capability 確定
Acceptance Criteria
- AC1:
docs/schemas/retro-live-verification.schema.jsonが存在する - AC2:
scripts/generate-retro-live-verification.mjsが存在する - AC3:
scripts/post-retro-live-verification.mjsが存在する - AC4:
scripts/check-retro-live-verification.mjsが存在する - AC5:
package.jsonに"retro-live-verification:generate": "node scripts/generate-retro-live-verification.mjs"が定義されている - AC6:
package.jsonに"retro-live-verification:post": "node scripts/post-retro-live-verification.mjs"が定義されている - AC7:
package.jsonに"retro-live-verification:verify": "node scripts/check-retro-live-verification.mjs"が定義されている - AC8:
pnpm_gate_registry.pyにretro-live-verificationを含むGateDescriptor定義が存在する - AC9:
test_pnpm_gate_security_boundary.pyのtest_registry_is_the_only_pnpm_gate_authorityが新規 3 gate を含む allowlist で PASS する - AC10:
tests/fixtures/retro-live-verification/ディレクトリが存在する - AC11:
tests/retro-live-verification.test.tsが Vitest で PASS する - AC12:
.github/workflows/retro-live-verification.ymlにconcurrency設定が存在する
Verification Commands
# AC1
# baseline-expect: fail
$ test -f docs/schemas/retro-live-verification.schema.json
# AC2
# baseline-expect: fail
$ test -f scripts/generate-retro-live-verification.mjs
# AC3
# baseline-expect: fail
$ test -f scripts/post-retro-live-verification.mjs
# AC4
# baseline-expect: fail
$ test -f scripts/check-retro-live-verification.mjs
# AC5
$ rg -n "\"retro-live-verification:generate\": \"node scripts/generate-retro-live-verification.mjs\"" package.json
# AC6
$ rg -n "\"retro-live-verification:post\": \"node scripts/post-retro-live-verification.mjs\"" package.json
# AC7
$ rg -n "\"retro-live-verification:verify\": \"node scripts/check-retro-live-verification.mjs\"" package.json
# AC8
$ rg -n "retro-live-verification" .claude/skills/issue-contract-review/scripts/pnpm_gate_registry.py
# AC9
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/test_pnpm_gate_security_boundary.py -k test_registry_is_the_only_pnpm_gate_authority
# AC10
# baseline-expect: fail
$ test -d tests/fixtures/retro-live-verification
# AC11
# baseline-expect: fail
$ test -f tests/retro-live-verification.test.ts
# AC12
# baseline-expect: fail
$ rg -n "concurrency" .github/workflows/retro-live-verification.ymlAllowed Paths
- package.json
- docs/schemas/retro-live-verification.schema.json
- scripts/generate-retro-live-verification.mjs
- scripts/check-retro-live-verification.mjs
- scripts/post-retro-live-verification.mjs
- tests/retro-live-verification.test.ts
- tests/fixtures/retro-live-verification/
- .github/workflows/retro-live-verification.yml
- .claude/skills/issue-contract-review/scripts/pnpm_gate_registry.py
- .claude/skills/issue-contract-review/tests/test_pnpm_gate_security_boundary.py
- scripts/ci/tests/test_deploy_pages_pnpm_setup.py
- .claude/skills/pr-review-judge/scripts/ci_verdict_summary.py
Runtime Verification Applicability
- decision: deferred
- reason: 本 Issue の Acceptance Criteria(AC1〜AC12)はファイル存在確認・package.json 定義・pnpm_gate_registry 登録・Vitest unit test(negative fixture を含む)で完結する静的〜unit-test 範囲の検証であり、
retro-live-verification:post/:verify/:generateを実際の GitHub PR review live データに対して実行し証跡を記録する動作検証は、Out of Scope に明記したとおり本 Issue の範囲外であり、後続の 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415(ChatGPT GitHub connector retro E2E proof を live 環境で検証する Issue)で初めて成立する。 - deferred_destination:
- destination_type: issue
- destination_ref: "実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415"
- deferred_verification_condition: 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 において
retro-live-verification:post/:verify/:generateを実際の GitHub PR に対して live 実行し、GraphQL API 経由で取得した review / review comment / review thread データに基づく producer / verifier の動作証跡(生成された canonical comment・digest・pagination 完全性検査結果等)が記録された時点で検証が成立する。
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合(特に既存 marker resolver
chatgpt-retro-context-marker-helper.mjsやchatgpt-retro-e2e-proofchecker 本体の変更が必要になった場合) - In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合(実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 の Verification Commands 更新など)
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合。特に
pnpm_gate_registry.pyの既存 gate(typecheck/lint/test/build/typecheck:e2e/lint:docs)を削除・弱体化する変更は禁止し、発生した場合は直ちに停止する
Required Skills
- TypeScript / Node.js scripting(.mjs CLI 実装)
- GitHub GraphQL API(pagination・
errorsフィールド検査) - Python / pytest(
pnpm_gate_registry.pyと security boundary テスト) - ci-test-performance(
.github/workflows/**新規追加のため着手前に読む)
Required Design References
- docs/dev/agent-skill-boundaries.md
- .claude/skills/ci-test-performance/SKILL.md
Scope Delta(任意)
-
追加日時: 2026-07-25
-
対象: PR 実装: retro-live-verification producer/verifier を実装し pnpm gate registry に登録する #1718(Closes 実装: retro-live-verification producer/verifier を実装し pnpm gate registry に登録する #1709)のレビュー(pr-review-judge)で、Allowed Paths gate が
fail_closedと判定された事象への対応 -
理由:
scripts/ci/tests/test_deploy_pages_pnpm_setup.pyが Issue 実装: retro-live-verification producer/verifier を実装し pnpm gate registry に登録する #1709 の Allowed Paths に含まれていなかったが、この PR で変更が必要だった。本 Issue の In Scope で新規追加した.github/workflows/retro-live-verification.ymlがpnpm/action-setup@v4を使用するため、同ファイル内のALLOWED_PNPM_ACTION_SETUP_CONSUMERS(frozenset のホワイトリスト)にこの新規 workflow ファイルパスを登録する必要があった(登録しないと既存のtest_all_pnpm_action_setup_consumers_are_whitelistedテストが FAIL する)。これは新規 workflow 追加に伴う直接的な波及であり、本 Issue の Stop Conditions「Allowed Paths 外の変更が必要と判明した場合」に該当する。 -
拡張内容:
scripts/ci/tests/test_deploy_pages_pnpm_setup.pyを Allowed Paths に追加する(上記のとおり## Allowed Pathsセクションへ追記済み) -
承認状況: 人間(repo owner)がこの Scope Delta による Allowed Paths 拡張を承認済み(続行を選択)
-
追加日時: 2026-07-25(2件目)
-
対象: PR 実装: retro-live-verification producer/verifier を実装し pnpm gate registry に登録する #1718(Closes 実装: retro-live-verification producer/verifier を実装し pnpm gate registry に登録する #1709)のレビューで判明した、共有スクリプト
.claude/skills/pr-review-judge/scripts/ci_verdict_summary.pyの CI 証拠計算 false positive への対応 -
理由:
.github/workflows/retro-live-verification.ymlのpost-canonical-commentジョブはif: github.event_name == 'workflow_dispatch'により PR イベントでは意図的に skip される設計だが、ci_verdict_summary.pyのHEAD_SHA_NULL_SKIPPED_EXCLUDE_RULES(frozenset)にこの exclude ルール("retro-live-verification", "post-canonical-comment")が未登録のため、CI 証拠計算上この意図的な skip が failed 扱いされる false positive が判明した。これは本 Issue の In Scope で新規追加した.github/workflows/retro-live-verification.ymlに直接起因する波及であり、本 Issue の Stop Conditions「Allowed Paths 外の変更が必要と判明した場合」に該当する -
拡張内容:
.claude/skills/pr-review-judge/scripts/ci_verdict_summary.pyを Allowed Paths に追加する(上記のとおり## Allowed Pathsセクションへ追記済み)。同ファイルのHEAD_SHA_NULL_SKIPPED_EXCLUDE_RULESに("retro-live-verification", "post-canonical-comment")を登録する変更を許容する -
承認状況: 人間(repo owner)がこの Scope Delta による Allowed Paths 拡張を承認済み(続行を選択)
Delivery Rule
1 Issue = 1 PR- 専用 worktree で作業し、Draft PR を既定とする
- PR には
Closes #<本 Issue番号>を記載し、実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 は本 Issue のマージ後までstate/blockedのまま維持する
Notes for Reviewer
- 本 Issue は 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 の OWNER レビュー(REQUEST_CHANGES, confidence: high, https://github.com/squne121/loop-protocol/issues/1415#issuecomment-5071393361)P0-2(`retro-live-verification:post`/`:verify` 未実装)と P0-6 関連の prerequisite Issue として、同コメントが提示した二択のうち「実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 を blocked のままにし、producer/verifier 実装用の prerequisite Issue を起票する」を採用して起票した
chatgpt-retro-context:assert-liveの 4 必須引数(--marker-comment-url/--expected-digest/--expected-payload-digest/--expected-matched-comment-count)は PR 実装: CHATGPT_RETRO_CONTEXT marker候補判定を厳密化し、resolve-liveにfail-closed assertionを追加する #1696 で既に実装済みであることを確認済み。本 Issue はこれらの期待値を「resolver 自身の同一実行出力」ではなく「事前固定された trusted manifest」から供給する generator を追加する- OWNER レビューが指摘した P0-4(PR review / review thread の独立再取得)・P0-5(marker resolver 本体への trusted actor allowlist)・P1-6(RFC 8785 準拠 canonicalization)は Allowed Paths の制約上、本 Issue では骨格(GraphQL
errors検査・producer 側の trusted actor 照合・schema 上のcanonicalization_profileフィールド)のみを実装し、既存 marker resolver 本体やchatgpt-retro-e2e-proofchecker 本体の改修は follow-up とする - Scope Overlap(Allowed Paths 完全一致)の検出について: 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 は 2026-07-24T18:42 の issue-refinement-loop で
change_kind: mixedへ一時的に書き換えられ、本 Issue と同一の Allowed Paths を保持したままhuman_escalation(VCP allowlist に新規 pnpm script が未登録の ためissue-contract-reviewがstatus: human_judgmentを返却)で停止している。escalation は 人間判断の選択肢として (a) VCP allowlist へ新規 script を追加する、(b) 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 を blocked のまま prerequisite Issue を先に完了させる、の2択を提示しており、本 Issue は (b) を採用した結果として 起票した。実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 のchange_kind: mixed/ Allowed Paths 書き換えは本 Issue マージ後に verification-only scope へ差し戻す想定であり、現時点の一致は意図した過渡的重複であって 独立した重複起票ではない
Activity
squne121 commentedon Jul 24, 2026
判定
REQUEST_CHANGES /
implementation_ready: false#1709 の狙い自体は妥当です。しかし、現状のIssue契約では次の状態です。
expected_previous_digestとworkflow concurrencyを、実質的なCASより強く扱っている2026年7月25日時点で、#1709 自体にはIssueコメントがありません。レビューでは、親 #1153、直接関連する #1415、PR #1411・#1423・#1696、そのレビューコメント、および現行のgate、resolver、proof checker、workflow policyを参照しました。
P0-1 —
postをVerification Command用pnpm gateへ登録してはならない#1709 は
generate、verifyに加えて、canonical GitHub commentを更新するpostもpnpm gateへ登録し、Verification Commandとして実行可能にする設計です。しかし、リポジトリ上の
test-runnerは明示的にread-onlyロールです。また、runtime policyではVerification Commandの実行主体がtest-runnerとされています。現行pnpm gateの対象は
typecheck、lint、test、build等の品質検証コマンドです。ここへGitHubへの認証済み書込みを行うpostを追加すると、read-only roleがBash経由で外部状態を変更できる権限昇格経路になります。必要修正
generate、verify、post:dry-runのみにするpostの成功を、テストのPASS条件として直接利用しないこの分離をしない限り、#1709 は検証基盤を追加するIssueではなく、検証経路へmutation capabilityを埋め込むIssueになります。
P0-2 — 現行gateと、live verifierに必要な入力契約が両立していない
現行
GateDescriptorのrequest_argvは厳密に2トークンです。gate_for_request()は完全一致しか受理せず、実際の起動も[pnpm, run, script_name]に固定され、追加引数は引き継がれません。セキュリティ境界テストも、第三引数を持つ
pnpm lint:docs --if-presentを明示的に拒否しています。一方、既存
chatgpt-retro-context:assert-liveは少なくとも以下を必須入力とします。#1709 は、新しい3コマンドがこれらの対象固有情報をどこから取得するかを定義していません。CLI引数ならgateに拒否され、環境変数なら暗黙のtrust rootになり、固定ファイルなら生成主体・パス・symlink・改変防止の契約が必要です。
必要修正
次のいずれかをIssue本文で固定してください。
専用launcher方式
スキーマ検証済みの単一request manifestだけを受理し、launcherがそのmanifestのdigest、repo-relative path、symlink非使用、owner、file modeを確認する。
固定input artifact方式
protected workflowがtrusted default-branch上で固定パスへrequestを生成し、gate対象コマンドは追加引数なしでそのファイルだけを読む。
gate registry拡張方式
GateDescriptorにbounded argument schemaを導入する。ただし、これは現在の「2トークン完全一致」というセキュリティモデルの変更なので、#1709とは分離した専用Issueにすべきです。少なくとも、unknown flag、duplicate flag、absolute path、
..、symlink escape、環境変数上書き、shell metacharacterをすべて拒否するnegative testが必要です。P0-3 — Acceptance Criteriaが存在確認中心で、no-op実装でも完了できる
現在のACは、主に次の確認です。
-テストファイルがPASSする
concurrencyという文字列がある特にAC12は
rg -n "concurrency"だけなので、コメント行に# concurrencyと書くだけでもPASSします。AC1〜AC10も、空スクリプト、常時exit 0、実質的に検証しないschemaで満たせます。これは仮定上の懸念ではありません。
malformed_marker_intentsplit-brainやpagination fail-openがOWNERレビューで発見されました。必要修正
ACをファイル存在から、観測可能な状態遷移へ変更してください。最低限、以下を直接要求すべきです。
create | update | noopが一意に決まるP0-4 — 必須のRuntime Verification Applicabilityが欠落している
リポジトリのSSOTでは、全Issueが
not_applicable | immediate | deferredを明示しなければなりません。GitHub API通信、GraphQL取得、コメント作成・更新、post-write readbackは明らかにプロセス起動・通信・I/Oを必要とするため、#1709 はimmediateが妥当です。しかし、#1709 には
Runtime Verification Applicability節がなく、ACにも<!-- runtime-verification: true -->がありません。Verification Commandsも静的確認とunit testだけです。repo policy上、
immediateでは以下が必要です。runtime AC tag
runtime evidence
実行環境不足時のSKIP exit 77
fallback経由をFAIL扱い
PRへの証跡添付
Issueへ追加すべき記述
P0-5 —
expected_previous_digestは原子的CASではない#1709 は
expected_previous_digest、workflowconcurrency、post-write readbackによりsingle-writerを成立させようとしています。方向は正しいものの、保証レベルが未定義です。GitHubのcomment update endpointは、入力としてcomment IDとbodyを受け取りますが、documentedなversion、ETag、
If-Matchpreconditionはありません。GitHubのREST best practicesでも、PATCH等のunsafe methodに対するconditional requestは、各endpointに特記がない限りサポートされないとされています。([GitHub Docs]1)したがって、
は競合を検出しやすくするoptimistic protocolではありますが、原子的compare-and-swapではありません。これはAPI仕様からの推論です。
またActions concurrencyは、同一groupのworkflow/jobしか直列化しません。デフォルトではpending runは1件だけで、新しいrunが古いpending runを置換します。複数待機させるには
queue: maxの明示が必要です。ローカル実行、別workflow、手動編集、別Appからの更新は対象外です。([GitHub Docs]2)必要修正
最も強い設計は、mutableなcanonical commentではなく、次のappend-only構成です。
mutable commentを維持する場合は、少なくとも以下をdigestへ束縛してください。
updated_atそして保証名は「atomic CAS」ではなく、stale-write detection with post-write reconciliation と記述すべきです。
P0-6 — trusted expectationの信頼根と、consumer統合が定義されていない
Issueはgeneratorが「trusted expectation manifest」を生成するとしていますが、generator自身がtrustを生成することはできません。何を信頼済み入力とみなすのか、誰が承認するのか、どのcommitへ固定されるのかが未定義です。
さらにOut of Scopeでは、次を明示的に除外しています。
chatgpt-retro-e2e-proofcheckerによるreview/review-comment/threadの独立再取得一方、#1415で要求されている保証の中心は、まさに期待値の非循環性、trusted actor、GitHub APIからの独立再取得、proof checkerによる再照合です。
Schema governance上も、schemaはproducerとconsumerをまたぐmachine-readable contractです。新しいschemaとproducerだけを追加し、どのconsumerがそれをauthoritative gateとして強制するかを決めなければ、セキュリティ制御ではなく未使用artifactになります。
必要修正
approved manifestは、少なくとも次へ束縛してください。
また、次のどちらかを契約上固定すべきです。
live_evidence_eligible: falseをschema上のconstにするP0-7 — GraphQL completenessが実装可能な水準まで定義されていない
#1709 は「GraphQL
errors検査」と「pagination完全性」を要求していますが、ACではその意味論を規定していません。現行共通clientには次の問題があります。
top-level
errorsを検査せず、dataだけを読むreview threadごとのcommentsは
first: 100固定nested commentsの
endCursorを取得しないため、101件目以降を取得できないhasNextPageが欠落・nullでも、上位helperが!== trueによりcompleteと扱うGraphQLはexecution error時にpartial
dataとerrorsを同時に返し得ます。GitHub GraphQLの各connectionは1〜100件で、hasNextPage: falseになるまでcursorを進める必要があります。GitHubはresource limit超過時にもpartial resultとerrorを返すことがあります。([GraphQL Specification]3)verifierに必須のfail-closed規則
errorsが欠落以外で非空ならFAILdata.repository、pullRequest、対象connectionがnullならFAILpageInfo.hasNextPageはboolean必須hasNextPage: trueの場合、非空のendCursor必須P0-8 — 現行canonicalizationにはdigest対象を欠落させる実装バグがある
現行
canonical-json-v1は、object keyをNFCへ正規化してから、その正規化後keyで元objectを参照しています。例えば元のkeyがNFD形式の
e\u0301である場合、列挙後のkeyはéになりますが、value["é"]は存在しません。その結果valueはundefinedとなり、JSON.stringify時にpropertyごと消失します。また、NFCとNFDの2keyが同時に存在するとcollisionで一方が失われます。#1709 はRFC 8785移行をOut of Scopeとし、
canonicalization_profilefieldだけを追加する予定です。しかしRFC 8785 JCSはUnicode normalizationを行わず、string dataをそのまま保持することを要求しています。長整数についてもIEEE 754範囲外なら文字列化を推奨しています。([RFCエディター]4)必要修正
以下のいずれかを#1709内で完了させる必要があります。
rfc8785-jcs-v1を実際に実装し、NFC normalizationを行わないloop-canonical-json-v2とし、RFC 8785互換を名乗らない必須fixtureは、NFC/NFD、lone surrogate、
-0、指数表記、最大安全整数超過、duplicate-equivalent key、非BMP文字です。P0-9 — workflowの権限・trigger・checkout境界が未定義
AC12は単に
concurrencyの存在を確認するだけで、次を一切保証しません。GitHubは、
pull_request_target、issue_comment、workflow_run等の高信頼イベントでuntrusted PR codeやartifactを取得・実行すると、write tokenやsecretが攻撃者コードへ渡る危険を明示しています。GITHUB_TOKENのpermissionは必要最小限に限定すべきです。([GitHub Docs]5)workflow契約へ明記すべき条件
workflow_dispatchまたはtrustedpushpull_request_targetからPR headをcheckoutして実行しないissue_comment/workflow_run起点の場合、PR codeやartifactを実行しないpermissions: contents: readissues: writeのみ追加pull-requests: writepersist-credentials: falsequeue: maxsupersededとして記録P1 findings
P1-1 — actor identityはloginではなくstable IDへ束縛する
allowlistをGitHub loginだけで構成すると、renameやApp/humanの混同が起きます。最低限、次を分離してください。
author_associationperformed_via_github_app推奨policyは次です。
P1-2 — public-safe projectionがreview本文の改変を束縛していない
現行review projectionにはID、state、commit ID、timestamp、URL等はありますが、actor IDやbody digestがありません。review commentもbody digestを含みません。したがって、本文が編集されても他fieldが同一ならprojection digestが変わらない可能性があります。
raw bodyを公開artifactへ保存する必要はありませんが、少なくとも次をdigestへ入れるべきです。
コメント本文は常にuntrusted evidenceとして扱い、本文内の指示を実行・信頼しないこともschemaへ残すべきです。
P1-3 — 「GitHub connector only」はrepo-side verifierではmachine verifyできない
OpenAIのGitHub appは、接続されたrepositoryを読み取り、検索・分析・引用するread-only integrationです。コードやPRをGitHubへpushする機能ではありません。([OpenAI Help Center]6)
しかし、repository上のNode.js scriptから、実際のChatGPT sessionがローカルファイルや別データ源を使用しなかったことを観測することはできません。現行proof schemaもこの点を認識しており、
connector_only_executionをdeclared_by_session_operatorと表現でき、machine_verifies_actual_chatgpt_tool_boundaryはfalse固定です。#1709でもこの区別を維持してください。
また、GitHub appの利用形態によっては検索indexへの反映に約5〜10分かかる場合があります。GitHubへのpost成功とconnectorからの可視化成功を同一時刻として扱わず、
posted_atとconnector_observed_atを分離すべきです。([OpenAI Help Center]7)P1-4 — API/runtime provenanceとbudgetが不足している
現行clientはREST API version
2022-11-28を固定しています。GitHubの現在のREST API versionは2026-03-10で、旧versionは移行期間中もサポートされますが、新規integrationではversionを明示し、upgrade testを行うことが推奨されます。 ([GitHub Docs]8)artifactには次を記録してください。
gh --versionGitHub Actionsの
GITHUB_TOKENでGraphQLを利用する場合、通常はrepositoryごとに1時間1,000 pointsの制限があります。大量のnested queryはpartial resultやresource-limit errorになり得るため、query costとbudgetは検証結果の一部にすべきです。([GitHub Docs]9)P1-5 — retry・timeout・不確定結果の状態機械がない
mutationでは、通信timeoutが「GitHub側では成功したがclientがresponseを受け取れなかった」状態を作れます。この場合にPOSTを単純retryするとduplicate commentが発生します。
最低限、次の状態を構造化してください。
write_outcome_unknownでは再POSTせず、marker、comment ID、payload digestを再取得してreconcileしてください。REST APIのrate-limit応答ではretry-afterやreset時刻を尊重し、無制限retryは禁止です。([GitHub Docs]10)推奨するスコープ再編
現在の#1709は、pure verification、privileged publication、consumer migrationを一つに入れながら、最も重要なconsumer側変更をOut of Scopeにしています。次の3つへ分ける方が安全です。
A. Pure verification core
対象:
generate/verify/post:dry-run登録外部書込みなし。
B. Privileged publisher workflow
対象:
一般pnpm gateには登録しない。
C. Consumer integration
対象:
live_evidence_eligibleの昇格条件差替えを推奨するAcceptance Criteria
現在のAC1〜AC12は、最低でも次へ置き換えるべきです。
Exact schema
$id、schema const、additionalProperties: false、canonicalization profile、producer/consumer versionを固定する。Non-circular expectation
approved manifestの期待値がresolver出力から生成されていないことをmachine-checkする。
Stable identity binding
repository ID、target node ID、comment ID、actor ID、commit OIDをdigestへ含める。
Safe command boundary
live
postを一般Verification Command gateへ登録しない。登録対象はpure/dry-runコマンドのみとする。Input contract
input source、path、digest、owner、symlink policy、environment override policyを固定する。
Strict GraphQL errors
partial
data+ nonemptyerrorsをFAILする。Complete pagination
review、review comment、thread、thread commentを個別paginateし、全connectionで明示的なcompleteを要求する。
Semantic joins
review comment、review、thread、PR、commit OIDの関係を再照合する。
Actor policy
unauthorized valid markerはignore-and-report、authorized malformed markerはblockする。
Canonicalization vectors
NFC/NFD、collision、large integer、lone surrogateを含むcross-runtime golden testをPASSする。
Write reconciliation
create/update/noop/stale/unknown outcomeを区別し、timeout後にduplicate writeを行わない。
Secure workflow
trigger、permissions、checkout、environment approval、concurrency group、queue policyをstructural testで検証する。
Immediate runtime verification
dedicated Issue/PR targetでlive create、noop、update、stale rejection、readbackを実行する。環境不足はexit 77でありPASSにしない。
Consumer integration
resolverとproof checkerがnew artifactを強制するまで
live_evidence_eligible: falseとする。Proof-strength honesty
GitHub object resolvabilityはmachine verified、actual ChatGPT connector-only executionはoperator declarationとする。
Public safety
raw comment body、prompt、tool I/O、credential、local absolute pathをartifactへ出さない。bodyはdigestだけを保持する。
最終結論
#1709 は、単なるAC不足ではなく、実行権限、入力経路、競合制御、digest正当性、consumer enforcementの各trust boundaryが未閉鎖です。
最低限、以下が修正されるまで実装へ渡すべきではありません。
postを一般pnpm VC gateから分離するimmediateで追加するこれらが完了するまで、#1415 のblockerは解除せず、
live_evidence_eligibleは false固定とするのが妥当です。squne121 commentedon Jul 24, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 24, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 25, 2026
Refinement Loop: Human Escalation Required
The loop has terminated and requires human review. Cause: human judgment required
human_escalationhuman_judgment_requiredBlockers
squne121 commentedon Jul 25, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jul 25, 2026
Contract Review Result
squne121 commentedon Jul 25, 2026
IMPLEMENTATION_WORKER_REPORT
Draft PR: #1718
worktree:
.claude/worktrees/issue-1709-retro-live-verification-producer-verifiebranch:
worktree-issue-1709-retro-live-verification-producer-verifiehead sha:
6d4bafa5fedc99fa0403dac78d770391d8fda122AC ごとの Verification Command 実行結果
test -f docs/schemas/retro-live-verification.schema.jsontest -f scripts/generate-retro-live-verification.mjstest -f scripts/post-retro-live-verification.mjstest -f scripts/check-retro-live-verification.mjsrg -n "\"retro-live-verification:generate\": ..." package.jsonrg -n "\"retro-live-verification:post\": ..." package.jsonrg -n "\"retro-live-verification:verify\": ..." package.jsonrg -n "retro-live-verification" pnpm_gate_registry.pyuv run --locked pytest .../test_pnpm_gate_security_boundary.py -k test_registry_is_the_only_pnpm_gate_authoritytest -d tests/fixtures/retro-live-verificationtest -f tests/retro-live-verification.test.tspnpm vitest run tests/retro-live-verification.test.ts26/26 PASS)rg -n "concurrency" .github/workflows/retro-live-verification.yml追加で実行した品質ゲート
pnpm test: 1698/1698 PASSpnpm typecheck/pnpm lint/pnpm build: 全て greenuv run --locked ruff check --select E,F(変更 python ファイル): 違反なしuv run pytest .claude/skills/gemini-cli-headless-delegation/tests/test_model_routing.py: 21 PASSAllowed Paths 準拠状況
git status --porcelainで確認した変更ファイルは以下の 10 Allowed Paths のみ(追加ファイルは全てtests/fixtures/retro-live-verification/配下):package.jsondocs/schemas/retro-live-verification.schema.jsonscripts/generate-retro-live-verification.mjsscripts/post-retro-live-verification.mjsscripts/check-retro-live-verification.mjstests/retro-live-verification.test.tstests/fixtures/retro-live-verification/.github/workflows/retro-live-verification.yml.claude/skills/issue-contract-review/scripts/pnpm_gate_registry.py.claude/skills/issue-contract-review/tests/test_pnpm_gate_security_boundary.pyAllowed Paths 外の変更なし。既存 6 gate(
typecheck/lint/test/build/typecheck:e2e/lint:docs)は削除・弱体化せず、新規 3 gate を追加した。発生した問題 / human_review_required
check_implementation_overlap.py --issue-number 1709 --repo squne121/loop-protocol --limit 500の overlap preflight がroute: human_review_requiredを返した。候補(実装: .claude/skills 配下スクリプトの executable bit を監査し CI guard を追加する #205 / 改善: executable bit audit CI guard の適用範囲を .claude/skills 外のスクリプトへ拡張する #213 / 実装: playtest-log の JSON Schema / validator の追加 #420 / 実装: VRT CI evidence matrix と artifact validator を active suite 対応に拡張する #1387 / 実装: required CI を snapshot read-only に固定し baseline canonicalization を reviewed PR 境界に限定する #1388 / 実装: Vitest Browser Mode component VRT を report-only scaffold として追加する #1389 / 実装: visual diff AI/VLM triage を非ブロッキング助言として分離する #1390)は executable bit audit・playtest-log schema・VRT snapshot 等、本 Issue と無関係なトピックであり、それらの本文にretro-live-verificationという文字列は含まれていない(grepで非マッチを確認済み)。overlapping_pathsに本 Issue 固有のファイル名がそのまま列挙されており、producer 側の計算異常の疑いがある。実装自体は本 Issue の Allowed Paths 内に収まっている。PR 本文にも同内容を記載した。decision: deferred(destination: 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415)のため、本 PR では live 実行証跡は取得していない(Issue contract 通り)。squne121 commentedon Jul 25, 2026
Contract Review Result
squne121 commentedon Jul 25, 2026
Contract Review Result
fix: AC5/AC7 VC逐語要件を満たすため package.json script を引数なしに戻す