Repository navigation
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "visual-impact-policy-trusted CheckRun が実際に producer artifact を取得・検証できる状態にする"
change_kind: workflowParent Issue
なし(単独改善)
Parent Goal Ref
- Goal:
.github/workflows/visual-impact-trusted-consumer.ymlの producer artifact download が常時失敗している既存インフラバグを解消し、visual-impact-policy-trustedcheck が実際の検証結果を報告できるようにする - Desired Destination: N/A(単独改善のため parent なし)
Current Validated Scope
.github/workflows/visual-impact-trusted-consumer.ymlのDownload producer artifacts (untrusted input)ステップにあるgh api ... --output decision.zip/gh api ... --output evidence.zip呼び出しの修正
Remaining Parent Gaps
なし
Runtime Verification Applicability
- decision: deferred
- reason: workflow_run consumer は default branch の workflow 定義で実行されるため、
本 bootstrap PR 自身では修正版 consumer の genuine runtime verification が成立しない - deferred_destination:
- destination_type: phase
- destination_ref: post-merge bootstrap verification
- deferred_verification_condition: >-
実装: visual-impact-trusted-consumer.yml の gh api --output 未対応バグを修正する #2076 の修正が main に landing 後、fix(contract-review): RVA 欠落を fail-closed に統一 #2070 を最新 main に更新して新規 ci run を発生させ、
visual-impact-policy-trusted の Download producer artifacts が success、
Independently re-verify producer artifacts が skipped されず実行され、
current PR head に対する trusted CheckRun が実検証結果を報告すること
Outcome
.github/workflows/visual-impact-trusted-consumer.yml の gh api 呼び出しが --output フラグではなく正しい方法(stdout リダイレクトなど)で artifact zip を取得するように修正され、visual-impact-policy-trusted CheckRun が producer artifact の download に成功し、実際の独立再検証結果(success/failure)を報告できる状態になっている。
Background
PR #2057(Issue #2048)の impl-review-loop 中、pr-reviewer が visual-impact-policy-trusted CI check が継続的に失敗していることを発見し調査した。原因は .github/workflows/visual-impact-trusted-consumer.yml の producer artifact download ステップで gh api ... --output decision.zip を実行しているが、gh api コマンドは --output フラグをサポートしておらず unknown flag: --output で exit 1 しているという、ワークフローファイル自体のバグである。
このワークフローは workflow_run トリガーのため常に base/default branch(main)のファイルが使われ、PR head 由来ではない。直近複数回の run が全て同一の base head_sha で同じ理由で失敗していることを確認済みで、全 PR に影響する既存インフラバグである(Issue #2019 で導入された check で、branch protection の required_status_checks には含まれていない)。
In Scope
.github/workflows/visual-impact-trusted-consumer.ymlのDownload producer artifacts (untrusted input)ステップにあるgh api呼び出し(decision.zip / evidence.zip の 2 箇所)を、gh apiがサポートする方法(例:gh api ... > decision.zipのような stdout リダイレクト、または同等の正しいオプション)に修正する
Out of Scope
visual-impact-policy-trustedcheck を branch protection のrequired_status_checksに追加することresolve_visual_impact.pyの検証ロジック自体の変更- Issue 実装: visual-surface dependency registry と required visual-impact policy check を導入し、UI変更PR内でVRT処置を強制する #2019 で導入された他のワークフロー・スクリプトの変更
Acceptance Criteria
- AC1:
.github/workflows/visual-impact-trusted-consumer.ymlのDownload producer artifacts (untrusted input)ステップにgh apiと--outputフラグの組み合わせが存在しない - AC2: 同ステップで
decision.zip/evidence.zipの取得がgh apiがサポートする方法(stdout リダイレクト等)で行われている - AC3: 修正後の workflow run で
visual-impact-policy-trustedcheck のDownload producer artifacts (untrusted input)ステップが success し、Independently re-verify producer artifacts (base-locked evaluator)ステップが skip されずに実行され、unknown flag: --outputエラーが発生しない。CheckRun は対象 PR の current head SHA に bind される(docs/dev/runtime-verification-policy.mdの deferred 条件で post-merge に検証、静的にはactionlintで構文エラーがないことのみ確認する)。
Verification Commands
AC2 の VC は shell redirect operator(>)自体を VC 行内に literal 記載できない制約のため、
PCRE の \x3e エスケープで > を表現して同一の意図(stdout redirect 修正の検査)を検証する。
AC3 は curl | bash の compound pipe を避け、download → chmod 実行を分離した 3 ステップにする。
AC3 の VC は curl(ネットワーク)・bash(シェル実行)・actionlint(allowlist 外コマンド)を要するため
baseline preflight(sandboxed, allowlist-only)では実行不可能。# baseline-expect: deferred
アノテーションにより baseline preflight ではこの VC を skip し(decision: go,
scope_class: pr_review_only)、実際の actionlint 実行検証は pr-review-judge(実装 PR レビュー時)
の責務とする。
# AC1
$ ! rg -n -- '--output' .github/workflows/visual-impact-trusted-consumer.yml
# AC2
$ rg -Pn 'gh api "repos/\$\{REPO\}/actions/artifacts/\$\{DECISION_ARTIFACT_ID\}/zip"\s*\x3e\s*decision\.zip' .github/workflows/visual-impact-trusted-consumer.yml
$ rg -Pn 'gh api "repos/\$\{REPO\}/actions/artifacts/\$\{EVIDENCE_ARTIFACT_ID\}/zip"\s*\x3e\s*evidence\.zip' .github/workflows/visual-impact-trusted-consumer.yml
# AC3
# baseline-expect: deferred
$ curl -fsSL -o download-actionlint.bash https://raw.githubusercontent.com/rhysd/actionlint/914e7df21a07ef503a81201c76d2b11c789d3fca/scripts/download-actionlint.bash
# baseline-expect: deferred
$ bash download-actionlint.bash 1.7.12
# baseline-expect: deferred
$ ./actionlint .github/workflows/visual-impact-trusted-consumer.yml(uvx actionlint は使わない。repo の CI は .github/workflows/ci.yml の actionlint job と同じ pinned downloader 経路を使う。)
Allowed Paths
.github/workflows/visual-impact-trusted-consumer.yml
Stop Conditions
- Allowed Paths 外の変更が必要と判明した場合
- In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
- 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
- 後続 Phase / 別スコープへの波及が判明した場合
- nested SubAgent delegation が必要になった場合
- 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
Required Skills
なし
Required Design References
- .github/workflows/visual-impact-trusted-consumer.yml
- docs/dev/runtime-verification-policy.md
Scope Delta(該当時のみ記載)
N/A
Delivery Rule
1 Issue = 1 PR。Draft PR を既定とする。
Notes for Reviewer
このワークフローは workflow_run トリガーのため、修正が反映されるのは本 PR マージ後の次回 ci workflow 完了時点であり、本 PR 自体の CI 上ではこの check の green 化を直接確認できない場合がある(actionlint 等の静的検証と目視確認で代替する)。
Scope Collision (C1): related_issue=#2040, #2019, #239, #213, #205; overlapping_paths=.github/workflows/visual-impact-trusted-consumer.yml。non_conflict_reason: いずれも .github/workflows/ や大規模な複数ファイル group の一部として Allowed Paths に本ファイルを含んでいるだけで、本 Issue が対象とする gh api --output バグ修正そのものを扱っていない(#2019 は本ワークフローの新規導入元、#2040/#239/#213/#205 は無関係な広域 Allowed Paths)。edit_intent: 本 Issue は単一ファイルの pinpoint バグ修正のみを行い、他 Issue のスコープとは独立。
Dependency Disposition — PR #2070: PR #2070(Issue #2040 実装、OPEN/Draft、base=main)は既に .github/workflows/visual-impact-trusted-consumer.yml に対して本 Issue と exact-path / exact-intent で重複する2行修正(gh api ... > decision.zip / > evidence.zip)を含む。#2076 を本ファイルの minimal bootstrap landing の authoritative owner とする。#2076 が先に merge された場合、PR #2070 は最新 main へ rebase して同等 hunk を消化する(no-op化)。PR #2070 が先に同修正を main へ landing した場合、#2076 は no-change / superseded として扱う。
Source
dedupe_key: follow-up:squne121/loop-protocol:infra:visual-impact-trusted-consumer-bug
source: post-merge-cleanup (PR #2057 / Issue #2048)
Activity
squne121 commentedon Aug 11, 2026
判定
REQUEST_CHANGES /
implementation_go = falseです。gh api --outputを stdout redirect に直す実装方向そのものは妥当です。GitHub CLI の現行gh apiに--outputは存在せず、レスポンスは stdout に出力されます。artifact download REST API は ZIP download endpoint を提供します。 ([GitHub CLI]1)ただし #2076 は、実装コードより Issue contract 側に merge-blocking な欠陥があります。特に Verification Commands は現状のままだと「正しい修正を FAIL させ、壊れた修正を PASS させ得る」状態です。
P0 —
Runtime Verification Applicability欠落で canonical executor が着手不能#2076 は
issue_kind: implementationですが、本文に canonical## Runtime Verification Applicabilityがありません。これは単なる文書不足ではありません。current
implement-issueはこのセクションが無ければ 実装開始せず human escalation すると明記しています。さらに SSOT は全 Issue にnot_applicable | immediate | deferredの明示を要求しています。この Issue は runtime verification 自体が不要なのではなく、
workflow_runが default branch 上の workflow 定義を使うため 修正版を merge するまで genuine runtime verification が成立しないケースです。GitHub 公式仕様でもworkflow_runのGITHUB_SHA/GITHUB_REFは default branch、workflow file も default branch に存在する必要があります。 ([GitHub Docs]2)したがって
not_applicableではなく、例えば以下のdeferredが整合します。P0 — AC1〜AC3 の Verification Commands が検証器として成立していない
現行 VC は3本とも問題があります。
AC1 は exit semantics が逆です。
rg -c -- '--output' ...修正後は「0 matches」が期待値ですが、ripgrep は no-match を exit 1 とします。通常の fail-fast VC runner では、正しい修正ほど FAIL します。 ([GitHub]3)
AC2 は broken/fixed を区別できません。
rg -n 'gh api.*artifacts.*zip' ...これは現在の壊れた
gh api ... --output ...でも一致するので、AC2 の「supported method で取得」という主張を検証していません。AC3 の
actionlintは runtime 成功の代替証拠になりません。 actionlint は workflow syntax、expression、action inputs、ShellCheck 等の静的 checker であり、外部 CLI の任意フラグ互換性を実行検証するものではありません。 ([GitHub]4)しかもリポジトリ自身の履歴が反例になっています。trusted consumer を導入した PR #2045 は
actionlint ... zero findingsを記録して merge されましたが、その結果 main に残った workflow が今回のgh api --outputfailure を起こしています。最低でも静的 VC は次程度まで強くすべきです。
actionlintは追加の syntax gate として残して構いませんが、AC3 runtime evidence の代用にはしない方がよいです。P1 —
uvx actionlintは repository-standard の actionlint 実行方法ではない#2076 は、
を指定しています。
uvxは原則としてコマンド名と同名の Python package を解決する仕組みです。一方、公式 actionlint は Go binary として配布され、公式 installation は binary/Homebrew/go install等です。Python wrapper は別名actionlint-pyです。 ([Astral Docs]5)そしてこの repository の current CI は、actionlint の公式 downloader を commit pin し、1.7.12 をインストールして
actionlintを直接実行しています。Issue VC も repository-standard と揃えるべきです。少なくとも
uvx actionlintという新しい取得経路を canonical VC に持ち込む理由はありません。P1 — Scope Collision 記述が current repository state と矛盾
#2076 は、
としています。
しかし現在 open / Draft の PR #2070(#2040 実装) は、この trusted workflow failure を明示的に扱っています。PR 自身も
gh api --outputfailure に対する minimal workflow fix を含むと記録しています。さらに OWNER コメントでは既に、
.github/workflows/visual-impact-trusted-consumer.ymlの 1-file / 2-command fix だけを切り出すという方針が明示されています。
つまり #2076 は「独立した新規修正」ではなく、事実上 #2070 から切り離す bootstrap authority と定義するのが正確です。
Dependency Dispositionsには最低でも次を固定した方がよいです。これがないと、二つの implementation Issue/PR が同一2行を別々に所有することになります。
P1 — AC3 は「CheckRun が存在する」ではなく step-level 到達性を要求すべき
trusted consumer は artifact download failure 後でも failure CheckRun を発行できます。そのため、
だけでは、独立 evaluator に到達した証拠になりません。
AC3 の post-merge condition は少なくとも、
Download producer artifacts (untrusted input)= successIndependently re-verify producer artifacts (base-locked evaluator)が skipped ではないunknown flag: --outputがないまで固定すべきです。
これは Issue の Outcome「download に成功し、実際の独立再検証結果を報告する」を機械的に検証可能な形へ落としたものです。
P2 — untrusted artifact の workspace 展開は別 hardening Issue 候補
今回の pinpoint bootstrap では stdout redirect の2行修正に留める方が blast radius は小さいです。
ただし長期的には、GitHub 公式の
workflow_runartifact 使用例は、untrusted artifact を workspace に展開せず${{ runner.temp }}/artifactsに置くよう明示しています。さらにgh run download <run-id> -n <artifact> -D <dir>という artifact 専用 CLI も存在します。 ([GitHub Docs]2)したがって後続 hardening としては、
を検討する価値があります。ただし、これは #2076 の bootstrap scope に混ぜるべきではありません。#2019 が作った trust boundary を直している最中なので、今回は変更面積を増やさない方が安全です。
推奨する修正後の Issue 方針
実装差分は #2070 に既に存在する2行相当をそのまま最小 bootstrap として採用し、Issue contract だけ以下を直すのが最短です。
Runtime Verification Applicability: deferredを追加。actionlintで runtime verification の代替可」を削除。rgexit semantics を修正。$RUNNER_TEMP化は別 hardening とする。この状態なら Issue refinement 後は GO です。実装自体について新しい設計を発明する必要はありません。現在の主要リスクは2行のコードではなく、bootstrap の ownership と verification authority が Issue contract に正しく表現されていないことです。
なお branch protection の live 設定は GitHub App から 403 になり、
visual-impact-policy-trustedが現在も non-required かは今回独立検証できませんでした。その点だけは #2076 本文の記載を source of record として扱っています。squne121 commentedon Aug 11, 2026
issue-refinement-loop 終了報告
結果: approved(3 iteration、review-issue VERDICT: approve、validator: valid)
実施内容
investigation_policy.required: true/web_research_policy.required: trueを検出。web-researcher(AGY grounded_research)は quota 枯渇で外部仕様の直接検証に失敗。codebase-investigator(AGY local_asset_research)も prompt-only mode 制約でgh pr view/gh issue view等の実行が禁止され、fact-check が NOT_CHECKABLE となった。このため control-plane が直接 repo 事実確認を実施し、OWNER の指摘(gh api --outputバグの実在、PR fix(contract-review): RVA 欠落を fail-closed に統一 #2070 の overlap、actionlint pinned binary 運用、関連 Issue の状態)を全て repo 上の証跡で確認した。issue-reviewerによる初回レビュー(VERDICT: needs-fix、5 blockers): Runtime Verification Applicability セクション欠落、Required Design References 空、AC1〜AC3 の Verification Commands 不備、Scope Collision 記述の PR fix(contract-review): RVA 欠落を fail-closed に統一 #2070 未反映。issue-editorが anchor comment の指摘に沿って本文を全面修正(RVA セクション追加・Required Design References 追加・AC1〜AC3 VC 書き換え・PR fix(contract-review): RVA 欠落を fail-closed に統一 #2070 の Dependency Disposition 追記)。curl/bash/actionlintが VC preflight allowlist 外と判定(3 blockers)。# baseline-expect: deferredannotation を追加。$コマンド行にしか適用されていなかったため、3つの$コマンド行それぞれに annotation を個別配置し修正(2 blockers → 0 blockers)。check_issue_contract.py/contract_readiness_check.py全 pass、VERDICT: approve、validate_review_compact_output.pyで valid 判定済み。最終状態
sha256:d57bce21e1e8c1592fc50dbf4f9c00fc14e75638bbe9c0bc3df790f5d4432f0dparent_issue: none、単独 implementation issue)squne121 commentedon Aug 11, 2026
implement-issue: 実装完了 (2026-08-11T05:30:24Z)
.claude/worktrees/issue-2076-visual-impact-trusted-consumer-yml-gh-apworktree-issue-2076-visual-impact-trusted-consumer-yml-gh-ap38bf0c3dd27a70123cade9abb0ae73c01a36c36esqune121 commentedon Aug 11, 2026
impl-review-loop 完了報告
PR #2085(Draft, head
9865e529fc6b155ca519ec10febf243be076dc3c)が pr-reviewer APPROVE を取得し、必須 CI(typecheck / lint / test / build / python-test / validate-generated-artifact)が全て green です。判定サマリー
APPROVE(blockers: なし)mergeable: MERGEABLE,merge_state_status: BLOCKED(Draft PR のため。実 Git conflict ではない)route_loop_verdict_v2()route:fail_closed(reason:merge_state_status_blocked_not_conflict_defer_to_ci_evaluator。human escalation ではなく、Draft 状態は current-head required-CI evaluator の判定に委ねる)visual-impact-policy-trustedのみ failure ですが、branch protection の required_status_checks 対象外であり、Issue/PR 本文双方にdeferredと明記済みの既知挙動です(workflow_runトリガーのため本 PR 自体では修正版 consumer の genuine runtime verification が成立しない)。対応した副次課題
.github/workflows/*の変更に伴う visual-surface dependency registry の required visual-impact policy check(VISUAL_IMPACT_DECLARATION_V1宣言ブロック欠落)を、baseline diff なしのverified_unchangeddisposition で解消次のアクション(人間判断待ち)
PR #2085 を Ready for review に変更し、マージしてください。マージ後は Issue 本文の deferred_verification_condition(#2070 を最新 main に更新して新規 CI run を発生させ、
visual-impact-policy-trustedの実検証結果を確認)に従い post-merge の runtime 検証を行ってください。IMPL_REVIEW_LOOP_RESULT_V1:
status: draft_pr_ready
pr_url: #2085
reviewed_head_sha: 9865e52
iterations: 1
fix: gh api --output unsupported flagをstdoutリダイレクトへ修正する (#2076) (#2085)
squne121 commentedon Aug 11, 2026
post-merge-cleanup: 完了 (2026-08-11T08:29:51Z)
worktree/branch(
worktree-issue-2076-visual-impact-trusted-consumer-yml-gh-ap)はクリーンアップ済みです。