Skip to content

実装: #928 導入前に session-recording policy と report公開境界の drift を解消する #934

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#928"
goal_ref: "AI 作業の retrospective 用 report / index を public-safe に永続保存できるようにする"
change_kind: docs_and_validator

Parent Issue

#928

Parent Goal Ref

  • Goal: Issue 起票から PR merge / follow-up Issue 作成までの AI 作業過程を、raw transcript を公開せずに GitHub 上へ永続保存し、人間が agent_run_report/v1 と agent_retro_index/v1 を読ませて改善相談できる状態にする。
  • Desired Destination: manifest 本文禁止と report/index の条件付き public comment 許可を、schema / validator / marker upsert guard と整合する docs 境界として固定し、historical な実行可能 surface が current public posting と誤読されない状態にする。

Current Validated Scope

  • docs/dev/session-recording-policy.md と docs/dev/onboarding/session-recording-tool.md を、agent_session_manifest/v1 と agent_run_report/v1 / agent_retro_index/v1 の public surface を別物として読めるように更新する。
  • 上記 2 文書で、manifest 本文禁止 / opaque ref のみ許可 / trusted context 限定 / hook 非 security boundary / private artifact 再定義 / artifact_url の retention-limited non-canonical 性を current policy として固定する。
  • docs/schemas/agent-session-manifest.md の comment template / phase_instance_id / visibility 説明を current schema と current workflow に合わせ、manifest 本文の live public posting 許可として誤読されないようにする。
  • docs/dev/schema-governance.md に、実装: #928 導入前に session-recording policy と report公開境界の drift を解消する #934 が public-surface boundary cleanup であり、report/index schema の正式登録は 実装: agent_run_report/v1 / agent_retro_index/v1 schema・fixtures・public-safe validator を追加する #935 で扱うことを追記する。
  • scripts/generate-session-manifest.mjs と tests/agent-session-manifest.test.ts を更新し、github-comment surface を current public posting の正規経路として扱わないことを help / example / test 上でも明確化する。
  • .claude/scripts/check_session_recording_policy.py を更新し、新設 public_surfaces.github_issue_or_pr_comment subtree を fail-closed で検証する。

Remaining Parent Gaps

Outcome

session-recording 系 SSOT と実行可能 surface が、「manifest 本文は Issue / PR comment に出さず、opaque ref のみ許可する」「redacted report/index は #935 schema/redaction validator と #937 exact marker upsert guard 通過後に限り conditional public comment 可」「#934 merge 時点では live public posting はまだ禁止」「historical manifest comment surface は current public posting の根拠に使えない」と一貫して読める状態に更新され、対象 VC と checker が通る状態。

In Scope

  • manifest body と run report / retro index の public surface 方針を別物として説明する。
  • Issue / PR comment への manifest 本文出力禁止 と opaque ref のみ許可 を docs / schema prose / checker に固定する。
  • phase_instance_id の CI-native 記述 drift を current repo reality に合わせる。
  • private artifact を secret-safe ではなく retention-limited non-comment surface として再定義する。
  • artifact_url を retention-limited / auth-dependent / non-canonical locator として説明する。
  • report/index posting の trusted context / minimal write permission / hook 非 security boundary を docs に固定する。
  • 古い pilot wording や legacy template を historical context に降格し、current public surface の正本と競合させない。
  • scripts/generate-session-manifest.mjs の github-comment format を historical / legacy fixture surface へ降格するか、current public posting surface ではないことを help / example / output contract 上で明示する。
  • tests/agent-session-manifest.test.ts を current boundary と整合するよう更新する。
  • .claude/scripts/check_session_recording_policy.py に新 policy subtree の exact assertion を追加する。

Out of Scope

