Repository navigation
Closed
Labels
agent/implementerAI implementer agentarea/ai-opsAI operations and agent tooling areaenhancementNew feature or requestphase/implementationImplementation phaseworkflowWorkflow / skill automation changes
Description
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: mixedParent Issue
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
- lifecycle scripts は 実装: agent run lifecycle scripts と package scripts を追加する #936 で追加する。
- GitHub comment upsert guard と exact marker 更新は 実装: GitHub Issue / PR marker upsert と public-safe posting guard を追加する #937 で追加する。
- retro index workflow、ChatGPT export、docs handoff、EntireCLI safety は 実装: agent_retro_index/v1 の canonical parent marker と trusted post-merge workflow を追加する #938-実装: EntireCLI safety checker と conditional adoption guard を追加する #941 で扱う。
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
- posting 実装は out of scope でも、posting 前 preflight として使える markdown candidate validation を本 Issue で固定する。
- duplicate marker、marker injection、fence breakout、JSON extraction round-trip failure を invalid として扱う。
- exact marker update や GitHub API 書き込み本体は 実装: GitHub Issue / PR marker upsert と public-safe posting guard を追加する #937 の責務に残す。
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.tsAllowed Paths
docs/schemas/scripts/lib/scripts/check-agent-run-reports.mjspackage.jsontests/.github/workflows/
Runtime Verification Applicability
decision: not_applicable
reason: "schema / validator / test 追加であり、browser runtime の動作証跡を成功条件に含まない"Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
- validator と GitHub posting を同一 PR に含めないと成立しないことが判明した場合
- public-safe 境界を 実装: GitHub Issue / PR marker upsert と public-safe posting guard を追加する #937 / 実装: agent_retro_index/v1 の canonical parent marker と trusted post-merge workflow を追加する #938 / 実装: EntireCLI safety checker と conditional adoption guard を追加する #941 側へ押し出さないと成立しないことが判明した場合
Required Skills
- TypeScript / JSON Schema
Scope Delta(任意)
- owner comment を反映し、public-safe contract を forbidden field 列挙から allowlist + semantic validation + scanner + markdown preflight へ強化した。
Delivery Rule
1 Issue = 1 PRで完了する。- Draft PR を既定とする。
- 実装: agent run lifecycle scripts と package scripts を追加する #936 以降は本 Issue の schema / validator merge 後に依存順で進める。
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentarea/ai-opsAI operations and agent tooling areaenhancementNew feature or requestphase/implementationImplementation phaseworkflowWorkflow / skill automation changes
Activity
squne121 commentedon Jun 15, 2026
判定
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 型にするべきです。修正案:
public_surface_kind: "github_issue_comment" | "github_pr_comment" | "none"を置く。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 に限定し、長文引用を禁止する。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 を別々に検査する。{ path, code, matched_class, message }で返す。例:forbidden_key.raw_transcript,secret.github_pat,path.windows_absolute,markdown.fence_breakout。raw_transcriptは key としても値としても invalid。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を有効化する。additionalProperties: falseを置く。unevaluatedProperties: falseの併用または composition 回避を検討する。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)は持つ。<!-- agent_run_report:v1を invalid。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程度に制限する。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 件が通る余地を残します。修正案:
agent-run-report:check: no files found (default targets) — skippedを stdout に出す。CI=trueか--require-targetでは default target 0 件も exit 1。--allow-local-path,--unsafe,--force,--no-secret-scan,--redaction-overrideをすべて fixture 化する。--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は次の層に分けるべきです。validateSchema(json)— Ajv2020 strict compile + validation。validateReportSemantics(json)— authority / token unavailable / public surface / manifest refs。scanPublicSafety(json)— key/value/path/secret/marker/fence scanner。validateMarkdownCandidate(markdown)— marker uniqueness / fence / extraction round-trip。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 点です。
public_safety/authority/manifest_refsを schema の中心に置く。この 4 点を #935 本文へ追加すれば、後続 #936〜#941 が public leak を起こしにくい実装順になります。
squne121 commentedon Jun 15, 2026
更新内容
rtkを除去した最新版本文を反映しました。check_vc_scopeの blocker を解消するため、Allowed Pathsを実際の VC 参照先に合わせてディレクトリ単位へ調整しました。理由
Guard 結果
check_vc_scope: PASSguard-issue-body: PASSissue_contract_hygiene_autofix: no_changecontract_readiness_check: gosqune121 commentedon Jun 15, 2026
Refinement Loop: Approved
The issue has been approved and is ready for implementation.
approvedsqune121 commentedon Jun 15, 2026
Contract Review Result
squne121 commentedon Jun 15, 2026
implement-issue: blocker (2026-06-16T00:00:00Z)
.claude/worktrees/issue-935-agent-run-report-schemaworktree-issue-935-agent-run-report-schemaBlocker
Issue #935 の live contract では
## Allowed Pathsにpackage.jsonが含まれていませんが、## In Scopeと AC14 はpnpm agent-run-report:checkを要求しています。現行package.jsonにはagent-run-report:checkscript が存在せず、この AC を満たすにはpackage.json変更が必要です。manifest:checkは存在するがagent-run-report:checkは未定義Request
以下のいずれかで contract を更新してください。
package.jsonを Allowed Paths に追加するpnpm agent-run-report:check要求を外し、direct script surface に正規化するcontract 更新後に新しい
CONTRACT_REVIEW_RESULT_V1 status: gosnapshot を materialize してください。更新後に実装を再開します。squne121 commentedon Jun 15, 2026
edit-issue: 完了
## Allowed Pathsにpackage.jsonを 1 行追加pnpm agent-run-report:checkを実装するにはpackage.json変更が必要と示されていたためcheck_vc_scope.pyPASS /guard-issue-body.pyPASS /contract_readiness_check.py --mode staticgosha256:4abff135bae876e7d325dbe1be4f244c04913113bb10dcb9bc9844dc3967bad3squne121 commentedon Jun 15, 2026
Contract Review Result
squne121 commentedon Jun 15, 2026
Contract Review Result
squne121 commentedon Jun 15, 2026
implement-issue: 実装完了 (2026-06-16T00:00:00Z)
.claude/worktrees/issue-935-agent-run-report-schemaworktree-issue-935-agent-run-report-schemadocs/schemas/agent-run-report.schema.jsondocs/schemas/agent-retro-index.schema.jsonscripts/lib/agent-run-report-validation.mjsscripts/check-agent-run-reports.mjspackage.jsontests/agent-run-report-*.test.tstests/agent-retro-index.test.tstests/fixtures/agent-run-report/*tests/fixtures/agent-retro-index/*pnpm typecheck: PASSpnpm lint: PASSpnpm test: PASS (38 files / 678 tests)pnpm build: PASSpnpm 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: PASSpnpm test -- --run tests/agent-run-report*.test.ts tests/agent-retro-index*.test.ts: PASSrg -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)fix: tighten public-safe validator semantics (#935)
feat: add agent run report safety validators (#955)