Skip to content

実装: agent_run_report/v1 / agent_retro_index/v1 schema・fixtures・public-safe validator を追加する #935

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#928"
goal_ref: "public-safe な agent_run_report / agent_retro_index schema と validator を固定する"
change_kind: mixed

Parent Issue

#928

Parent Goal Ref

  • Goal: raw transcript を公開せずに AI 作業を review できる agent_run_report/v1 / agent_retro_index/v1 を GitHub 上へ永続保存できる状態にする。
  • Desired Destination: report / index の public-safe schema、invalid fixture、validator、check command を追加し、posting より前に漏洩禁止境界を決定論的に固定する。

Current Validated Scope

  • docs/schemas/agent-run-report.schema.json と docs/schemas/agent-retro-index.schema.json を JSON Schema Draft 2020-12 で追加する。
  • valid / invalid fixtures、schema compile test、semantic validation test、public-safe scanner test を追加する。
  • package / test surfaces から public-safe check を再実行できるようにする。
  • public comment に出せるのは redacted summary と opaque refs のみであり、raw transcript / local path / secret / full command output / inline report copy は fail-closed にする。

Remaining Parent Gaps

Outcome

agent_run_report/v1 / agent_retro_index/v1 schema、negative fixture、validator、対応 test が 1 PR で追加され、public-safe report / retro index が allowlist 型・semantic validation・path-aware scanner・markdown candidate safety を備えた fail-closed contract として機械検証できる状態。

In Scope

  • report / index schema の定義。
  • valid / invalid fixtures の追加。
  • redaction / secret / path / marker / fence breakout を含む validator の追加。
  • authority / token usage / opaque ref / retro index 集約境界の semantic validation。
  • markdown candidate preflight validation の追加。
  • pnpm agent-run-report:check の target 0 件 fail-closed 挙動の固定。

Out of Scope

  • run lifecycle scripts。
  • GitHub comment upsert / exact marker addressing 実装。
  • workflow write permission を使う処理。
  • public posting を実行する workflow 本体の追加。

Public Surface Contract

  • agent_run_report/v1 は public surface を allowlist 型で閉じ、redacted summary と opaque refs だけを公開面に出せる。
  • public_surface_kind は github_issue_comment | github_pr_comment | none のいずれかに閉じる。
  • public surface では public_safety.redaction_status: clean を必須とし、checked_by, validator_version, checked_at, verdict, blocked_reasons[] のような検証結果メタデータを保持できる。
  • manifest_refs[] / evidence_refs[] は digest / artifact id / workflow run URL / schema ref / validation verdict のような opaque ref のみを許可し、manifest body や local path を保持しない。
  • commands_summary[] や同等の summary surface は label / verdict / exit code / artifact ref / redacted summary に限定し、stdout / stderr 本文や transcript 再構成につながる payload を持たない。

Validation Semantics

  • validator は schema compile、semantic validation、path-aware scanner、markdown candidate validation、check command validation を責務分離して fail-closed に実行する。
  • forbidden field の列挙だけでなく、summary / notes / details / evidence text への再包装も検知対象に含める。
  • path / token / marker / fence の検査は object key と string value を別々に走査し、structured error code で返す。
  • string value は path separator や URL decode を含む正規化後の値でも検査する。

Retro Index Safety

  • agent_retro_index/v1 は report 本文や transcript 断片の inline copy を禁止する。
  • index は report_comment_url, report_digest, issue, pr, merge_sha, tags, friction_summary, quality_signals, follow_up_issues, orphan_reports, ambiguous_links, generation_verdict のような集約用 field に閉じる。
  • retro index 側で public-safe boundary を弱めないことを schema と validator の両方で確認する。

Markdown Candidate Validation