Acceptance Criteria

  • AC1: manifest body と run report / retro index の public surface 方針が別物として説明されている。
  • AC2: Issue / PR comment では agent_session_manifest/v1 の body が禁止され、artifact ref / digest / validation verdict などの opaque ref のみ許可されると明記されている。
  • AC3: agent_run_report/v1 / agent_retro_index/v1 は 実装: agent_run_report/v1 / agent_retro_index/v1 schema・fixtures・public-safe validator を追加する #935 schema/redaction validator と 実装: GitHub Issue / PR marker upsert と public-safe posting guard を追加する #937 exact marker upsert guard 通過後のみ conditional public comment 可であり、実装: #928 導入前に session-recording policy と report公開境界の drift を解消する #934 merge 時点では live public posting 禁止と明記されている。
  • AC4: phase_instance_id の記述が issue-<N>:<main_loop_phase>:<seq> と ci:<producer_slug>:<run_id>:<run_attempt> の current schema reality に一致している。
  • AC5: private artifact が secret-safe を意味しない retention-limited non-comment surface であり、public repo では content も public-safe である必要があると再定義されている。
  • AC6: public comment posting は trusted context 限定、pull_request_target 不使用、top-level read-only baseline と posting job 限定の最小 write permission を要求すると明記されている。
  • AC7: hook は diagnostic / prevention layer であり、report/index の public-safe 判定正本は post-run validator + posting guard と明記されている。
  • AC8: legacy comment template や historical pilot wording が historical / non-current / not live public posting として扱われ、current live public posting 許可の根拠にならないと明記されている。
  • AC9: scripts/generate-session-manifest.mjs の github-comment surface が current public posting の正規経路と誤読されない help / example / output になっている。
  • AC10: tests/agent-session-manifest.test.ts が current boundary に一致し、historical comment surface を current public posting 許可として検証しない。
  • AC11: .claude/scripts/check_session_recording_policy.py が public_surfaces.github_issue_or_pr_comment.agent_session_manifest と report/index subtree を exact assertion し、旧 agent_session_manifest_allowed: true 相当の戻りを fail-closed で検知できる。

Verification Commands

# AC1
# baseline-expect: pass
$ rg -n "manifest body|agent_run_report|agent_retro_index|public surface|opaque ref" docs/dev/session-recording-policy.md docs/dev/onboarding/session-recording-tool.md docs/schemas/agent-session-manifest.md

# AC2
# baseline-expect: pass
$ rg -n "body_allowed: false|manifest 本文.*(禁止|出さない)|opaque ref|artifact_digest|validation_verdict" docs/dev/session-recording-policy.md docs/dev/onboarding/session-recording-tool.md docs/schemas/agent-session-manifest.md

# AC3
# baseline-expect: pass
$ rg -n "#935|#936|#937|conditional public comment|live public posting|exact marker upsert guard|dry-run" docs/dev/session-recording-policy.md docs/dev/onboarding/session-recording-tool.md docs/dev/schema-governance.md

# AC4
# baseline-expect: pass
$ rg -n "issue-<N>:<main_loop_phase>:<seq>|ci:<producer_slug>:<run_id>:<run_attempt>|ci:session-manifest:" docs/dev/session-recording-policy.md docs/schemas/agent-session-manifest.md

# AC5
# baseline-expect: pass
$ rg -n "private artifact|retention-limited|non-comment surface|secret-safe|public-safe|non-canonical" docs/dev/session-recording-policy.md docs/dev/onboarding/session-recording-tool.md docs/schemas/agent-session-manifest.md

# AC6
# baseline-expect: pass
$ rg -n "trusted context|pull_request_target|issues: write|pull-requests: write|contents: read" docs/dev/session-recording-policy.md docs/dev/onboarding/session-recording-tool.md

# AC7
# baseline-expect: pass
$ rg -n "security boundary ではない|post-run validator|posting guard|diagnostic|prevention" docs/dev/session-recording-policy.md docs/dev/onboarding/session-recording-tool.md

# AC8
# baseline-expect: pass
$ rg -n "historical|non-current|not live public posting|legacy" docs/dev/onboarding/session-recording-tool.md docs/schemas/agent-session-manifest.md docs/dev/session-recording-policy.md

# AC9
# baseline-expect: pass
$ rg -n "github-comment|historical|legacy|not live public posting" scripts/generate-session-manifest.mjs tests/agent-session-manifest.test.ts

# AC10
# baseline-expect: pass
$ rg -n "github-comment|artifact_digest|opaque ref|historical" tests/agent-session-manifest.test.ts

# AC11
# baseline-expect: pass
$ python3 .claude/scripts/check_session_recording_policy.py docs/dev/session-recording-policy.md

Allowed Paths

  • docs/dev/session-recording-policy.md
  • docs/dev/onboarding/session-recording-tool.md
  • docs/schemas/agent-session-manifest.md
  • docs/dev/schema-governance.md
  • scripts/generate-session-manifest.mjs
  • tests/agent-session-manifest.test.ts
  • .claude/scripts/check_session_recording_policy.py

Runtime Verification Applicability

decision: not_applicable
reason: "docs / script help / checker / schema prose 更新であり、browser runtime や external service 実行を成功条件に含まない"

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • report/index schema 本体や posting guard 実装まで同一 PR に押し込む必要があると判明した場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • current boundary の claim を docs / checker / executable surface の 3 層で同時に揃えられないと判明した場合

Required Skills

なし

Scope Delta(任意)

Delivery Rule

Activity

  1. added
    process
    area/ai-ops
    enhancement
    on Jun 15, 2026
  2. changed the title [-]docs: #928 導入前に session-recording policy と report公開境界の drift を解消する[/-] [+]実装: #928 導入前に session-recording policy と report公開境界の drift を解消する[/+] on Jun 15, 2026
  3. added
    phase/implementation
    agent/implementer
    on Jun 15, 2026
  4. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    判定

    **REQUEST_CHANGES(Issue 契約の締め直し推奨)**です。

    #934 の方向性は正しいです。#928 の導入順序どおり、agent_run_report/v1 / agent_retro_index/v1 の schema・validator・posting guard を入れる前に、既存 session-recording docs の公開境界 drift を潰す child issue として妥当です。#934 自体にコメントはありません。

    ただし、このまま実装に渡すと docs 上は AC PASS なのに、読者や後続実装者が “manifest 本文を GitHub comment に出してよい” と再解釈する false green が起きます。現行 docs は実際に agent_session_manifest_allowed: true と書いており、schema docs には Issue/PR コメント用の manifest 本文テンプレートまで残っています。これは #934 の Outcome である「manifest 本文は Issue / PR comment に出さず、validator + marker guard 通過済みの redacted report/index だけを条件付き許可する」と正面衝突します。


    参照した関連 Issue / PR / コメント

    #928 は親 delivery-rollup で、agent_session_manifest/v1 を provenance / validation / evidence index として残しつつ、ChatGPT 改善検討用に agent_run_report/v1 / agent_retro_index/v1 を追加する設計です。重要な固定決定は「manifest 本文は comment に出さない」「public 永続正本は Issue / PR comment の marker upsert」「artifacts は補助面」「raw transcript / local path / secret は public surface に出さない」です。

    #935〜#941 は依存列としてよく分割されています。#935 が schema / validator、#936 が lifecycle scripts、#937 が marker upsert / posting guard、#938 が retro index workflow、#939 が ChatGPT context export、#940 が docs / skill handoff、#941 が EntireCLI safety checker です。#934 はこの列の先頭にあり、後続 child が実装すべき安全境界を docs 上で曖昧にしてはいけません。

    PR #314 は agent_session_manifest/v1 の JSON Schema Draft 2020-12 SSOT、fixtures、tests を導入し、public GitHub comment で transcript / local_file evidence を禁止する制約を入れた先行 PR です。PR #426 は hook wrapper と session-manifest.yml を導入し、manifest JSON を stdout / workflow log / Issue comment / PR comment / git commit に出さず artifact に置く方針を実装した先行 PR です。

    #136 と #246 も重要です。#136 の元課題は、AI が AC を読んだか、test-runner を呼んだか、SKIP/fallback を見逃したか、token/context 圧迫が起きたかを後から検証できないことでした。#246 は session recording pilot の smoke test で、AI self-report による false green を防ぐため authoritative producer / negative control / Kill Switch / secret scan を要求しています。


    Blocker 1: manifest body public comment 境界がまだ自己矛盾している

    #934 は「manifest body」と「run report / retro index」の public surface 方針を別物として説明する Issue です。しかし現行 session-recording-policy.md は github_issue_comment.agent_session_manifest_allowed: true とし、公開コメントには session metadata summary を置く、と読める状態です。

    さらに docs/schemas/agent-session-manifest.md には “Issue/PR コメントに agent_session_manifest を記録する際は…” という manifest 本文テンプレートが残っています。これは過去の schema docs としては理解できますが、#928 / #934 導入後の運用 docs としては危険です。後続の AI 実装者はこのテンプレートを根拠に、manifest 本文を再び public comment に貼る可能性があります。

    修正要求: #934 の実装では、単に「report/index は条件付き可」と追記するだけでは不足です。既存の agent_session_manifest_allowed: true と “GitHub Comment テンプレート” を、少なくとも以下の意味に置換してください。

    public_surfaces:
      github_issue_or_pr_comment:
        agent_session_manifest:
          body_allowed: false
          opaque_ref_allowed: true
          allowed_refs:
            - artifact_id
            - artifact_url
            - artifact_digest
            - schema_ref
            - validation_verdict
          rationale: >
            manifest body は Issue / PR comment に出さない。
            public comment では digest / artifact ref / validation verdict などの opaque ref のみ許可する。
        agent_run_report:
          body_allowed: conditional
          conditions:
            - agent_run_report_schema_valid
            - redaction_validator_clean
            - exact_marker_upsert_guard_passed
            - duplicate_marker_absent
            - max_body_bytes_passed
          forbidden_content:
            - raw_transcript
            - transcript_excerpt
            - local_absolute_path
            - secret_value
            - full_command_output
            - full_prompt
        agent_retro_index:
          body_allowed: conditional
          conditions:
            - agent_retro_index_schema_valid
            - redaction_validator_clean
            - exact_marker_upsert_guard_passed
            - duplicate_marker_absent
            - max_body_bytes_passed

    Blocker 2: phase_instance_id の docs drift は実害がある

    #934 の AC4 は妥当です。現行 schema の実体は issue-<N>:<phase>:<seq> と ci:<producer_slug>:<run_id>:<run_attempt> の 2 形式を受け付けています。producer_slug は workflow name ではなく schema-safe な固定 slug、例 session-manifest です。

    一方、session-recording-policy.md には「CI では issue-432:impl:<seq> を生成し、raw ci:<workflow>:<run_id>:<run_attempt> は current schema / validator では受け付けない」と残っています。これは現在の schema / workflow と逆です。

    実際の workflow は ci:session-manifest:${{ github.run_id }}:${{ github.run_attempt }} を使って artifact を生成しています。

    修正要求: docs の記述を以下に寄せるべきです。

    phase_instance_id は current schema で 2 形式を受け付ける。
    
    1. issue-<N>:<main_loop_phase>:<seq>
       - local / issue-bound / AI-driven run 用
       - 例: issue-934:impl:001
    
    2. ci:<producer_slug>:<run_id>:<run_attempt>
       - GitHub Actions CI run 用
       - producer_slug は workflow name ではなく schema-safe fixed slug
       - 例: ci:session-manifest:123456789:1
    

    Blocker 3: “private artifact” という語が secret-safe に見える

    #934 の AC5 は重要です。現行 policy にはすでに、「private artifact channel」とは Issue / PR comment ではない retention-limited GitHub Actions artifact であり、public repo では REST API 経由で公開アクセス可能、content は public-safe contract を満たす必要がある、と明記されています。

    GitHub Actions artifacts はデフォルトで 90 日保持され、public repository では保持期間を 1〜90 日の範囲で設定できます。actions/upload-artifact は artifact-id / artifact-url / artifact-digest を出力できますが、hidden files を含める場合は sensitive information を upload しないよう検証する必要がある、と公式 README も注意しています。([GitHub Docs]1) ([GitHub]2)

    修正要求: #934 では private artifact を次のように再定義してください。

    private_artifact は legacy visibility enum 名であり、secret-safe を意味しない。
    本 repo では「Issue / PR comment ではない non-comment surface」
    かつ「retention-limited artifact/ref surface」を意味する。
    public repository 上では artifact content も public-safe とみなし、
    raw transcript / local path / secret / full command output を含めてはならない。
    

    可能なら docs prose では private artifact 単独表現を避け、non-comment retention-limited artifact を併記してください。


    Blocker 4: #934 は docs-only なので “安全実装済み” と読ませてはいけない

    #934 の Allowed Paths は docs と schema prose に限定されています。schema 本体、validator、posting guard は #935 / #937 です。したがって #934 が merge された時点で agent_run_report/v1 / agent_retro_index/v1 を public comment に live post してよい、という意味になってはいけません。

    現行 manifest validator の pattern scan は /home/, /Users/, /tmp/, .env, sk-, gh[pousr]_, private key, expanded env assignment などに限定されています。#935 が要求している github_pat_, AKIA, Windows path, file://, .env.local, .claude/settings.local.json, VITE_SECRET_KEY, duplicate marker, fence breakout などは、まだ report/index 用 validator の責務です。

    修正要求: #934 の docs に次を明記してください。

    #935 schema / redaction validator と #937 marker upsert guard が merge されるまで、
    agent_run_report/v1 / agent_retro_index/v1 の live public posting は禁止する。
    #934 merge 時点で許可されるのは docs boundary の確定と dry-run 設計のみ。
    

    Blocker 5: marker upsert は gh ... --edit-last では成立しない

    GitHub CLI の gh pr comment --edit-last は “current user の最後のコメント” を編集する機能であり、marker-addressed upsert ではありません。GitHub REST の issue comments endpoint は Issue と Pull Request の comment を扱えます。GitHub Docs も “every pull request is an issue” と説明しています。([GitHub CLI]3) ([GitHub Docs]4)

    #937 は正しく、list → exact marker search → 0 件 create / 1 件 update / 2 件以上 fail closed を要求しています。#934 側の docs でも、後続の public comment 許可条件に “exact marker upsert guard” を入れるだけでなく、--edit-last や曖昧 grep による更新を非正規経路として明示的に退けるべきです。

    推奨 marker は #937 の形式を維持しつつ、body 内 user-provided markdown に混入した marker を信頼しない ownership check を必須にすることです。

    <!-- agent_run_report:v1 repo=squne121/loop-protocol issue=<N> pr=<N|null> run_id=<id> sha256=<digest> -->

    Blocker 6: workflow write 権限の境界を docs にも固定する必要がある

    GitHub Actions の permissions は top-level / job-level で指定でき、pull_request_target では public fork 由来でも GITHUB_TOKEN が read/write repository permission を持ち得ます。したがって report/index posting workflow は untrusted PR context で write 権限を持たせてはいけません。([GitHub Docs]5)

    現行 session-manifest.yml は permissions: contents: read で artifact 生成のみを行い、manifest を stdout / log に出さず、artifact に upload しています。この既存設計は #938 の “trusted workflow_dispatch / post-merge context only, no pull_request_target, job-level minimal write permission” と整合させるべきです。

    修正要求: #934 の docs boundary に次の一文を入れるべきです。

    public comment posting は trusted context のみで行う。
    pull_request_target では実行しない。
    top-level read-only baseline を維持し、write は posting job に限って
    issues: write / pull-requests: write の最小権限で付与する。
    

    Blocker 7: EntireCLI は “採用” ではなく “unsafe config 検出対象” として扱うべき

    EntireCLI は prompts / transcripts / tool calls / file changes / metadata を capture し、checkpoint data を通常の git workflow に紐付けます。公式 docs では checkpoint metadata が entire/checkpoints/v1 branch に保存され、デフォルトでは code remote に push されるが checkpoint remote で別 repo に出せる、と説明されています。([Entire]6)

    Entire の security docs はさらに強く、public repo なら transcript branch も public になり、redaction は best-effort であり、shadow branch の code-file snapshot は raw blob なので hardcoded secret があれば unredacted で残り得る、と説明しています。([Entire]7)

    既存 onboarding も Hook-based metadata ledger を Adopt、EntireCLI local/private/no-push 構成を Conditional、public checkpoint 構成を Reject としています。

    修正要求: #934 では EntireCLI を report/index 永続化の中核にしないでください。#941 のとおり、not_applicable | safe | blocked の safety checker として扱い、unknown visibility / token env / pushurl rewrite / checkpoint branch が見えたら fail closed する、という位置づけが妥当です。


    Blocker 8: Claude / Codex hook は security boundary ではない

    現行 policy はすでに、Codex の PreToolUse / PermissionRequest は予防層であり security boundary ではなく、canonical final gate は post-run verifier と private artifact validation だと明記しています。

    Claude Code の SubagentStop hook input は transcript_path, agent_transcript_path, last_assistant_message を含みます。これは便利ですが、同時に transcript path や last assistant message を不用意に report generator が取り込む入口にもなります。([Claude Code]8)

    Codex hooks については、OpenAI developer docs が “同一 event の複数 matching command hooks は concurrently launched” と説明しています。順序や short-circuit に依存する設計は避けるべきです。([OpenAI 開発者]9)

    修正要求: #934 の docs にも、hook は diagnostic/prevention であり、report/index の public-safe 判定は post-run validator + posting guard が正本、という線を入れてください。これは #940 だけに後回しにすると、#935〜#938 の実装時に hook を security boundary と誤読する余地が残ります。


    Blocker 9: #246 の古い “manifest を comment に記録” 文言が将来の衝突源になる

    #246 には、各 phase で agent_session_manifest/v1 を GitHub Issue / PR comment に記録する、という古い pilot 文脈の記述が残っています。一方、#928 / #934 は manifest 本文を comment に出さず、redacted report/index を条件付き public comment にする方針です。

    これは #934 のスコープで #246 を編集しろ、という意味ではありません。しかし #934 docs には「#246 の pilot wording は historical context であり、#928 導入後の current public surface は manifest ref + report/index」と明記しないと、レビュー時に #246 が manifest comment 許可の根拠として再利用されます。


    高品質化した #934 実装方針

    #934 は docs-only なので、実装内容は次の 4 点に絞るのがよいです。

    1. docs/dev/session-recording-policy.md の public_surfaces を、manifest / report / index の 3 面に分ける。manifest は body 禁止、opaque ref のみ許可。report/index は 実装: agent_run_report/v1 / agent_retro_index/v1 schema・fixtures・public-safe validator を追加する #935 + 実装: GitHub Issue / PR marker upsert と public-safe posting guard を追加する #937 通過後のみ conditional allowed。

    2. docs/dev/onboarding/session-recording-tool.md から “manifest を public comment に記録する” と読める文を削るか、historical / non-current / not live public posting と注釈する。既存の raw transcript / local_file / secret 禁止は維持する。

    3. docs/schemas/agent-session-manifest.md の GitHub Comment template を “legacy schema example; live Issue/PR comment に貼らない” に降格するか、manifest body public posting 禁止セクションに置換する。現行 schema の evidence.visibility: public_github_comment 制約は、manifest 本文公開許可ではなく “evidence entry の visibility 制約” として説明し直す。

    4. docs/dev/schema-governance.md には full schema 登録ではなく、実装: agent_run_report/v1 / agent_retro_index/v1 schema・fixtures・public-safe validator を追加する #935 で agent_run_report/v1 / agent_retro_index/v1 を正式登録する予定であることと、実装: #928 導入前に session-recording policy と report公開境界の drift を解消する #934 は public-surface boundary cleanup であることを追記する。schema consumer inventory のルール上、consumer-facing contract を変える PR では consumer 列挙と未対応 blocker の扱いが必要です。


    Acceptance Criteria の強化案

    現行 AC は方向性として妥当ですが、rg で positive match だけを見ると false green になります。negative check を追加してください。

    # manifest body public comment 禁止が明示されている
    rtk rg -n "manifest body.*(MUST NOT|禁止)|agent_session_manifest.*body_allowed: false|opaque ref" \
      docs/dev/session-recording-policy.md \
      docs/dev/onboarding/session-recording-tool.md \
      docs/schemas/agent-session-manifest.md
    
    # 古い「manifest を Issue/PR comment に記録」導線が live 手順として残っていない
    ! rtk rg -n "agent_session_manifest_allowed: true|Issue/PR コメントに agent_session_manifest を記録する際" \
      docs/dev/session-recording-policy.md \
      docs/dev/onboarding/session-recording-tool.md \
      docs/schemas/agent-session-manifest.md
    
    # report/index は #935 + #937 通過後のみ conditional public comment 可
    rtk rg -n "agent_run_report|agent_retro_index|schema.*validator|marker upsert guard|conditional" \
      docs/dev/session-recording-policy.md \
      docs/dev/onboarding/session-recording-tool.md
    
    # phase_instance_id の current schema reality
    rtk rg -n "issue-<N>:<main_loop_phase>:<seq>|ci:<producer_slug>:<run_id>:<run_attempt>|session-manifest" \
      docs/dev/session-recording-policy.md \
      docs/schemas/agent-session-manifest.md
    
    # private artifact が secret-safe ではないこと
    rtk rg -n "private_artifact.*secret-safe.*(not|ない)|retention-limited|non-comment|public-safe content" \
      docs/dev/session-recording-policy.md \
      docs/dev/onboarding/session-recording-tool.md

    推奨 verdict

    ADVERSARIAL_REVIEW:
      target: "#934"
      verdict: REQUEST_CHANGES
      main_risk: public_surface_drift
      blockers:
        - manifest_body_comment_boundary_not_self_consistent
        - phase_instance_id_docs_contradict_current_schema_and_workflow
        - private_artifact_term_can_be_misread_as_secret_safe
        - docs_only_issue_can_false_green_without_explicit_935_937_dependency
        - legacy_246_manifest_comment_wording_can_be_reused_as_permission
      required_fix:
        - replace_manifest_allowed_true_with_body_forbidden_and_opaque_ref_allowed
        - mark_report_index_public_comment_as_conditional_after_schema_validator_and_marker_guard
        - update_phase_instance_id_to_issue_and_ci_forms
        - redefine_private_artifact_as_non_comment_retention_limited_not_secret_safe
        - add_negative_rg_verification

    結論として、#934 は必要です。ただし「少し追記する docs cleanup」ではなく、過去の manifest public comment 設計を明示的に廃止し、report/index の conditional public surface に置き換える境界変更 Issue として扱うべきです。これを曖昧にしたまま #935〜#938 に進むと、validator や marker guard が正しくても、docs を根拠にした public leak 経路が残ります。

  5. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop により #934 本文を更新しました。

    • anchor comment の primary blocker に合わせて、manifest 本文禁止 / opaque ref のみ許可 / report/index の conditional public comment を Outcome・Scope・AC に反映
    • phase_instance_id の current schema reality、private artifact の再定義、trusted context / minimal write permission、hook 非 security boundary を明示
    • 依存列に 実装: agent run lifecycle scripts と package scripts を追加する #936 を追加し、legacy template / historical wording は current live public posting 許可の根拠にしない形へ修正
    • Verification Commands は reviewer blocker に合わせて pnpm lint と rg allowlist に収め、AC/VC alignment を再調整
  6. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  7. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-15T20:54:01Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/934
      body_sha256: "sha256:fc5b5c222c9ae722ff0d967e6363bbfbbf33ab7415304bec8972fed155934710"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  8. added 3 commits that reference this issue on Jun 15, 2026
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/implementerarea/ai-opsenhancementphase/implementationprocess

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions