Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1153"
goal_ref: "agent_run_report/v1・agent_retro_index/v1・CHATGPT_RETRO_CONTEXT_V1 を GitHub Issue/PR comment 上で live 解決し、ChatGPT GitHub connector だけでレトロスペクティブ可能であることを operation 単位の public-safe 証跡として証明する"
change_kind: mixed
evidence_mode: synthetic_route_proof
real_runtime_evidence: blocked_until_latitude_real_pilot_activation
blocks_parent_closure: true
evidence_mode_contract:
proof_artifact_value: synthetic_route_proof
existing_marker_prerequisite: synthetic_only
mapping_rule: "proof artifact uses synthetic_route_proof; existing marker schema requires synthetic_only; this mapping must be explicit in checker"
real_pilot_verified_rule: "#1220 LATITUDE_PILOT_EXCEPTION_V1 must be approve_timeboxed_real_pilot AND #1261 distribution/argv/cleanup gates must be machine-verified before real_pilot_verified is permitted"OWNER レビュー(#1405 anchor comment)指摘1対応: evidence_mode_contract は evidence_mode の mapping を明示する。
proof artifact は synthetic_route_proof、既存 CHATGPT_RETRO_CONTEXT_V1 marker schema の
prerequisites.evidence_mode は synthetic_only | real_pilot_verified のみ許可するため、
この2つの語彙を暗黙変換せず checker で明示的に mapping する。
Parent Issue
Related Issues / Dependencies
related_issues:
parent:
- "#1153"
prerequisite_or_context:
- "#1220" # Latitude real-pilot exception decision
- "#1221" # capture capability matrix
- "#1222" # observation source schema admission
- "#1223" # observation source adapter
- "#1224" # CHATGPT_RETRO_CONTEXT_V1 marker
- "#1245" # agent-run:post / retro marker current repo reality alignment
- "#1261" # Latitude distribution / argv / remote cleanup gate
- "#1326" # cloud_pilot_success_contract checker
- "#1364" # cloud_pilot_success_result checkerParent Goal Ref
#1153 は、Claude Code / Codex CLI / Google Antigravity の運用データを public-safe な agent_run_report/v1 / agent_retro_index/v1 に正規化し、ChatGPT が GitHub 経由で再現可能なレトロスペクティブを行える pilot 運用を確立することを目標としている。
現状、以下の部品は存在する。
agent_run_report/v1agent_retro_index/v1- observation source adapter
CHATGPT_RETRO_CONTEXT_V1chatgpt-retro-context:postchatgpt-retro-context:resolve-fixturechatgpt-retro-context:resolve-live
しかし、以下の E2E 証明が不足している。
Issue / PR operation
-> agent session / run identity
-> agent_run_report/v1 GitHub comment
-> agent_retro_index/v1 GitHub comment
-> CHATGPT_RETRO_CONTEXT_V1 GitHub marker comment
-> resolve-live status=resolved
-> ChatGPT connector-only retrospective result
-> public-safe proof artifact
本 Issue は、この未証明部分を machine-readable に閉じる。
Current Validated Scope
本 Issue では real Latitude trace / real prompt / real tool I/O capture は扱わない。
まず synthetic/public-safe route proof として、GitHub comment chain の live 解決、operation 単位の index、ChatGPT retrospective result の validator / fixture / negative control を実装する。
validated_scope:
route_proof:
evidence_mode: synthetic_route_proof
real_prompt_used: false
real_trace_export_used: false
latitude_cloud_required: false
local_file_required_for_chatgpt: false
proves:
- GitHub Issue comment 上の run report を ChatGPT が参照できる
- GitHub Issue comment 上の retro index を ChatGPT が参照できる
- CHATGPT_RETRO_CONTEXT_V1 marker から referenced comment chain を live resolve できる
- Issue / PR operation と agent run / public artifact の対応を operation index で辿れる
- raw transcript / prompt / tool I/O / local path / credential が public surface に出ない
does_not_prove:
- Latitude Cloud real trace 到達
- EntireCLI real checkpoint ingestion
- Claude/Codex/Antigravity の real runtime capture
- Cloud pilot adoption decisionOutcome
以下が成立している状態。
agent_operation_session_index/v1schema が追加されているchatgpt_retro_execution_proof/v1schema が追加されている- Issue operation と PR operation(
pr_comment限定。pr_review/pr_review_addressedは resolver 対応後の follow-up)の少なくとも 2 種類について、public-safe fixture が存在する - checker が positive fixture を pass し、negative fixture を fail-closed にする
CHATGPT_RETRO_CONTEXT_V1live resolver のstatus: resolved出力を proof artifact に取り込める- ChatGPT connector-only retrospective result を
chatgpt_retrospective_result/v1として検証できる - 導入: EntireCLI + Latitude の観測データを agent_run_report に接続し、GitHub 経由の ChatGPT レトロ動線を確立する #1153 の parent closure に使える
RETRO_E2E_PROOF_V1comment contract が存在する - real pilot 未承認時は
evidence_mode: synthetic_route_proofのまま固定され、real_pilot_verifiedを名乗れない
New Artifacts
1. agent_operation_session_index/v1
Issue / PR operation と agent session artifact を接続する public-safe index。
agent_operation_session_index/v1:
schema: agent_operation_session_index/v1
repo: squne121/loop-protocol
parent_issue: 1153
target:
kind: issue | pull_request
number: integer
operation:
# OWNER レビュー指摘2対応: 既存 live resolver は issue comments 前提で
# pr_review / inline review thread の取得経路を持たない。初回リリースの
# operation.kind は pr_comment に限定し、pr_review / pr_review_addressed は
# resolver が review comment / review thread surface に対応するまで
# out_of_scope_until_resolver_supports_pull_review_surfaces とする(follow-up issue へ)。
kind:
- issue_comment
- issue_body_update
- issue_close
- pr_open
- pr_comment
- commit_push
- ci_retry
- merge
kind_excluded_until_follow_up:
- pr_review
- pr_review_addressed
- inline_review_thread_resolved
github_event_ref:
kind: github_issue | github_pr | github_comment | workflow_run
ref: string
digest: sha256:<64hex> | null
occurred_at: ISO8601
agent_run:
run_id: string
agent_surface: claude_code | codex_cli | google_antigravity | unknown
evidence_mode:
- synthetic_route_proof
- synthetic_only
- real_pilot_verified
capability_verdict: supported | partial | unsupported | unverified
raw_values_emitted: false
public_artifacts:
run_report_comment_url: string
run_report_payload_digest: sha256:<64hex>
retro_index_comment_url: string
retro_index_payload_digest: sha256:<64hex>
retro_index_source_set_digest: sha256:<64hex>
chatgpt_marker_comment_url: string
chatgpt_marker_digest: sha256:<64hex>
verification:
resolver_command: pnpm chatgpt-retro-context:resolve-live
resolver_status: resolved
checked_at: ISO8601
checker_version: string
public_safe: true
# OWNER レビュー指摘5対応: schema の properties 定義だけでは cross-field invariant は
# 閉じないため、checker が以下の semantic_checks を明示的に検証する。
semantic_checks:
- target.kind == issue なら target URL は /issues/<number>
- target.kind == pull_request なら target URL は /pull/<number> または issue-comment endpoint for PR と明示
- public_artifacts.*_comment_url の issue/pr number が target または parent_issue と整合
- run_report payload 内 target / parent / run_id が operation index と整合
- retro_index source_set_digest が referenced report/comment set から再計算一致
- chatgpt marker ownership tuple が operation index の repo / target / parent_issue と一致
- github_event_ref.kind と operation.kind の組み合わせが closed mapping に一致
- occurred_at が referenced GitHub comment/review/workflow の created_at/updated_at と矛盾しない
- raw_values_emitted は index / referenced payload 全体で false2. chatgpt_retro_execution_proof/v1
ChatGPT が GitHub connector だけでレトロ可能だったことを示す proof artifact。
chatgpt_retro_execution_proof/v1:
schema: chatgpt_retro_execution_proof/v1
proof_kind: RETRO_E2E_PROOF_V1
repo: squne121/loop-protocol
parent_issue: 1153
target:
kind: issue | pull_request
number: integer
operation_index_ref:
comment_url: string
payload_digest: sha256:<64hex>
validation_verdict: pass
chatgpt_context:
marker_comment_url: string
marker_digest: sha256:<64hex>
resolve_live_status: resolved
resolve_live_output_digest: sha256:<64hex>
local_file_access_used: false
latitude_direct_access_used: false
raw_trace_access_used: false
github_connector_only: true
# OWNER レビュー指摘3: "connector-only" は repo checker だけでは完全には機械証明できない。
# machine-verified な層と、ChatGPT セッション operator の自己申告に依存する層を分離して明示する。
proof_strength:
context_resolvability: machine_verified
retrospective_result_schema: machine_verified
connector_only_execution: declared_by_session_operator
local_file_non_use: declared_by_session_operator
latitude_direct_non_use: declared_by_session_operator
machine_verifies_actual_chatgpt_tool_boundary: false
# OWNER レビュー指摘4: 保存済み resolver output をそのまま信用しない。
# fixture mode では comment universe 再読込、live mode では resolver 再実行または
# resolved_comment_set_digest 再計算によって staleness を検出する。
resolver_evidence:
command: pnpm chatgpt-retro-context:resolve-live
command_args_digest: sha256:<64hex>
resolver_version_digest: sha256:<64hex>
checked_at: ISO8601
status: resolved
marker_comment_url: string
marker_digest: sha256:<64hex>
payload_digest: sha256:<64hex>
evidence_ref_count: integer
source_manifest_count: integer
page_budget_exhausted: false
reference_page_budget_exhausted: false
resolved_comment_set_digest: sha256:<64hex>
retrospective_result:
schema: chatgpt_retrospective_result/v1
payload_digest: sha256:<64hex>
validation_verdict: pass
verdict:
- approve
- request_changes
- blocked
- insufficient_evidence
safety:
raw_values_emitted: false
forbidden_fields_scan: pass
prompt_excerpt_present: false
tool_io_excerpt_present: false
local_absolute_path_present: false
credential_value_present: false
free_form_instruction_trusted: false
issue_or_pr_body_treated_as_untrusted_evidence: true
evidence_mode:
value: synthetic_route_proof
marker_prerequisite_evidence_mode: synthetic_only
real_runtime_capture_claimed: false
real_pilot_verified_claimed: false
allowed_real_pilot_upgrade: false
cloud_pilot_claimed: falseOWNER レビュー指摘1 対応: evidence_mode.value: synthetic_route_proof は proof artifact 側の語彙であり、
既存 chatgpt-retro-context-marker.schema.json の prerequisites.evidence_mode は synthetic_only のみを
prerequisite として要求する。checker はこの2値を同一視せず、marker_prerequisite_evidence_mode: synthetic_only
を明示的な mapping 先として検証する。real_pilot_verified_claimed: true は #1220 が
approve_timeboxed_real_pilot であり、かつ #1261 の distribution / argv / remote cleanup gate が
machine-verified である場合のみ許可し、それ以外は fail-closed とする。
3. Digest Canonicalization Profile
OWNER レビュー指摘9対応: digest を「なんとなく sha256」にせず、両 schema(agent_operation_session_index/v1 /
chatgpt_retro_execution_proof/v1)で共通の digest canonicalization profile を固定する。
digest_profile:
algorithm: sha256
canonicalization: canonical-json-v1
unicode_normalization: NFC
newline: LF
object_key_order: lexical_by_unicode_codepoint
array_order: preserved
absent_optional_fields: omitted
explicit_null: preserved
timestamp_format: RFC3339 UTC Z
digest_prefix_required: true
digest_input_excludes:
- markdown_marker_lines
- markdown_fence
- raw_trace_body
- local_file_pathIn Scope
agent_operation_session_index/v1JSON Schema の追加chatgpt_retro_execution_proof/v1JSON Schema の追加- proof checker の追加。
chatgpt-retro-e2e-proof:checkは、proof artifact から参照される
chatgpt_retrospective_result/v1について以下(OWNER レビュー指摘6)まで検証する:- schema validation pass
scanPublicSafetypassinput_marker_digest == proof.chatgpt_context.marker_digest- target tuple が
proof.targetと一致 - すべての
evidence_refsが operation_index_ref / marker comment / run report comment /
retro index comment / allowed repo file / explicitly cited web_doc のいずれかに解決できる resolver_status != resolvedのときverdict: approveを許可しないevidence_mode == synthetic_route_proofかつ claim が real runtime capture を含意する場合は
verdict: approveを許可しないfollow_up_issue_candidates[].bodyは free-form text のため、marker breakout / Markdown fence
breakout / instruction injection(ignore previous instructions等) / credential-like value /
local path / raw transcript-like text の recursive scan を行う
- operation index checker の追加。
agent-operation-session-index:checkは schema validation に加えて
上記semantic_checks(target.kind/URL整合、run_id/target/parent一致、marker ownership tuple一致、
github_event_ref.kindとoperation.kindの closed mapping、occurred_at矛盾なし、
raw_values_emitted: false)を fail-closed で検証する(OWNER レビュー指摘5) - positive fixture:
- Issue operation route proof(
target.kind: issue) - PR operation route proof(
target.kind: pull_request、operation.kind: pr_comment限定。
pr_review/pr_review_addressedは resolver が review comment / review thread surface に
対応するまで follow-up issue に分離する。OWNER レビュー指摘2)
- Issue operation route proof(
- negative fixture:
- missing run report comment
- missing retro index comment
- stale marker digest
- duplicate
CHATGPT_RETRO_CONTEXT_V1marker - malformed marker
- resolver status not
resolved local_file_access_used: truelatitude_direct_access_used: trueraw_values_emitted: truereal_pilot_verifiedinjected while 実装: decision(latitude): credential を保持した real pilot 例外を承認/却下し、time-boxed activation gate を定義する #1220 is notapprove_timeboxed_real_pilot- raw prompt / tool I/O / local path / credential-like field injection
- Issue / PR body text treated as instruction rather than untrusted evidence
- saved resolver status が stale(
resolved_comment_set_digest再計算不一致。OWNER レビュー指摘4) - page budget exhausted(
page_budget_exhausted: true/reference_page_budget_exhausted: true) pr_review/pr_review_addressedがoperation.kindに誤って現れる(OWNER レビュー指摘2)- target URL kind mismatch(
target.kindと comment URL pattern の不整合。OWNER レビュー指摘5) github_event_ref.digestに raw webhook payload digest が混入(OWNER レビュー指摘5)follow_up_issue_candidates[].bodyに marker injection / prompt injection が混入(OWNER レビュー指摘6)- distribution / runtime capture evidence(Latitude / EntireCLI / npm package 実行証跡等)が
fixture に混入した場合はexternal_runtime_evidence_refではなく
forbidden_or_out_of_scope_runtime_claimとして fail-closed にする(OWNER レビュー指摘8) - digest canonicalization negative fixture: key order permutation / NFC vs NFD / CRLF vs LF /
explicit null vs absent / timestamp offset / marker line が digest input に混入
(OWNER レビュー指摘9。digest_profile参照)
- forbidden field scanner の語彙拡張(OWNER レビュー指摘7)。既存 scanner の語彙に加え、
proof checker 専用 scanner として最低限以下を追加する:forbidden_keys_extra: - messages - prompt - system_prompt - tool_input - tool_output - tool_result - request_body - response_body - stdout - stderr - authorization - cookie - set_cookie - api_key - token - trace_state - tracestate - baggage - span_links - exception.message - exception.stacktrace - http.request.body - http.response.body - url.full - server.address - client.address - user.id - enduser.id - session.id
- package scripts:
agent-operation-session-index:checkchatgpt-retro-e2e-proof:check
- docs:
docs/dev/agent-run-report.mdに parent closure proof contract を追記docs/dev/agent-retro-index.mdに operation index との関係を追記
CHATGPT_RETRO_CONTEXT_V1live resolver output を proof artifact に取り込む手順の追加
Out of Scope
- real Latitude Cloud pilot の実行
- real prompt / real tool I/O / raw trace の読み取り
- EntireCLI checkpoint raw transcript の GitHub 投稿
- Latitude provider-side trace body の読み取り
- Cloud adoption decision を
adopt_cloudにすること - 実装: decision(latitude): credential を保持した real pilot 例外を承認/却下し、time-boxed activation gate を定義する #1220 の decision を
approve_timeboxed_real_pilotに変更すること - 実装: Latitude telemetry distribution / argv / remote cleanup gate を real pilot 前提で強化する #1261 / 実装: cloud_pilot_success_contract_v1 の checker/schema/negative fixtureを実装する #1326 / 実装: cloud_pilot_success_result/v1 の checker/schema/negative fixture を実装する #1364 の unresolved blocker をこの Issue で解消すること
- GitHub connector 以外の ChatGPT 外部入力を proof として使うこと
- operation index を agent_run_report schema 本体へ inline embed すること
- PR review comments / inline review thread resolver support(follow-up issue へ。OWNER レビュー指摘2。
既存 live resolver は issue comments 前提でありpr_review/pr_review_addressed/
inline review thread の取得経路を持たない) - ChatGPT audit artifact / execution boundary verification(OWNER レビュー指摘3。
repo checker が machine-verify できるのは「GitHub marker/comment chain の live 解決」と
「retrospective result の schema/digest/safety scan」までであり、ChatGPT セッション側の
実際の tool boundary 遵守は ChatGPT セッション監査証跡が必要なため repo-side checker の範囲外とする) - Latitude / EntireCLI / npm package distribution の実証、および Claude/Codex/Antigravity の
real runtime capture の直接検証(OWNER レビュー指摘8。実装: ChatGPT GitHub retro E2E proof と Issue/PR operation session index を追加する #1405 は route proof であり配布物の実証は
scope 外。fixture に distribution evidence が出た場合は forbidden_or_out_of_scope_runtime_claim
として fail-closed にする)
Acceptance Criteria
- AC1:
docs/schemas/agent-operation-session-index.schema.jsonが存在し、agent_operation_session_index/v1を closed schema として検証する - AC2:
docs/schemas/chatgpt-retro-execution-proof.schema.jsonが存在し、chatgpt_retro_execution_proof/v1を closed schema として検証する - AC3:
scripts/check-agent-operation-session-index.mjsが存在し、positive fixture を pass、negative fixture を fail-closed にする。schema validation に加え、semantic invariant(target.kind/URL整合、run_id/target/parent一致、marker ownership tuple一致、github_event_ref.kindとoperation.kindの closed mapping、occurred_at矛盾なし、raw_values_emitted: false)の violation を fail-closed にする(OWNER レビュー指摘5) - AC4:
scripts/check-chatgpt-retro-e2e-proof.mjsが存在し、positive fixture を pass、negative fixture を fail-closed にする。proof artifact から参照されるchatgpt_retrospective_result/v1について schema validation / public safety scan / digest 一致(input_marker_digest)/evidence_refsの解決可能性 /resolver_status要件 /evidence_mode要件 /follow_up_issue_candidates[].bodyの recursive scan まで検証する(OWNER レビュー指摘6) - AC5: Issue operation 用 positive fixture が存在し、
target.kind: issue、resolver_status: resolved、github_connector_only: trueを満たす - AC6: PR comment operation 用 positive fixture が存在し(
target.kind: pull_request、operation.kind: pr_comment)、resolver_status: resolved、github_connector_only: trueを満たす(pr_review/pr_review_addressedは follow-up issue に分離し、本 Issue の positive fixture には含めない。OWNER レビュー指摘2) - AC7:
real_pilot_verifiedが 実装: decision(latitude): credential を保持した real pilot 例外を承認/却下し、time-boxed activation gate を定義する #1220 のapprove_timeboxed_real_pilotなしに出現した fixture は fail-closed になる - AC8: raw transcript / prompt / system_prompt / messages / tool_input / tool_output / tool_result / stdout / stderr / request_body / response_body / authorization / cookie / set_cookie / api_key / token / trace_state / tracestate / baggage / span_links / exception.message / exception.stacktrace / http.request.body / http.response.body / url.full / server.address / client.address / user.id / enduser.id / session.id / local path / credential-like value を含む fixture は fail-closed になる(OWNER レビュー指摘7。
forbidden_keys_extra参照) - AC9: duplicate marker、malformed marker、missing report、missing retro index、stale digest、resolver status not resolved、および distribution / runtime capture evidence(Latitude / EntireCLI / npm package 実行証跡等)が external runtime claim として injected された fixture(
forbidden_or_out_of_scope_runtime_claim)の negative fixture が fail-closed になる(OWNER レビュー指摘8) - AC10:
chatgpt_retrospective_result/v1の retrospective result が proof artifact から参照され、digest と validation verdict が一致しない場合は fail-closed になる。加えて、保存済みresolve_live_status: resolvedを無条件に信用せず、fixture mode では comment universe を再読込、live mode では resolver 再実行またはresolved_comment_set_digestの再計算により一致しない場合は fail-closed になる(OWNER レビュー指摘4) - AC11:
docs/dev/agent-run-report.mdに 導入: EntireCLI + Latitude の観測データを agent_run_report に接続し、GitHub 経由の ChatGPT レトロ動線を確立する #1153 parent closure proof rule が追記される - AC12:
docs/dev/agent-retro-index.mdに operation index と retro index の責務境界が追記される - AC13:
package.jsonにagent-operation-session-index:checkとchatgpt-retro-e2e-proof:checkが追加される - AC14:
pnpm testで operation index / E2E proof checker の positive / negative fixture が検証される - AC15: PR body に、この Issue が synthetic route proof であり、real Latitude / Entire / Cloud pilot 証明ではないことを明記する
- AC16: 導入: EntireCLI + Latitude の観測データを agent_run_report に接続し、GitHub 経由の ChatGPT レトロ動線を確立する #1153 の Remaining Parent Gaps に、この Issue の完了後も real Cloud pilot / real runtime capture が未完了なら残ることを明記する
Remaining Parent Gaps
本 Issue 完了後も、#1153 の Remaining Parent Gaps のうち以下は未解消のまま残る(本 Issue の scope 外)。
- Secret Policy と現在の Latitude credential 状態の整合(実装: security(latitude): telemetry credential / preload capture を封じ込め、Secret Inventory / Kill Switch を fail-closed 化する #1157 系)
- 3 agent surface の capture capability 確定(Child B)
- Claude Code hook 共存検証(Latitude × EntireCLI)(Child B)
- Codex CLI hook canonical key 互換性検証(Child B)
- Antigravity telemetry 可否確定(Child B)
- Cloud pilot metrics・adoption / self-host Decision・rollback / uninstall verification(Child E / F)
本 Issue が解消するのは「ChatGPT が GitHub connector だけでレトロスペクティブ可能である」ことの synthetic route proof のみである。
OWNER レビュー指摘10対応: #1405 は #1326(cloud_pilot_success_contract_v1 checker/schema、確認時点で OPEN)と
#1364(cloud_pilot_success_result_v1 checker、確認時点で OPEN)を prerequisite/context として列挙しているが、
#1405 自体は synthetic route proof であるため #1326 / #1364 の未完了は #1405 の実装を妨げない。ただし
parent #1153 closure 時に「Cloud pilot / real runtime capture まで証明済み」と誤読されないよう、以下を
proof schema および本 Issue の close 時の明示事項として固定する。
remaining_parent_gaps_ack:
cloud_pilot_success_contract_checker_complete: false
cloud_pilot_success_result_checker_complete: false
real_cloud_pilot_complete: false
real_runtime_capture_complete: false
parent_1153_closure_allowed_by_this_artifact_alone: false
acknowledged_out_of_scope_completions:
# 本 Issue では解消されない事項(Not resolved by this Issue)
- "#1326 cloud_pilot_success_contract_v1 checker/schema implementation (OPEN)"
- "#1364 cloud_pilot_success_result_v1 checker implementation (OPEN)"
- "Real Latitude Cloud pilot metrics / success result integration"
- "Real runtime capture from Claude Code / Codex CLI / Antigravity"
- "Cloud adoption decision mechanics"Required Design References
docs/dev/agent-run-report.mddocs/dev/agent-retro-index.mddocs/dev/secret-policy.mddocs/dev/agent-skill-boundaries.md
Required Skills
implement-issueimpl-review-loopopen-pr
Verification Commands
# AC1
# baseline-expect: fail
$ test -f docs/schemas/agent-operation-session-index.schema.json
# AC2
# baseline-expect: fail
$ test -f docs/schemas/chatgpt-retro-execution-proof.schema.json
# AC3
# baseline-expect: fail
$ test -f scripts/check-agent-operation-session-index.mjs
# AC4
# baseline-expect: fail
$ test -f scripts/check-chatgpt-retro-e2e-proof.mjs
# AC5
# baseline-expect: fail
$ test -f tests/fixtures/agent-operation-session-index/valid-issue-operation.json
# AC6
# baseline-expect: fail
$ test -f tests/fixtures/agent-operation-session-index/valid-pr-operation.json
$ ! grep -F "pr_review" docs/schemas/agent-operation-session-index.schema.json
# AC7
$ pnpm test
# AC8
$ pnpm test
# AC9
$ pnpm test
# AC10
# baseline-expect: fail
$ test -f tests/fixtures/chatgpt-retro-e2e-proof/valid-issue-retro-proof.md
# AC11
$ grep -n "parent closure proof" docs/dev/agent-run-report.md
# AC12
$ grep -n "operation index" docs/dev/agent-retro-index.md
# AC13
$ grep -n "agent-operation-session-index:check" package.json
$ grep -n "chatgpt-retro-e2e-proof:check" package.json
# AC14
$ pnpm test
# AC15
# baseline-expect: pass
$ echo "manual verification: reviewer confirms PR body states synthetic route proof (not real Latitude/Entire/Cloud pilot proof)"
# AC16
# baseline-expect: pass
$ echo "manual verification: reviewer confirms #1153 Remaining Parent Gaps retains real Cloud pilot / real runtime capture until completed"
Allowed Paths
docs/dev/agent-run-report.md
docs/dev/agent-retro-index.md
docs/schemas/agent-operation-session-index.schema.json
docs/schemas/chatgpt-retro-execution-proof.schema.json
scripts/check-agent-operation-session-index.mjs
scripts/check-chatgpt-retro-e2e-proof.mjs
tests/agent-operation-session-index-check.test.ts
tests/chatgpt-retro-e2e-proof-check.test.ts
tests/fixtures/agent-operation-session-index/**
tests/fixtures/chatgpt-retro-e2e-proof/**
package.json
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- real prompt / raw transcript / tool I/O / local path / credential value を読む必要が出た場合
- Latitude Cloud trace body を読む必要が出た場合
- EntireCLI checkpoint raw payload を GitHub に投稿する必要が出た場合
- 実装: decision(latitude): credential を保持した real pilot 例外を承認/却下し、time-boxed activation gate を定義する #1220 の decision 変更が必要になった場合
- 実装: Latitude telemetry distribution / argv / remote cleanup gate を real pilot 前提で強化する #1261 / 実装: cloud_pilot_success_contract_v1 の checker/schema/negative fixtureを実装する #1326 / 実装: cloud_pilot_success_result/v1 の checker/schema/negative fixture を実装する #1364 の unresolved blocker を本 Issue 内で解消する必要が出た場合
- schema を
agent_run_report/v1本体へ破壊的に変更する必要が出た場合 - GitHub API live write を CI や unit test の必須条件にする必要が出た場合
- ChatGPT connector 以外の private/local context を retrospective proof に混ぜる必要が出た場合
- operation index が Issue / PR target と一意に結びつかない場合
resolve-liveがresolved以外を返す状態を success として扱いたくなった場合
Runtime Verification Applicability
decision: deferred
rationale: >
本 Issue の checker/schema/fixture は unit test で検証する。
実 GitHub comment chain に対する live upsert / resolve-live 証跡は PR verification comment として任意に添付できるが、
CI の必須条件にはしない。GitHub API write を CI に要求すると権限・rate limit・stale state により flaky になるため。
deferred_destination: "PR verification comment (live resolve-live 証跡は PR body/comment に添付し、CI 必須条件にはしない)"
deferred_verification_condition: "少なくとも1件のIssue targetと1件のPR targetでresolve-live status=resolvedが得られた時点"
required_for_parent_closure: true
parent_closure_note: >
#1153 を close する前に、本 Issue の checker/schema が merged された後、
少なくとも 1 件の Issue target と 1 件の PR target で live GitHub comment chain を作成し、
resolve-live status=resolved と ChatGPT connector-only retrospective result を GitHub 上に残すこと。Parent Closure Rule Addition
#1153 の closure rule に以下を追加する。
retro_e2e_proof_required:
required: true
minimum_targets:
issue_operation: 1
pull_request_operation: 1
required_artifacts:
- agent_operation_session_index/v1
- agent_run_report/v1 GitHub comment
- agent_retro_index/v1 GitHub comment
- CHATGPT_RETRO_CONTEXT_V1 GitHub marker comment
- chatgpt_retro_execution_proof/v1
- chatgpt_retrospective_result/v1
required_resolver_status: resolved
chatgpt_access_boundary:
github_connector_only: true
local_file_access_used: false
latitude_direct_access_used: false
raw_trace_access_used: false
safety:
raw_values_emitted: false
forbidden_fields_scan: pass
real_capture_claim_allowed: falseNotes for Reviewer
この Issue は #1153 の「ChatGPT からアクセスしてレトロスペクティブする動線」の 証明不足を潰すためのもの。
ただし、これは synthetic_route_proof であり、Latitude / EntireCLI / Claude / Codex / Antigravity の real capture 成功を証明しない。real capture / Cloud pilot adoption は #1220 / #1261 / #1326 / #1364 が解消され、別途 real_pilot_verified evidence mode の proof が作られるまで BLOCKED のままとする。
本 Issue の成功条件は、「GitHub public-safe comments を正本として、ChatGPT が connector 経由で deterministic に retrospective context を解決できること」を証明することである。
出典: このIssueは #1153 の anchor comment(OWNER, https://github.com/squne121/loop-protocol/issues/1153#issuecomment-4917646459)にて草案化された child issue をそのまま起票したものである。issue-refinement-loop の web research(Step 1b)では、Latitude/Claude Code/Codex CLI公式ドキュメントの記述と概ね整合することを確認した。Google Antigravity については、公式ドキュメント上hook eventがsecurity/audit中心で観測capture用途の適合性が未確認である旨、レビュー時に留意する。
OWNER レビュー(#1405 anchor comment, https://github.com/squne121/loop-protocol/issues/1405#issuecomment-4925358494)反映: connector-only proof は machine-verified layer(GitHub marker/comment chain の live 解決、retrospective result の schema/digest/safety scan)と operator-declared layer(実際の ChatGPT connector-only tool boundary の遵守)の2層に分かれることを明記する。#1405 を close する際は、#1153 closure note に「synthetic_route_proof 完了、real_runtime_capture は未完了」であることを明記すること。
Activity
squne121 commentedon Jul 9, 2026
判定
REQUEST_CHANGES。#1405 は方向性は妥当ですが、現行契約のまま実装すると “GitHub comment route は通った” だけを “ChatGPT connector-only E2E proof” と誤認する false green を作ります。
#1405 自体は、real Latitude trace / real prompt / real tool I/O を扱わず、
synthetic_route_proofとして GitHub comment chain の live 解決、operation 単位 index、retrospective result validator / fixture / negative control を実装する、という切り分けを明記しています。これは parent #1153 の Private Observation Plane と Public Retrospective Plane の分離方針と整合しています。ただし、#1405 にはコメントがまだなく、検索した範囲では
agent_operation_session_index/chatgpt_retro_execution_proof/ #1405 に対応する実装PRは確認できませんでした。#1405 の issue comments は空です。P0 Blockers
1.
synthetic_route_proofと既存CHATGPT_RETRO_CONTEXT_V1schema の evidence mode がズレている#1405 は新 proof artifact の evidence mode を
synthetic_route_proofとしています。一方、既存chatgpt-retro-context-marker.schema.jsonのprerequisites.evidence_modeはsynthetic_only | real_pilot_verifiedだけを許可しています。このままだと、実装者は次のどちらかを選びがちです。
synthetic_route_proofを追加して既存境界を広げるsynthetic_route_proof、marker 側はsynthetic_onlyとして暗黙変換するどちらも明示しないと後続 checker が drift します。修正案は、#1405 の proof schema に以下を追加することです。
さらに、
real_pilot_verifiedが proof / marker / retrospective result のどこかに出現した場合は、#1220 のLATITUDE_PILOT_EXCEPTION_V1がapprove_timeboxed_real_pilotであり、かつ #1261 の distribution / argv / remote cleanup gate が machine-verified であることを要求し、それ以外は fail-closed にすべきです。#1220 は real pilot exception decision を closed enum で扱い、#1261 は unpinnednpx、argv exposure、remote cleanup unknown を real pilot activation 前提で block する契約です。2. PR operation proof が Issue comment resolver だけでは成立しない
#1405 は Issue operation と PR operation の positive fixture を要求し、operation kind に
pr_review/pr_review_addressedを含めています。しかし現行CHATGPT_RETRO_CONTEXT_V1周辺実装は、2-line ownership/digest marker と#issuecomment-...URL を前提にしています。marker helper の ownership regex はtarget=issue|pull_request:<number>ですが、実体として comment URL pattern は GitHub issue comment URL に寄っています。既存 live resolver も、対象 issue number / parent issue number の issue comments を列挙し、そこから marker / report / retro index comment を解決します。
pr_reviewや inline review thread の取得はこの経路に含まれていません。GitHub API 上も、PR review comments は pull request の unified diff 上のコメントであり、issue comments とは別物です。GitHub docs は issue comments endpoint について「pull request は issue でもあるが、pull request review comments は別 endpoint を見る」と明記し、review comments docs でも review comment は issue comment と異なると説明しています。([GitHub Docs]1) ([GitHub Docs]2)
修正案は二択です。
現実的には #1405 では PR positive fixture を
pr_commentに限定し、pr_review/pr_review_addressedは follow-up に分ける方が安全です。#1405 のままpr_reviewを pass させると、PR review の証拠を見ていないのに PR operation proof を名乗ることになります。3. “ChatGPT connector-only” は repo checker だけでは完全には機械証明できない
#1405 は
github_connector_only: true、local_file_access_used: false、latitude_direct_access_used: false、raw_trace_access_used: falseを proof artifact に入れる設計です。これは必要ですが、repo 内 checker が検証できるのは「GitHub marker/comment chain が deterministic に解決できること」と「retrospective result payload が schema / digest / safety scan を通ること」までです。ChatGPT 実行時にモデルが本当に GitHub connector 以外を使わなかったことは、ChatGPT セッション側の実行境界・監査証跡なしには repo asset だけで証明できません。したがって schema 名の
chatgpt_retro_execution_proof/v1はやや強すぎます。少なくとも artifact 内に以下の区別を入れるべきです。github_connector_only: trueを machine-verified field として扱うなら、ChatGPT 側の audit artifact を別 schema として要求する必要があります。それを out of scope にするなら、#1405 の claim は “GitHub connector-only retrospective に必要な public-safe context bundle が live 解決可能である” に弱めるべきです。4. resolver
status: resolvedを proof artifact に貼るだけでは弱い既存 resolver は
resolved、blocked_duplicate、blocked_malformed、missing、blocked_stale_write、blocked_page_budget_exhausted、blocked_invalid_reference_chainなどの structured status を返します。これは良い設計です。ただし #1405 の proof artifact が
resolve_live_status: resolvedとresolve_live_output_digestを持つだけなら、古い resolver output の貼り付けや、対象 comment set が変わった後の stale proof を検出できません。修正案:
そして proof checker は保存済み resolver output を信用するだけでなく、fixture mode では comment universe を再読込、live mode では可能なら resolver を再実行し、
resolved_comment_set_digestを再計算すべきです。P1 High Findings
5.
agent_operation_session_index/v1は schema だけでなく cross-field semantic checker が必要#1405 の operation index は
target.kind/number、operation.kind、github_event_ref、agent_run.run_id、run report / retro index / marker comment URL と digest を接続します。ここは JSON Schema だけでは閉じません。JSON Schema はpropertiesを書いただけでは未知 property や missing property を禁止せず、additionalProperties: falseやrequired、cross-field invariant を明示しないと抜けます。(JSON Schema)最低限、checker で次を検証してください。
github_event_ref.digestも曖昧です。event body の digest なのか、public projection の digest なのか、GitHub API response canonicalization の digest なのかを固定してください。raw webhook payload digest を public artifact に持ち込むと、secret / private field の digest 化を許す抜け穴になります。6.
chatgpt_retrospective_result/v1は存在するが、#1405 用の専用 checker が足りないchatgpt-retrospective-result.schema.jsonは既にあり、top-leveladditionalProperties: false、verdictenum、findings[].evidence_refs[]、follow_up_issue_candidates[]、raw_values_emitted: falseを定義しています。しかし検索した範囲では、
chatgpt_retrospective_result/v1を単体で検証する CLI は見つからず、既存 validation helper に関数があるだけです。#1405 の
chatgpt-retro-e2e-proof:checkは、proof artifact から参照される retrospective result を以下まで検証する必要があります。特に
follow_up_issue_candidates[].bodyは free-form text なので、marker breakout、Markdown fence breakout、ignore previous instructions、credential-like value、local path、raw transcript-like text を再帰 scan する必要があります。7. 現行 forbidden-field scanner は #1405 AC8 の語彙に足りない
既存 scanner は
raw_transcript、transcript_excerpt、local_path、absolute_path、secret_value、full_command_output、full_prompt、artifact_path、transcript_path、raw_manifest_jsonを forbidden key とし、secret/path/marker injection pattern も見ています。#1405 AC8 は、raw transcript / prompt / messages / tool input / tool output / stdout / stderr / local path / credential-like value を含む fixture を fail-closed にする要求です。既存 forbidden key set には
messages、tool_input、tool_output、stdout、stderr、request_body、response_body、authorization、trace_state、baggageなどが足りません。Latitude の Claude Code telemetry は prompts、responses、tool input/output、system context を含み得る full-fidelity telemetry と説明され、公式例も unpinned
npx -y @latitude-data/claude-code-telemetryと async Stop hook を含みます。([Latitude Docs]4)OpenTelemetry span も attributes、events、links、status、exception recording などを持つため、raw trace payload を public surface に通す設計は危険です。([OpenTelemetry]5)
#1405 では proof 専用 scanner として最低限これを追加してください。
8. npm / Latitude 配布物の扱いを proof に混ぜてはいけない
#1405 は real runtime proof ではなく route proof なので、Latitude package distribution の実証は scope 外にするべきです。外部実装を見る限り、
npxは package specifier を受け取り、local dependency がなければ npm cache に install して実行できます。version 未指定の package 名は実行時解決に依存しやすく、再現性の証明には不向きです。([npm ドキュメント]6)npm provenance は build / publish の由来を監査する材料ですが、悪意あるコードがないこと自体を保証するものではありません。([npm ドキュメント]7)
したがって #1405 の proof checker は、Latitude / EntireCLI / Claude/Codex/Antigravity の distribution や runtime capture を直接扱うべきではありません。もし fixture に distribution evidence が出てきたら、
external_runtime_evidence_refとしてではなくforbidden_or_out_of_scope_runtime_claimとして fail-closed にしてください。9. digest canonicalization を “なんとなく sha256” にしない
既存 marker helper は
computeChatgptRetroContextPayloadDigestで object key sort 付きの独自 stable stringify を使っています。これは現行 helper 内では一貫していますが、#1245 の Remaining Parent Gaps には digest canonicalization の JCS 相当 fixture 強化が残っています。
#1405 で新 schema / checker を増やすなら、digest profile を固定してください。
negative fixture には、key order permutation、NFC/NFD、CRLF、explicit null vs absent、timestamp offset、marker line を digest input に含めたケースを入れるべきです。
10. #1326 / #1364 を dependency として列挙しているが、#1326 は open
#1405 は #1326 と #1364 を依存・文脈として列挙しています。#1326 は
cloud_pilot_success_contract_v1checker/schema/negative fixture 実装 issue で、確認時点では open です。#1405 は synthetic route proof なので、#1326 未完了でも実装は可能です。ただし parent closure で “Cloud pilot / real runtime capture まで証明済み” と誤読されるのは危険です。#1405 の proof schema に以下を入れてください。
#1405 の成功条件は parent #1153 の一部を埋めますが、Cloud pilot / real runtime capture / adoption decision を埋めません。
実装前に #1405 本文へ追記すべき契約
追加すべき negative fixtures
貼り付け用レビューコメント案
最終評価
#1405 は実装する価値があります。ただし名前と artifact claim が強すぎます。現時点で安全に証明できるのは retro execution proof ではなく、より正確には GitHub-comment-origin retrospective context route proof です。
その前提に合わせて、PR review surface、evidence mode mapping、actual ChatGPT tool-boundary claim、resolver output freshness、retrospective result checker、forbidden field scannerを締めれば、parent #1153 の synthetic route gap をかなり堅く閉じられます。
squne121 commentedon Jul 9, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jul 9, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jul 9, 2026
Contract Review Result
squne121 commentedon Jul 9, 2026
implement-issue: 実装完了 (2026-07-09)
.claude/worktrees/issue-1405-chatgpt-github-retro-e2e-proof-issue-pr-worktree-issue-1405-chatgpt-github-retro-e2e-proof-issue-pr-pnpm typecheck/pnpm lint/pnpm test(1526 tests, 95 files) /pnpm build)fix: Hook Boundary Policy 見出しに日本語併記して Japanese Check を通す (#1405)
fix: #1405 Parent Closure Proof Contract 見出しに日本語併記して Japanese Check を…
fix: chatgpt-retro-e2e-proof fixture の marker 行に日本語コメントを併記して Japanese…
fix: #1405 OWNER review P0 blocker を修正する (P0-2/P0-3/P0-4/P0-5, P1-3)
fix: AC11 の parent closure proof grep VC が小文字マッチしない regression を修正する