Repository navigation
Closed
1 / 11 of 1 issue completed
Copy link
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "#2230"
goal_ref: "PR #2279 (Closes #2230) の人間 REQUEST_CHANGES 内 P2-2 指摘への恒久対応。OWNER REQUEST_CHANGES (2026-08-28, https://github.com/squne121/loop-protocol/issues/2284#issuecomment-5456321285) を反映した二段階 (Phase A/B) reframe。さらに OWNER 敵対的レビュー (2026-08-29, https://github.com/squne121/loop-protocol/pull/2379#issuecomment-5458286132) を反映し、本 Issue のスコープを Phase A(compatibility reader を main へ入れる)のみへ縮小。Phase B(`ci.yml` producer 切替)は別 follow-up Issue へ切り出す"
change_kind: codeParent Issue
Parent Goal Ref
- Goal: visual-impact-policy-trusted の decision/evidence artifact に run_attempt identity を結合し、attempt-specific artifact naming で stale/duplicate artifact を防ぐ
- Desired Destination:
resolve_visual_impact.pyの evidence manifest schema を V3 化し、run_attemptを tamper-evidence digest 対象に含める。本 Issue(Phase A)では V3 schema/builder/validator と V2/V3 dual-read の main への導入までを完了条件とする。ci.ymlの producer を実際に V3 へ切り替える作業(Phase B)は本 Issue のスコープ外とし、Phase A マージ後に別 follow-up Issue で扱う(下記参照)
Current Validated Scope
scripts/agent-ops/resolve_visual_impact.pyの evidence manifest 生成・検証ロジック(_MANIFEST_V2_RECORD_FIELDS/_evidence_record_digest/_build_evidence_record相当関数)に V3 schema (VISUAL_BASELINE_REVIEW_EVIDENCE_V3) を追加し、run_attemptを digest 対象フィールドに含める- V3 envelope(
schema/workflow_run_id/run_attempt/head_sha/surfaces)を required とし、型・値域を strict に検証する - V2/V3 dual-read 実装(既存 V2 manifest も検証時に受理し続ける)
- trusted consumer (
.github/workflows/visual-impact-trusted-consumer.yml) の移行期間 legacy/generic 両ファイル名 dual-read 対応(ci.yml自体の producer 切替は含まない) - 対応する unit test(
scripts/agent-ops/tests/test_visual_impact_v2_manifest_seams.py等)の追加・更新。real CLI (--mode build-evidence-manifest --evidence-manifest-schema v3) を subprocess で実行する producer→policy→trusted-verifier seam test を含める
Remaining Parent Gaps
ci.ymlの producer 切替(Phase B)は本 Issue のスコープ外。Phase A(本 Issue)が main へマージされた後、別 follow-up Issue(起票予定・番号は Phase A マージ後に確定)で対応する(OWNER 敵対的レビュー 2026-08-29 feat: visual-impact evidence manifest V3 の compatibility reader を追加する(Phase A) #2379 (comment) を反映)- V2 reader・legacy filename fallback の削除(本 Issue のスコープ外。Phase C として、調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287 が GitHub-hosted 実 rerun での
run_attempt >= 2稼働実績を確認した後の別 follow-up Issue で対応する) - attestation / OIDC / trusted signer によるproducer authenticity 保証(調査: visual-impact-policy の same-run producer authenticity 保証(固定 producer / full-SHA pinned reusable workflow / artifact attestation)採用可否を決定する #2101 のスコープであり、本 Issue には持ち込まない)
Outcome
scripts/agent-ops/resolve_visual_impact.py の evidence manifest schema が VISUAL_BASELINE_REVIEW_EVIDENCE_V3 に対応し、run_attempt が digest 対象フィールドに含まれた状態でコミットされ、V2/V3 dual-read が pytest で PASS している。かつ trusted consumer (.github/workflows/visual-impact-trusted-consumer.yml) が移行期間中は legacy V2 filename と新 generic filename の両方を受理する(両方存在する場合は fail)状態。ci.yml の producer を実際に V3 writer・generic filename へ切り替える作業(旧 Phase B)は本 Issue の Outcome から除外し、Phase A マージ後の別 follow-up Issue の Outcome とする。
Phase A: compatibility reader を先に main へ入れる(本 Issue のスコープ)
- V3 envelope と V3 record builder/verifier を実装する
- schema dispatch を V2/V3 で明示する
- CLI に
--evidence-manifest-schema v2|v3を追加する(既定値はv2のまま) - trusted consumer は移行期間だけ legacy filename (
visual_baseline_review_evidence_v2.json) と new filename (visual_baseline_review_evidence.json) の両方を受理する。両方存在する場合は一方を選ばず fail する - 実 CLI (
build-evidence-manifest --evidence-manifest-schema v3) →evaluate_pr_policy()→verify_trusted_artifact()の producer→policy→trusted-verifier seam test を追加する
Phase B: producer 切替(本 Issue のスコープ外・別 follow-up Issue で実施する)
Phase A(本 Issue)が main へマージされた後、base evaluator と default-branch trusted consumer が両方とも V3 対応済みの状態で pre-merge end-to-end green を確認できるようになる。その前提の上で、以下を別 follow-up Issue(Phase A マージ後に起票し番号を確定する)で実施する:
ci.ymlの CLI 呼び出しに--evidence-manifest-schema v3を明示指定する- 内部ファイル名を version-neutral な
visual_baseline_review_evidence.jsonに変更する - job summary の見出しを V3 表記に変更する
- upload path と
--evidence-manifest-fileを generic filename に変更する - artifact 名
component-vrt-evidence-manifest-${{ github.run_attempt }}は現状維持する
Runtime Verification Applicability
- decision: immediate
- reason: 実 CLI producer(
--mode build-evidence-manifest --evidence-manifest-schema v3)→ policy consumer(evaluate_pr_policy())→ trusted verifier(verify_trusted_artifact())のローカル統合検証が必須(rg文字列一致だけでは定数追加のみ・writer 未到達・verifier 未呼び出しの実装を検出できない)。GitHub-hosted の実 rerun(run_attempt >= 2の実運用確認、artifact 共存、cardinality、trusted CheckRun success)は 調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287(research Issue として分離済み)が担当するため、本 Issue のローカル CLI 統合検証の範囲には含めない
applicable_acs: AC1, AC2, AC3, AC5, AC6
execution_environment:uv run --locked pytest(ローカル subprocess 実行のみ。追加の外部認証・ネットワークアクセスは不要)
skip_conditions:uv/pytestが実行環境に存在しない場合は exit 77 で SKIP する(既存test_visual_impact_v2_manifest_seams.pyの subprocess harness と同一規約)
fallback_policy: subprocess 実行に失敗した場合、フォールバックとして文字列一致検査のみで PASS を報告しない。失敗はそのまま FAIL として報告する
artifact_requirements: 各 real CLI producer→policy→trusted-verifier seam test の pytest 出力(stdout/stderr)を PR 証跡として添付する。golden digest fixture の実際のmanifest_sha256値も証跡に含める
In Scope
VISUAL_BASELINE_REVIEW_EVIDENCE_V3schema 定数の追加(_MANIFEST_V3_RECORD_FIELDS = (*_MANIFEST_V2_RECORD_FIELDS, "run_attempt"))- V3 envelope(
schema/workflow_run_id/run_attempt(type(value) is intかつ>= 1)/head_sha(40桁 lowercase hex)/surfaces)の required 化と strict validation - 各 surface record の
workflow_run_id/run_attempt/head_shaが envelope と一致することの検証 - no-impact(
surfaces: [])の manifest でも envelope tuple を decision / authenticated provenance と照合する - V3 record 生成関数の実装(
manifest_sha256の digest 計算にrun_attemptを含める。manifest_sha256自身は digest 入力から除外する) - V3 は同一
surface_idの重複を拒否する(V2 の「最初の一致 record を返す」方式を V3 では引き継がない) - V3 record は missing key・extra key・
run_attemptの string/bool/float/zero/negative/null を拒否する(closed record shape) - V2/V3 dual-read: 検証側(
verify_trusted_artifact()等)を schema フィールドで分岐させる。V2 verifier の挙動(run_attemptが digest 外である compatibility behavior)は変更しない - 既存 V2 fixture は一切書き換えず PASS することを確認する
- CLI に
--evidence-manifest-schema v2|v3オプションを追加する(既定値v2) - trusted consumer (
.github/workflows/visual-impact-trusted-consumer.yml) の移行期間 dual-filename 受理(legacy/new 両方存在時は fail) - V2 と V3 それぞれ 1 件の full-record→expected-SHA256 golden digest fixture を追加する
- PR 実装: visual-impact-policy-trusted の decision/evidence artifact に run_attempt identity を結合する #2279 のコード内コメントで言及された P2-2 の恒久対応
- 既存 V2 manifest の後方互換テスト維持 + 新規 V3 manifest の digest 整合性テスト追加
Out of Scope
ci.ymlの producer 切替(旧 Phase B)。--evidence-manifest-schema v3明示指定、内部ファイル名の generic 化、job summary 見出し変更、upload path 変更を含む。OWNER 敵対的レビュー(2026-08-29, https://github.com/squne121/loop-protocol/pull/2379#issuecomment-5458286132)を反映し、Phase A マージ後の別 follow-up Issue で対応する- V2 reader・legacy filename fallback の削除(Phase C。調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287 の実 rerun 稼働証跡取得後、別 follow-up Issue で対応する)
- attestation、OIDC、署名、追加の producer-authenticity security harness(調査: visual-impact-policy の same-run producer authenticity 保証(固定 producer / full-SHA pinned reusable workflow / artifact attestation)採用可否を決定する #2101 のスコープ。
manifest_sha256は record の corruption/consistency と decision-to-record binding の確認用であり、producer の真正性保証はこの Issue の対象外) docs/dev/visual-impact.schema.jsonへの evidence manifest V2/V3 の追記(同ファイルはVISUAL_IMPACT_DECLARATION_V1/VISUAL_IMPACT_DECISION_V1専用であり、evidence manifest の SSOT ではない。JSON Schema 化は外部言語 consumer 導入時の別判断とする)- top-level の新しい self-digest の追加(empty manifest の freshness は独立取得した provenance tuple との照合で担保できるため不要)
- GitHub-hosted の実 rerun 実行・確認(調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287 に委譲済み)
- PR 実装: visual-impact-policy-trusted の decision/evidence artifact に run_attempt identity を結合する #2279 の他の指摘(P1-1〜P1-5, P2-1、旧版)は解決済みのため対象外
Acceptance Criteria
- AC1: V3 envelope(
schema/workflow_run_id/run_attempt/head_sha/surfaces)が required であり、型・値域が strict に検証される(workflow_run_id/run_attemptは int かつ>= 1、head_shaは40桁 lowercase hex) - AC2: V3 record digest —
run_attemptだけが異なる record は異なるmanifest_sha256を持ち、digest 計算後にrun_attemptを変更した record は verifier に拒否される - AC3: closed record shape — V3 は missing key、extra key、
run_attemptの string/bool/float/zero/negative/null、duplicatesurface_id、未知 schema を拒否する - AC4: V2 compatibility — 既存 V2 fixture は一切書き換えず引き続き PASS する。V2 では
run_attemptが digest 外であることを compatibility behavior として維持する - AC5: real producer seam — 実
--mode build-evidence-manifest --evidence-manifest-schema v3が V3 JSON を生成し、その出力をevaluate_pr_policy()とverify_trusted_artifact()が正常に消費する - AC6: no-impact identity —
surfaces: []でも envelope tuple が一致すれば PASS、不一致・欠落なら FAIL する - AC7: regression / runtime boundary —
scripts/agent-ops/tests/全件 PASS する。GitHub-hosted rerun は 調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287 に明示的に deferred とし、ローカル CLI 統合検証は本 Issue で必須とする。ci.ymlproducer 切替(旧 AC7/Phase B)は本 Issue から除外し follow-up Issue の AC とする
Verification Commands
# AC1
$ uv run --locked pytest scripts/agent-ops/tests/test_visual_impact_v3_manifest_seams.py -q -k envelope
# AC2
$ uv run --locked pytest scripts/agent-ops/tests/test_visual_impact_v3_manifest_seams.py -q -k digest
# AC3
$ uv run --locked pytest scripts/agent-ops/tests/test_visual_impact_v3_manifest_seams.py -q -k closed_shape
# AC4
$ uv run --locked pytest scripts/agent-ops/tests/test_visual_impact_v2_manifest_seams.py -q
# AC5
$ uv run --locked pytest scripts/agent-ops/tests/test_visual_impact_v3_manifest_seams.py -q -k producer_seam
# AC6
$ uv run --locked pytest scripts/agent-ops/tests/test_visual_impact_v3_manifest_seams.py -q -k no_impact
# AC7
$ uv run --locked pytest scripts/agent-ops/tests/ -q -n autoAllowed Paths
- scripts/agent-ops/resolve_visual_impact.py
- .github/workflows/visual-impact-trusted-consumer.yml
- scripts/agent-ops/tests/test_visual_impact_v2_manifest_seams.py
- scripts/agent-ops/tests/test_visual_impact_v3_manifest_seams.py
- scripts/agent-ops/tests/test_resolve_visual_impact_artifact_attempt_binding.py
- scripts/agent-ops/tests/test_visual_impact_trusted_consumer.py
- scripts/agent-ops/tests/test_visual_impact_decision_binding.py
- scripts/agent-ops/tests/test_resolve_visual_impact_trusted_transitive.py
- scripts/agent-ops/tests/test_resolve_visual_impact_checkrun_adversarial.py
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合(
.github/workflows/ci.ymlの変更が必要になった場合を含む。ci.yml の producer 切替は follow-up Issue のスコープ) - In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合(例: Phase B の producer 切替、Phase C の legacy 削除、attestation/OIDC 導入)
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Required Design References
- docs/dev/runtime-verification-policy.md(
decision: immediateの必須フィールド・SKIP exit 77・fallback 禁止規約の SSOT) - docs/dev/agent-skill-boundaries.md(Issue/PR 契約スキーマ共通定義の SSOT)
Scope Delta(任意)
- 2026-08-28 OWNER REQUEST_CHANGES(https://github.com/squne121/loop-protocol/issues/2284#issuecomment-5456321285)を反映し、単一 Phase 実装契約から Phase A(compatibility reader)/ Phase B(producer cutover)の二段階契約へ reframe。Allowed Paths を 3 ファイルから 10 ファイル(新規
test_visual_impact_v3_manifest_seams.py含む)へ拡大。Acceptance Criteria を envelope 検証・digest 契約・real producer seam・production cutover 基準へ全面置換し、動作検証対象 AC(AC1/AC2/AC3/AC5/AC6)にruntime-verification: trueタグを付与。Runtime Verification Applicability をnot_applicableからimmediate(ローカル CLI 統合検証必須、GitHub-hosted rerun のみ 調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287 へ deferred)へ変更。 - 自動レビュー(review-issue、2026-08-28)指摘反映: 動作検証 AC への
runtime-verification: trueタグ欠落を修正、AC1/AC2/AC3/AC5/AC6 の Verification Commands を既存ファイルへの-kフィルタ(未実装状態でcollected 0 items/ exit 5 となり判定が曖昧)から新規ファイルtest_visual_impact_v3_manifest_seams.py参照(未実装時は file-not-found で明確な baseline-fail)へ変更、AC8 の全件回帰 VC に-n auto(pytest-xdist)を追加してローカル実測 175s→93s に短縮(readiness check の per-command budget 内に収める)。 - 2026-08-29 OWNER 敵対的レビュー(PR feat: visual-impact evidence manifest V3 の compatibility reader を追加する(Phase A) #2379、https://github.com/squne121/loop-protocol/pull/2379#issuecomment-5458286132)を反映し、Phase A/Phase B の二段階契約から Phase A のみへスコープを再縮小。旧 AC7(Phase B production cutover)を削除し旧 AC8(regression)を AC7 へ繰り上げ。
.github/workflows/ci.ymlを Allowed Paths から除去。Outcome / In Scope からci.ymlproducer 切替を除外し、Out of Scope へ Phase B follow-up Issue(Phase A マージ後に起票)として明記。PR feat: visual-impact evidence manifest V3 の compatibility reader を追加する(Phase A) #2379 は Phase A のみへ縮小・Closes #2284を削除済み。
Sub-issues
Collapse Sub-issuesSub-issues
Loading 1 sub-issues
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phasetriage-requiredNeeds owner triage for priority decision
Activity
squne121 commentedon Aug 28, 2026
判定
REQUEST_CHANGES
Issue #2284 の技術的な方向性、すなわち「V2 を破壊せず V3 を追加し、
run_attemptを record digest に含める」は妥当です。しかし、現在の契約は実運用で一度も V3 を生成しなくても全 AC を満たして close できるため、実装 Issue として false-green です。さらに、surfaces: []の no-impact manifest には identity record 自体が存在しないため、record fields だけを V3 化しても親 Issue #2230 の exact tuple 契約を完全には満たしません。レビュー基準の main はf6ad7a09a92bdc24270407423a2c59119cdd05acです。方向性そのものは GitHub Actions の仕様にも整合します。
GITHUB_RUN_IDは rerun しても変わらず、GITHUB_RUN_ATTEMPTは rerun ごとに増加します。また workflow-run artifacts API はrun_idと artifactnameでは絞り込めますが、attempt を直接指定する query parameter を持ちません。したがって、attempt-specific artifact 名と、content 内のrun_attemptbinding の併用は正しい設計です。 ([GitHub Docs]1)ブロッカー
[P1-1] V3 が未使用の補助コードのままでも Issue を完了できる
Issue は Outcome を「V3 対応と V2/V3 dual-read が pytest で PASS」と定義する一方、producer の V3 切替を Out of Scope とし、
ci.ymlの変更が必要になった場合は停止するよう定めています。AC1・AC2 もrgによる文字列確認です。したがって、V3 builder と verifier branch だけ追加し、writer は永久に V2 のままでも AC1〜AC4 が成立します。現行の本番経路は実際にその状態です。
build-evidence-manifestは V2 record を作り、digest 計算後にrecord["run_attempt"]を追加し、top-level schema も V2 で出力しています。ci.ymlは出力ファイル名、summary、upload path、policy-check の入力をすべてvisual_baseline_review_evidence_v2.jsonに固定しています。visual_baseline_review_evidence_v2.jsonに固定しています。一方、指摘元の PR #2279 OWNER review は、互換 reader を先に main へ入れ、その後 producer を切り替え、最後に legacy fallback を削除する段階移行を明示的に推奨しています。#2284 はこのうち第一段階だけを記述しながら、第二段階を追跡可能な契約にしていません。
修正方針: Issue #2284 を二段階実装として reframe し、Phase B の producer 切替まで完了するまでは close しない設計が最も簡潔です。
ci.ymlを V3 writer に切り替える。Issue を分割するより、同じ Issue に対する順序付き二 PR とした方が、個人開発では管理コストが小さくなります。
[P1-2]
surfaces: []では V3 にしても run identity が存在しない親 Issue #2230 は decision と evidence の両 artifactが
(workflow_run_id, run_attempt, head_sha)の exact tuple を内容として持つことを要求しています。しかし現行 trusted-consumer テストでは、次の identity を一切持たない empty manifest が成功扱いされています。
{ "schema": "VISUAL_BASELINE_REVIEW_EVIDENCE_V2", "surfaces": [] }この fixture は
verdict.ok is Trueを明示しています。#2284 の案は
_MANIFEST_V3_RECORD_FIELDS = V2 fields + run_attemptであり、identity は各 surface record にしかありません。surfaces: []では record がないため、V3 に version-up しても evidence artifact content の run identity は表現不能です。V3 は record schema だけでなく、manifest envelope も定義すべきです。
{ "schema": "VISUAL_BASELINE_REVIEW_EVIDENCE_V3", "workflow_run_id": 123456789, "run_attempt": 2, "head_sha": "0123456789abcdef0123456789abcdef01234567", "surfaces": [] }必要な検証は以下です。
workflow_run_idとrun_attemptはtype(value) is intかつ>= 1。head_shaは40桁 lowercase hex。workflow_run_id/run_attempt/head_shaは envelope と一致する。surfaces: []でも envelope tuple を decision と authenticated provenance に照合する。surface_idの重複を拒否する。現行の「最初の一致 record を返す」方式を引き継がない。top-level の新しい self-digest までは不要です。empty manifest の freshness は独立取得した provenance tuple との照合で担保でき、self-digest を増やしても untrusted producer の真正性は増えません。
[P1-3] Verification Commands が実装を検証していない
AC1 と AC2 は次の文字列検索だけです。
これでは、定数やコメントを追加しただけ、digest field tuple を変更していない、writer から到達不能、V3 verifier が呼ばれない、といった実装でも PASS します。
既存の
test_visual_impact_v2_manifest_seams.pyには、実際の--mode build-evidence-manifestCLI を subprocess で実行し、その出力をevaluate_pr_policy()へ渡す producer→consumer seam test が既にあります。V3 も同じ水準で検証すべきであり、新しい重い harness は不要です。また
Runtime Verification Applicability: not_applicableは範囲が広すぎます。#2287 は post-migration の
run_attempt >= 2、artifact 共存、cardinality、JSON integer、trusted CheckRun success を確認する research Issue として既に分離されています。[P1-4] Allowed Paths が実際の consumer inventory と一致していない
現行 Allowed Paths は本体と2テストだけです。ところが V2 schema constant は trusted consumer、decision binding、trusted transitive、CheckRun adversarial など複数の本番相当 fixture で使用されています。
最低でも Phase A/B 全体の Allowed Paths は次まで拡大すべきです。許可するだけであり、全ファイルを機械的に変更する必要はありません。
現在の Stop Condition は、まさに必要な producer 切替や consumer test 更新が判明した時点で実装を停止させます。ワークフローを妨げないという方針からも、この Stop Condition は削除または Phase 境界へ置き換えるべきです。
P2 改善点
[P2-1] Required Design Reference が evidence manifest の schema ではない
docs/dev/visual-impact.schema.jsonが定義しているのはVISUAL_IMPACT_DECLARATION_V1とVISUAL_IMPACT_DECISION_V1だけです。evidence manifest V2/V3 の$defsも top-leveloneOfもありません。したがって、現状では V3 の設計参照や SSOT になりません。個人開発としては、JSON Schema の追加まで強制する必要はありません。最小構成は次です。
docs/dev/visual-impact.schema.jsonを Required Design References から外す。「参照先はあるが対象 schema はない」という現在の状態より明確です。
[P2-2] digest の canonical byte contract と V3 key set が固定されていない
現在の digest は
json.dumps(..., sort_keys=True, separators=(",", ":"))の結果に SHA-256 を適用する実装です。単一 Python 実装・既知の scalar 型だけで利用する限り、この方式を維持して問題ありません。ただし Issue 本文には、正確な serialization と key set が契約として固定されていません。RFC 8785 が示すとおり、hash を再現可能にするには入力の invariant representation が必要です。ただし、この規模で JCS ライブラリを導入するのは過剰です。現在の serialization を golden vector で凍結すれば十分です。 ([RFC Editor]2)
V3 について次を固定すべきです。
manifest_sha256自身は digest 入力から除外する。V3 fields + manifest_sha256と完全一致させる。run_attemptの missing /null/ string / bool / float / zero / negative を拒否する。[P2-3] self-digest を producer authenticity と混同しない
manifest_sha256は record の corruption/consistency と decision-to-record binding を確認するためのものです。candidate-controlled producer は内容を変更して digest も再計算できるため、producer の真正性は保証しません。この境界は #2101 が full-SHA pinned reusable workflow、artifact attestation、trusted signer の設計対象として既に持っています。#2284 に attestation、OIDC、署名、追加の security harness を持ち込むべきではありません。
GitHub の
upload-artifactも artifact ID と SHA-256artifact-digestを出力し、v4 以降の artifact archive は immutable です。attempt-specific artifact 名を維持する現在の設計は妥当であり、ここを作り直す必要もありません。 ([GitHub]3)推奨する実装順序
Phase A: compatibility reader を先に main へ入れる
V3 envelope と V3 record builder/verifier を実装。
schema dispatch を V2/V3 で明示する。
CLI に、例えば
--evidence-manifest-schema v2|v3を追加。既定値は V2 のままにする。
trusted consumer は次の両 filename を移行期間だけ受理する。
visual_baseline_review_evidence_v2.jsonvisual_baseline_review_evidence.json両方存在する場合は一方を選ばず失敗させる。
V3 の real CLI→policy→trusted verifier test を追加。
Phase B: producer cut替
Phase A が main に入った後に、
ci.ymlを次のように変更します。visual_baseline_review_evidence.jsonに変更。--evidence-manifest-fileを generic filename に変更。component-vrt-evidence-manifest-${{ github.run_attempt }}は現状維持。base-locked consumer が先に V3 を理解しているため、PR #2279 で問題になった rollout failure を繰り返しません。
Phase C: 実 CI と legacy removal
run_attempt >= 2の実 run を確認。置き換えるべき Acceptance Criteria
V3 envelope
schema、workflow_run_id、run_attempt、head_sha、surfacesが required であり、型と値域が strict に検証される。V3 record digest
run_attemptだけが異なる record は異なる digest を持ち、digest 計算後にrun_attemptを変更した record は verifier に拒否される。closed record shape
V3 は missing key、extra key、string/bool/float/zero の
run_attempt、duplicatesurface_id、未知 schema を拒否する。V2 compatibility
既存 V2 fixture は一切書き換えず PASS する。V2 では
run_attemptが digest 外であることを compatibility behavior として明記する。real producer seam
実
--mode build-evidence-manifest --evidence-manifest-schema v3が V3 JSON を生成し、その出力をevaluate_pr_policy()とverify_trusted_artifact()が正常に消費する。no-impact identity
surfaces: []でも envelope tuple が一致すれば PASS、不一致・欠落なら FAIL する。production cutover
Phase B 完了時点で
ci.ymlが V3 と generic filename を実際に生成・消費している。V3 helper が存在するだけでは未完了とする。regression / runtime boundary
scripts/agent-ops/tests/全件 PASS。GitHub-hosted rerun は 調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287 に明示的に deferred とし、ローカル CLI integration は 実装: visual-impact evidence manifest schema を V3 化し run_attempt を digest 対象に含める #2284 で必須とする。結論
#2284 は削除や close の対象ではありませんが、現状の契約のまま実装へ進めるべきではありません。必要なのはセキュリティ機構の追加ではなく、次の3点です。
rgではなく既存 CLI seam を使った実行可能な AC。この3点を Issue 本文へ反映すれば、個人趣味開発として過剰な harness を増やさず、実際に役立つ恒久修正になります。
squne121 commentedon Aug 28, 2026
root-owned entry router audit
route: invoke_impl_review_loop
reason: fresh_review_go_live_equality
squne121 commentedon Aug 28, 2026
issue-refinement-loop: approved
Issue #2284 の本文を、2026-08-28 の OWNER REQUEST_CHANGES(P1 4件 / P2 3件)へ完全対応する形で reframe しました。
not_applicableからimmediateへ変更。→ issue-reviewer 判定: needs-fix(7 blockers:
runtime-verification: trueタグ欠落 / VC の pytest exit 5(collected 0 items) 5件 / VC timeout 1件)runtime-verification: trueタグを付与、該当 VC を既存ファイルへの-kフィルタから新規ファイルtest_visual_impact_v3_manifest_seams.py参照(未実装時に file-not-found/exit 4 の明確な baseline-fail)へ変更、AC8 の全件回帰 VC に-n auto(pytest-xdist、実測 175秒→93秒)を追加。→ issue-reviewer 判定: approve(0 blockers)
Step 2.5(semantic design review):
semantic_review_applicable: false(severity-tagged anchor findings 抽出なし、checker_gap_count 0、heuristic_concern_count 0)のためスキップ。Final Gate:
issue-contract-review(mode: execute)でCONTRACT_REVIEW_RESULT_V1.status: goを確認済み(body_sha256 一致、全 8 AC の VC baseline classification が期待通り: AC1/AC2/AC3/AC5/AC6 はexpected_fail(exit 4, 未実装ファイル参照)、AC4/AC8 はexpected_pass)。squne121 commentedon Aug 28, 2026
implement-issue: 実装完了 (2026-08-29)
.claude/worktrees/issue-2284-evidence-manifest-v3worktree-issue-2284-evidence-manifest-v3scripts/agent-ops/tests/全件 765 passed, 18 skipped, regression なし)rg3 件ヒット確認pytest scripts/agent-ops/tests/ -n auto765 passed / 18 skippedruff check/actionlintともにエラーなしfix: PR #2379 OWNER fix_delta -- Phase A へ縮小し head_sha/identity bindi…
feat: visual-impact evidence manifest V3 の compatibility reader を追加する…
feat: ci.yml の evidence manifest producer を V3 schema/generic filenam…