Acceptance Criteria

  • AC1: 両 schema は JSON Schema Draft 2020-12、$defs ベースで定義され、Ajv 2020-12 strict compile で warning なく compile できる。
  • AC2: root と nested object は public-safe contract 上で additionalProperties: false または同等の fail-closed object 制約を持ち、allowlist されていない field を reject できる。
  • AC3: agent_run_report/v1 は public_surface_kind、public_safety、authority、manifest_refs、evidence_refs を必須とし、public surface では public_safety.redaction_status: clean を要求する。
  • AC4: raw_transcript, transcript_excerpt, local_path, absolute_path, secret_value, full_command_output, full_prompt, artifact_path, transcript_path, raw_manifest_json が public report / retro index で invalid になる。
  • AC5: authority は structured object として検証され、actor.type: ai_agent の report は authority.level: non_authoritative に固定され、derived 以上は deterministic evidence ref を要求する。
  • AC6: token_usage.availability: unavailable の場合、対応する数値 field は null であり 0 偽装が invalid になる。
  • AC7: validator は object key と string value を path-aware に走査し、禁止 key / local path / token / private key / markdown marker / fence breakout を structured error code で返す。
  • AC8: invalid fixtures には /home/, /Users/, C:\\, file://, .env.local, .claude/settings.local.json, ghp_, github_pat_, sk-, AKIA, private key, VITE_SECRET_KEY, duplicate marker, marker injection, fence breakout, 40-hex token-like を含む。
  • AC9: scanner は既存 agent_session_manifest / session-manifest workflow の public boundary より弱くならず、public evidence で transcript / local file / local path を再包装できない。
  • AC10: manifest_refs[] と evidence_refs[] は digest / artifact id / workflow run URL / schema ref / validation verdict のような opaque ref のみを許可し、manifest body や local path を保持しない。
  • AC11: agent_retro_index/v1 は report 本文の inline copy を禁止し、report_comment_url, report_digest, issue, pr, merge_sha, tags, friction_summary, quality_signals, follow_up_issues, orphan_reports, ambiguous_links, generation_verdict のような集約用 field に閉じる。
  • AC12: markdown candidate validation は duplicate marker、marker injection、fence breakout、JSON extraction round-trip failure を invalid として検知し、posting 前 preflight として再利用できる。
  • AC13: public comment posting 用 mode に --allow-local-path, --unsafe, --force, --no-secret-scan, --redaction-override のような escape hatch が存在しない。
  • AC14: pnpm agent-run-report:check は explicit target 0 件を fail し、default target 0 件 only では silent green を出さず、CI=true または --require-target では default target 0 件も fail-closed にできる。
  • AC15: schema compile test、semantic validation test、scanner test、markdown candidate test、check command test が分離され、どの public-safety gate が壊れたかを判別できる。

Verification Commands

# AC1
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-schema*.test.ts

# AC2
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-schema*.test.ts

# AC3
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-public-surface*.test.ts

# AC4
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-invalid-fields*.test.ts

# AC5
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-authority*.test.ts

# AC6
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-token-usage*.test.ts

# AC7
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-public-safety-scan*.test.ts

# AC8
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-invalid-fixtures*.test.ts

# AC9
# preflight-scope: pr_review_only
$ rg -n "public_github_comment|transcript|local_file|artifact_url|local path" docs/schemas scripts/lib .github/workflows

# AC10
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-manifest-refs*.test.ts

# AC11
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-retro-index*.test.ts

# AC12
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-markdown*.test.ts

# AC13
# preflight-scope: pr_review_only
$ rg -n -- "--allow-local-path|--unsafe|--force|--no-secret-scan|--redaction-override" scripts/lib/agent-run-report-validation.mjs scripts/check-agent-run-reports.mjs

# AC14
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report-check-command*.test.ts

# AC15
# preflight-scope: pr_review_only
$ pnpm test -- --run tests/agent-run-report*.test.ts

Allowed Paths

  • docs/schemas/
  • scripts/lib/
  • scripts/check-agent-run-reports.mjs
  • package.json
  • tests/
  • .github/workflows/

Runtime Verification Applicability

decision: not_applicable
reason: "schema / validator / test 追加であり、browser runtime の動作証跡を成功条件に含まない"

Stop Conditions

Required Skills

  • TypeScript / JSON Schema

Scope Delta(任意)

  • owner comment を反映し、public-safe contract を forbidden field 列挙から allowlist + semantic validation + scanner + markdown preflight へ強化した。

Delivery Rule

Activity

  1. added
    workflow
    area/ai-ops
    enhancement
    phase/implementation
    agent/implementer
    on Jun 15, 2026
  2. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES 相当。 #935 は順序としては正しいです。posting / workflow write を後続 #937 / #938 に分離し、まず schema・fixtures・validator を固定する構成は妥当です。ただし、現在の Issue 契約のままだと 「public-safe と称する JSON が、実質的な transcript / local path / secret / command output の再包装になる」 余地が残ります。

    #935 自体のコメントは 0 件でした。したがって、レビュー根拠は #935 本文、親 #928、そのコメント、既存 agent_session_manifest/v1 実装、関連 child issue 群、および GitHub / JSON Schema / Actions artifact / Claude hooks / EntireCLI の外部仕様です。

    関連 Issue / PR / コメントから見た前提

    #935 は #928 の child で、agent_run_report/v1 / agent_retro_index/v1 の public-safe schema・invalid fixture・validator・check command を posting より前に固定する Issue です。AC には Draft 2020-12、additionalProperties: false、禁止 field/value、AI self-report authority、token unavailable の null 強制、local path / token / private key / marker / fence breakout fixture、escape hatch 禁止、0 target fail-closed が並んでいます。

    親 #928 の設計は、agent_session_manifest/v1 を provenance / validation / evidence index として残し、ChatGPT 改善検討用に redacted な agent_run_report/v1 / agent_retro_index/v1 を追加するものです。親コメントでは、#246、#136、PR #314、PR #426 が関連文脈として参照され、特に PR #426 の「manifest を artifact には書くが stdout / workflow log / Issue / PR comment / git commit には出さない」方針が #928 の public boundary に直結すると整理されています。

    #934 は、すでに docs 側で「manifest body は Issue / PR comment に出さず opaque ref のみ許可」「report / retro index は #935 validator と #937 exact marker upsert guard 通過後のみ conditional public comment 可」「#934 merge 時点では live public posting 禁止」と明文化する役割です。#935 はその docs boundary を機械検証へ落とす責務を持ちます。

    後続 #936 は lifecycle scripts、#937 は GitHub Issue / PR marker upsert と posting guard、#938 は retro index builder / workflow、#939 は ChatGPT context export、#940 は docs / skill handoff、#941 は EntireCLI safety checker です。#935 はこれらの前段 gate なので、ここが弱いと後続すべてが false green になります。

    Blocker 1: “public-safe report” の正体が schema 上で閉じていない

    #935 は raw_transcript, transcript_excerpt, local_path, absolute_path, secret_value, full_command_output, full_prompt を invalid にするとしています。これは必要ですが不十分です。禁止キーを列挙しても、同等内容を summary, notes, details, evidence_text, command_result, prompt_digest_commentary などに詰め替えれば通ってしまいます。

    既存 manifest schema は metadata-first / evidence-ref 中心で、evidence.visibility: public_github_comment のとき source_kind: transcript | local_file を JSON Schema 条件で禁止しています。 #935 の report schema も同等以上に、本文ではなく redacted summary と opaque refs だけを許可する allowlist 型にするべきです。

    修正案:

    • root に public_surface_kind: "github_issue_comment" | "github_pr_comment" | "none" を置く。
    • public surface の場合、public_safety.redaction_status: "clean" を const にする。
    • manifest_refs[] は artifact_id, artifact_digest, workflow_run_url, schema_ref, validation_verdict のような opaque ref のみ許可し、artifact_path, local_path, transcript_path, raw_manifest_json を禁止する。
    • commands_summary[] は command_label, exit_code, verdict, summary, artifact_ref までに限定し、stdout/stderr 本文を入れる field を schema に存在させない。
    • docs_read_refs[] は URL / issue ref / PR ref / doc path summary に限定し、長文引用を禁止する。
    • string field には最大長を設定し、summary field の肥大化による transcript 再構成を防ぐ。

    Blocker 2: 既存 validator より弱い scanner になるリスクがある

    既存 agent-session-manifest-validation.mjs の scanner は /home/, /Users/, /tmp/, .env, sk-, gh[pousr]_, private key, 一部 env assignment を検出します。 しかし #935 の AC5 は github_pat_, AKIA, Windows path, file://, .claude/settings.local.json, VITE_SECRET_KEY, duplicate marker, fence breakout まで要求しています。これは既存 scanner の単純流用では満たせません。

    さらに、既存 workflow の belt-and-suspenders check は Windows path / file:// / github_pat_ / 40-hex token-like / transcript-local marker をすでに見ています。 #935 の validator がこの workflow より弱いなら、public comment 用 validator として退化です。

    修正案:

    • JSON.stringify(obj) への単純 grep ではなく、path-aware traversal で key と string value を別々に検査する。
    • error は { path, code, matched_class, message } で返す。例: forbidden_key.raw_transcript, secret.github_pat, path.windows_absolute, markdown.fence_breakout。
    • key scanner と value scanner を分離する。raw_transcript は key としても値としても invalid。
    • string value は normalized form も検査する。最低限、backslash 正規化、URL decode 1 回、Unicode quote/backtick の正規化を行う。
    • token-like pattern は false positive を恐れて緩めない。public posting 前 gate なので疑わしきは fail closed。
    • VITE_ は client-exposed prefix なので、VITE_.*(SECRET|TOKEN|KEY|PASSWORD|PRIVATE) を invalid fixture に固定する。

    Blocker 3: authority の enum だけでは AI self-report を抑止できない

    #935 AC3 は authority を authoritative | derived | non_authoritative にし、AI self-report は non_authoritative 以外にできない、としています。これは schema enum ではなく actor / producer / evidence linkage の semantic ruleです。

    既存 manifest docs でも producer.kind は self-claim であり、真正性は evidence linkage と hook / CI wiring で担保するとされています。 つまり report 側でも、actor.type: ai_agent なのに authority: authoritative を schema 上の enum だけで防げなければ、AI が自分の作業を authoritative に格上げできます。

    修正案:

    {
      "authority": {
        "level": "non_authoritative",
        "basis": "ai_self_report",
        "evidence_refs": []
      }
    }

    semantic rule:

    • actor.type === "ai_agent" の report は authority.level === "non_authoritative" 固定。
    • authority.level === "derived" は、validated manifest digest、CI check URL、GitHub comment URL などの deterministic evidence ref を最低 1 つ要求。
    • authority.level === "authoritative" は 実装: agent_run_report/v1 / agent_retro_index/v1 schema・fixtures・public-safe validator を追加する #935 では原則不要。将来使うなら github_action / human attestation / signed artifact などの別 Issue に分離すべきです。
    • authority.basis は free text ではなく enum にする。例: ai_self_report, validated_manifest_ref, github_action_check, human_attestation.

    Blocker 4: Draft 2020-12 採用の実装条件が弱い

    #935 AC1 は Draft 2020-12 と $defs を要求しています。既存 validator は Ajv 2020-12 entrypoint を使って schema compile しています。 ここは踏襲すべきです。Ajv は Draft 2020-12 を扱う際に ajv/dist/2020 の Ajv2020 class を使う必要があり、Draft 2020-12 は以前の draft と互換ではありません。(Ajv)

    また Draft 2020-12 では tuple / array keywords が変更され、prefixItems などが導入されています。([JSON Schema]2) #935 の schema が $defs + allOf / oneOf を多用する場合、additionalProperties: false だけでは意図しない抜けや compile surprise が起きやすいです。

    修正案:

    • Ajv2020({ strict: true, allErrors: true }) を必須にする。
    • ajv-formats を有効化する。
    • root / nested object すべてに additionalProperties: false を置く。
    • composition を使う箇所では、unevaluatedProperties: false の併用または composition 回避を検討する。
    • schema compile test を fixture validation test とは分ける。compile が warning 付きで通る状態を許さない。

    Blocker 5: marker / fence breakout は #937 任せにできない

    #935 は posting を out of scope にしていますが、AC5 には duplicate marker / fence breakout が入っています。これは矛盾ではありません。#935 の責務は posting 実装ではなく、posting される body 候補が marker / fence 的に安全かを preflight で落とすことです。

    既存 manifest extractor は start/end marker を各 1 個に限定し、fence length の一致を要求しています。 #935 の report validator も同等の line-based parser / renderer test を持つべきです。

    修正案:

    • renderPublicReportMarkdown(report) を 実装: agent_run_report/v1 / agent_retro_index/v1 schema・fixtures・public-safe validator を追加する #935 で持たない場合でも、validatePublicMarkdownCandidate(markdown) は持つ。
    • marker は exact match だけを許可し、ユーザー提供 summary 内の <!-- agent_run_report:v1 を invalid。
    • code fence は 4 backticks 以上、かつ content 内の最大 backtick run + 1 にする。
    • JSON を markdown に包む場合、extractor round-trip test を必須にする。
    • duplicate marker は JSON fixture だけでなく markdown fixture でも落とす。

    GitHub CLI の gh issue comment --edit-last は「現在ユーザーの最後のコメント」を編集する機能であり、marker-addressed upsert ではありません。(GitHub CLI) 後続 #937 は REST API で comments list → exact marker match → create/update/fail closed に寄せるべきで、GitHub REST の issue comments endpoint は PR も issue として扱い、書き込みには Issues write または Pull requests write 権限が必要です。([GitHub Docs]4)

    High: agent_retro_index/v1 が二次漏洩面になる

    #935 は report schema と retro index schema を同じ Issue に含めています。ここは危険です。report が clean でも、retro index が複数 report の summary を集約する過程で、local path / command output / prompt detail を再構成する可能性があります。

    #938 は retro index builder / workflow で、ambiguous / orphan / partial を表現し、workflow は trusted post-merge / workflow_dispatch のみ、pull_request_target は使わず、最小権限にする契約です。 #935 の retro schema は #938 の実装を待たず、漏洩しない index の形を固定する必要があります。

    修正案:

    • agent_retro_index/v1.entries[] は report_comment_url, report_digest, issue, pr, merge_sha, tags, friction_summary, quality_signals, follow_up_issues 程度に制限する。
    • report 本文の inline copy を禁止する。
    • orphan_reports[] / ambiguous_links[] を first-class にし、曖昧な link を pass 扱いにしない。
    • generation_verdict: "complete" | "partial" | "blocked" を持たせる。
    • source_comment_refs[] は URL + digest + marker_kind だけにする。

    High: artifact を canonical evidence として扱うと drift する

    repo docs はすでに artifact_url を retention-limited / auth-dependent / non-canonical locator として扱い、永続 identity は digest / schema / marker に寄せるべきとしています。 GitHub Actions artifact は retention-days を設定できますが、repository / organization / enterprise の上限を超えられません。また artifact upload / download は digest を扱えるため、public report には artifact URL より digest を中心に置くべきです。([GitHub Docs]5)

    修正案:

    {
      "manifest_refs": [
        {
          "kind": "github_actions_artifact",
          "artifact_id": "123456",
          "artifact_digest": "sha256:...",
          "workflow_run_url": "https://github.com/...",
          "retention_days": 7,
          "expires_at": "2026-06-22T00:00:00Z",
          "validation_verdict": "pass"
        }
      ]
    }

    artifact_url は optional locator に留め、canonical key にしない方がよいです。

    High: checker CLI の fail-closed 挙動を既存 manifest:check より明確にするべき

    既存 manifest:check は explicit target が 0 件なら exit 1 です。 一方、default target 0 件は message を出して exit 0 です。 #935 AC7 は「explicit target 0 件 fail」「default target 0 件 only の silent green を出さない」です。ここは wording がやや弱く、CI で default target 0 件が通る余地を残します。

    修正案:

    • local default target 0 件は exit 0 でもよいが、必ず agent-run-report:check: no files found (default targets) — skipped を stdout に出す。
    • CI=true か --require-target では default target 0 件も exit 1。
    • explicit target に unsupported extension が混ざったら exit 1。
    • unknown option は exit 2。
    • --allow-local-path, --unsafe, --force, --no-secret-scan, --redaction-override をすべて fixture 化する。
    • check command は --mode public-comment を default にし、public mode に escape hatch を持たせない。

    Medium: hook / agent tooling を security boundary として扱わない

    repo docs は Codex hooks を prevention layer とし、canonical final gate は post-run verifier / posting guard としています。 Claude Code hooks も exit code 2 による blocking はできますが、hook はイベント駆動の予防層です。public posting の最終判断を hook 成否に委譲する設計は避けるべきです。(Claude Code)

    #935 の schema には generated_by_hook: true のような安心材料を入れるより、public_safety.checked_by, validator_version, checked_at, verdict, blocked_reasons[] を入れる方が安全です。

    Medium: EntireCLI は #941 scope だが、#935 schema に漏洩防止の受け皿が必要

    EntireCLI は prompts / transcripts / tool calls / file changes / metadata を capture し、checkpoint metadata を entire/checkpoints/v1 に保存する設計です。(Entire) 公式 README / security docs でも、public repo では session transcript が見える可能性、redaction は best-effort、shadow branch に未 redacted data が残り得ることが説明されています。([GitHub]8)

    #941 が safety checker を担当するのは妥当ですが、#935 側の report schema には少なくとも以下の受け皿を置くべきです。

    {
      "public_safety": {
        "entirecli_safety": {
          "verdict": "not_applicable",
          "evidence_ref": null
        }
      }
    }

    token_usage.source: "entire_cli" を許すなら、transcript_source: "entire_cli" のような誤用は明示的に禁止してください。

    #935 に追加すべき Acceptance Criteria

    現行 AC1〜AC7 に加え、以下を追加すると品質が上がります。

    AC8: public surface object contract

    agent_run_report/v1 は public_surface_kind, public_safety, authority, manifest_refs, evidence_refs を必須にし、public surface では public_safety.redaction_status: clean を const とする。

    AC9: opaque manifest refs only

    manifest_refs[] は digest / artifact id / workflow run URL / schema ref / validation verdict のみ許可し、manifest body、local path、transcript path、raw JSON copy を禁止する。

    AC10: path-aware forbidden key/value scan

    validator は object key と string value を path-aware に走査し、禁止 key / local path / token / private key / markdown marker / fence breakout を structured error code で返す。

    AC11: scanner must be at least as strict as existing workflow

    既存 session-manifest.yml の Unix / Windows path、file://, github_pat_, sk-, 40-hex token-like、transcript/local marker check を report validator の fixture に反映する。

    AC12: authority semantic validation

    actor.type: ai_agent の場合、authority.level は non_authoritative 固定。derived 以上は deterministic evidence ref を要求する。

    AC13: markdown candidate validation

    duplicate marker、marker injection、fence breakout、JSON extraction round-trip を invalid fixture と test に含める。

    AC14: CI fail-closed mode

    pnpm agent-run-report:check は explicit 0 件 fail に加え、CI=true または --require-target で default 0 件も fail する。local default 0 件 skip は許す場合でも silent green を禁止する。

    AC15: retro index no-inline-report rule

    agent_retro_index/v1 は report 本文の inline copy を禁止し、comment URL / digest / summary signal / ambiguous-orphan status のみ保持する。

    実装方針の推奨

    agent-run-report-validation.mjs は次の層に分けるべきです。

    1. validateSchema(json) — Ajv2020 strict compile + validation。
    2. validateReportSemantics(json) — authority / token unavailable / public surface / manifest refs。
    3. scanPublicSafety(json) — key/value/path/secret/marker/fence scanner。
    4. validateMarkdownCandidate(markdown) — marker uniqueness / fence / extraction round-trip。
    5. checkTargets(args, env) — explicit/default/CI target fail-closed。

    既存 agent_session_manifest 側は token unavailable null 強制、public evidence で transcript/local_file 禁止、raw transcript included / local paths included の deployment semantic check などの先例を持っています。 #935 はこれをコピーするのではなく、public comment に出す report/index 用に一段強くするのが正しいです。

    最終判断

    #935 はこのままでも方向性はよいですが、merge 可能な実装 Issue としてはまだ緩いです。特に修正必須は次の 4 点です。

    1. public_safety / authority / manifest_refs を schema の中心に置く。
    2. forbidden field list だけでなく、path-aware key/value scanner を必須化する。
    3. marker / fence / markdown candidate validation を 実装: GitHub Issue / PR marker upsert と public-safe posting guard を追加する #937 任せにしない。
    4. retro index が二次漏洩面にならないよう、inline report copy を schema で禁止する。

    この 4 点を #935 本文へ追加すれば、後続 #936〜#941 が public leak を起こしにくい実装順になります。

  3. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    更新内容

    • Verification Commands から rtk を除去した最新版本文を反映しました。
    • check_vc_scope の blocker を解消するため、Allowed Paths を実際の VC 参照先に合わせてディレクトリ単位へ調整しました。

    理由

    • issue-reviewer の指摘どおり、public-safe contract を allowlist 型と scanner / markdown preflight で閉じる方向に寄せるためです。

    Guard 結果

    • check_vc_scope: PASS
    • guard-issue-body: PASS
    • issue_contract_hygiene_autofix: no_change
    • contract_readiness_check: go
  4. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: "https://github.com/squne121/loop-protocol/issues/935"
        generated_at: "2026-06-15T22:03:30Z"
        body_sha256: "sha256:27d296c55c89f92aa4a3a58ebc2fe16eec15a85056f5038591e475905f36def6"
      metadata:
        title_prefix_ready: true
        phase_label_ready: true
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: "2026-06-15T22:03:30Z"
      checked_body_sha256: "sha256:27d296c55c89f92aa4a3a58ebc2fe16eec15a85056f5038591e475905f36def6"
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: issue-refinement-loop
      follow_up_issues: []
      note_only_observations: []
  5. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-15T22:42:16Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/935
      body_sha256: "sha256:524cbca941e834ad88735330fe7c273fb6264ee35e9b6589cdc5af406ae1738a"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  6. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    implement-issue: blocker (2026-06-16T00:00:00Z)

    • status: blocked
    • worktree: .claude/worktrees/issue-935-agent-run-report-schema
    • branch: worktree-issue-935-agent-run-report-schema
    • reason: live contract mismatch

    Blocker

    Issue #935 の live contract では ## Allowed Paths に package.json が含まれていませんが、## In Scope と AC14 は pnpm agent-run-report:check を要求しています。現行 package.json には agent-run-report:check script が存在せず、この AC を満たすには package.json 変更が必要です。

    Request

    以下のいずれかで contract を更新してください。

    1. package.json を Allowed Paths に追加する
    2. AC14 / In Scope / Outcome から pnpm agent-run-report:check 要求を外し、direct script surface に正規化する

    contract 更新後に新しい CONTRACT_REVIEW_RESULT_V1 status: go snapshot を materialize してください。更新後に実装を再開します。

  7. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    edit-issue: 完了

    • 変更: ## Allowed Paths に package.json を 1 行追加
    • 根拠: blocker comment で、pnpm agent-run-report:check を実装するには package.json 変更が必要と示されていたため
    • 影響範囲: 他の section は変更なし
    • ガード: check_vc_scope.py PASS / guard-issue-body.py PASS / contract_readiness_check.py --mode static go
    • body_sha256: sha256:4abff135bae876e7d325dbe1be4f244c04913113bb10dcb9bc9844dc3967bad3
  8. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

  9. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-15T22:57:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/935
      body_sha256: "sha256:4abff135bae876e7d325dbe1be4f244c04913113bb10dcb9bc9844dc3967bad3"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: manual_rematerialized_after_issue_edit
  10. squne121 commented on Jun 15, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-06-16T00:00:00Z)

    • PR: feat: add agent run report safety validators #955
    • Worktree: .claude/worktrees/issue-935-agent-run-report-schema
    • Branch: worktree-issue-935-agent-run-report-schema
    • 変更ファイル:
      • docs/schemas/agent-run-report.schema.json
      • docs/schemas/agent-retro-index.schema.json
      • scripts/lib/agent-run-report-validation.mjs
      • scripts/check-agent-run-reports.mjs
      • package.json
      • tests/agent-run-report-*.test.ts
      • tests/agent-retro-index.test.ts
      • tests/fixtures/agent-run-report/*
      • tests/fixtures/agent-retro-index/*
    • Verification:
      • pnpm typecheck: PASS
      • pnpm lint: PASS
      • pnpm test: PASS (38 files / 678 tests)
      • pnpm build: PASS
      • pnpm agent-run-report:check tests/fixtures/agent-run-report/valid-basic.json tests/fixtures/agent-retro-index/valid-basic.json tests/fixtures/agent-run-report/valid-comment.md: PASS
      • pnpm test -- --run tests/agent-run-report*.test.ts tests/agent-retro-index*.test.ts: PASS
      • rg -n -- "--allow-local-path|--unsafe|--force|--no-secret-scan|--redaction-override" scripts/lib/agent-run-report-validation.mjs scripts/check-agent-run-reports.mjs: no match(negative grep として PASS)
    • Allowed Paths 遵守: yes
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/implementationworkflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions