Skip to content

実装: ci.yml の producer を V3 evidence manifest へ切り替える(Phase B, Issue #2284 follow-up) #2384

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#2284"
goal_ref: "Issue #2284 Phase A(PR #2379、V3 evidence manifest schema/reader/dual-read/trusted-consumer 互換)が main へマージされた後、ci.yml の producer を実際に V3 writer・generic filename へ切り替える Phase B"
change_kind: workflow

Parent Issue

#2284

Parent Goal Ref

  • Goal: visual-impact-policy-trusted の decision/evidence artifact に run_attempt identity を結合し、attempt-specific artifact naming で stale/duplicate artifact を防ぐ
  • Desired Destination: ci.yml の producer が実際に V3 evidence manifest schema・generic filename を採用し、base-pinned evaluator(visual-impact-policy)と default-branch trusted consumer(visual-impact-policy-trusted)の両方が pre-merge で V3 経路を通す状態

Current Validated Scope

  • .github/workflows/ci.yml の Build VISUAL_BASELINE_REVIEW_EVIDENCE_V2 manifest ステップの CLI 呼び出しに --evidence-manifest-schema v3 を明示指定する
  • 同ステップに V3 writer が CLI 引数から独立に要求する identity 引数(--run-id "$GITHUB_RUN_ID" / --run-attempt "$GH_RUN_ATTEMPT" / --head-sha "$GH_HEAD_SHA")を追加する(resolve_visual_impact.py の _run_build_evidence_manifest() はこれらが欠けると error を追加し exit code 1 で終了するため、V3 スキーマ指定だけでは不十分)
  • 同ステップの出力ファイル名を version-neutral な visual_baseline_review_evidence.json に変更する(内部 tmp path・upload path・download 先・--evidence-manifest-file 参照の全箇所を一貫させる)
  • job summary の見出しを V3 表記に変更する
  • artifact 名 component-vrt-evidence-manifest-${{ github.run_attempt }} は現状維持する(Issue 実装: visual-impact-policy-trusted の decision/evidence artifact に run_attempt identity を結合する #2230 の attempt-specific naming 契約を変更しない)

Remaining Parent Gaps

Outcome

.github/workflows/ci.yml の producer が実際に V3 writer・generic filename へ切り替わり、PR 上で visual-impact-policy と visual-impact-policy-trusted の両方が green になっている状態。実装 PR は Closes #2384 を含める(#2284 は PR #2379 により既に closed 済みのため、本 Issue の実装 PR が closure target になる。Refs #2284, Refs #2379, Refs #2230 を併記する)。

Runtime Verification Applicability

decision: immediate
reason: "ci.yml の producer 切替は実際に GitHub Actions 上で visual-impact-policy / visual-impact-policy-trusted の両 check が green になることを確認しないと、Phase A/Phase B 間の version-skew(PR #2379 の敵対的レビューで指摘された事象)が再発していないことを証明できない。ローカルは静的配線確認のみ可能で、AC7 は GitHub-hosted PR CI のみを正本とする。"
applicable_acs:
  - AC7
execution_environment:
  cli_tools:
    - gh
  auth_required: true
  network_required: true
skip_conditions:
  - "gh コマンドまたは GitHub 認証が利用不能な場合は SKIP(exit 77)とし、PASS や merge-ready とは扱わない"
fallback_policy:
  fallback_success_is_pass: false
  notes: "check が出現しない状態や pending 状態を PASS に変換しない。visual-impact-policy と visual-impact-policy-trusted の両方が出現し bucket == pass になるまで bounded poll する"
artifact_requirements:
  - "PR 番号、検証開始時と終了時の同一 headRefOid、両 check の name/bucket/state/link を PR body の `## Runtime Verification Evidence` に inline 記録する"

In Scope

  • .github/workflows/ci.yml の evidence manifest 生成ステップに --evidence-manifest-schema v3 を追加する
  • 同ステップに --run-id "$GITHUB_RUN_ID", --run-attempt "$GH_RUN_ATTEMPT", --head-sha "$GH_HEAD_SHA" を追加する(既存ステップで既に環境変数として利用可能な値の再利用であり、新しい Python 実装・環境変数生成処理・ハーネスは不要)
  • .github/workflows/ci.yml 内の該当ファイル名参照(tmp 生成先・upload path・download 先・--evidence-manifest-file 引数)を visual_baseline_review_evidence.json(generic filename)に統一する
  • job summary の見出し文字列・step 名・近傍コメントを V3 表記へ更新する
  • 前提条件(Issue 実装: visual-impact evidence manifest schema を V3 化し run_attempt を digest 対象に含める #2284 Phase A / PR feat: visual-impact evidence manifest V3 の compatibility reader を追加する(Phase A) #2379 が main にマージ済みであること)を確認してから着手する
  • 実装 PR 本文に VISUAL_IMPACT_DECLARATION_V1(combat-hud-critical / combat-hud-running を verified_unchanged で宣言)を含める(.github/workflows/ci.yml は resolver の META_POLICY_PATHS に含まれるため、配線変更のみでも全登録 surface が affected 判定される)
  • 実装 PR 本文に Closes #2384, Refs #2284, Refs #2379, Refs #2230 を含める

Out of Scope

Acceptance Criteria

  • AC1: .github/workflows/ci.yml の evidence manifest producer 呼び出しに --evidence-manifest-schema v3, --run-id "$GITHUB_RUN_ID", --run-attempt "$GH_RUN_ATTEMPT", --head-sha "$GH_HEAD_SHA" がすべて指定されている
  • AC2: producer output・summary の cat・upload path・visual-impact-policy の --evidence-manifest-file がすべて visual_baseline_review_evidence.json を参照し、visual_baseline_review_evidence_v2.json が残っていない
  • AC3: Build step・Upload step・job summary の表記が V3 に更新され、VISUAL_BASELINE_REVIEW_EVIDENCE_V2 が残っていない
  • AC4: artifact 名 component-vrt-evidence-manifest-${{ github.run_attempt }} が変更されていない(upload・download 双方)
  • AC5: 実装 PR body に combat-hud-critical と combat-hud-running の verified_unchanged 宣言を含む VISUAL_IMPACT_DECLARATION_V1 がある
  • AC6: 実装 PR は Closes #2384 を含み、Refs #2284, Refs #2379, Refs #2230 を含む
  • AC7: 実装 PR の現在の head SHA に対して visual-impact-policy と visual-impact-policy-trusted の最新 check がどちらも pass している

Verification Commands

# AC1
$ rg -F -- '--evidence-manifest-schema v3' .github/workflows/ci.yml
$ rg -F -- '--run-id "$GITHUB_RUN_ID"' .github/workflows/ci.yml
$ rg -F -- '--run-attempt "$GH_RUN_ATTEMPT"' .github/workflows/ci.yml
$ rg -F -- '--head-sha "$GH_HEAD_SHA"' .github/workflows/ci.yml

# AC2
$ rg -F -- '--manifest-output /tmp/visual_baseline_review_evidence.json' .github/workflows/ci.yml
$ rg -F -- 'cat /tmp/visual_baseline_review_evidence.json' .github/workflows/ci.yml
$ rg -F -- '--evidence-manifest-file evidence-manifest-download/visual_baseline_review_evidence.json' .github/workflows/ci.yml
# preflight-scope: pr_review_only
$ rg -F --files-without-match 'visual_baseline_review_evidence_v2.json' .github/workflows/ci.yml

# AC3
$ rg -n "VISUAL_BASELINE_REVIEW_EVIDENCE_V3" .github/workflows/ci.yml
# preflight-scope: pr_review_only
$ rg -F --files-without-match 'VISUAL_BASELINE_REVIEW_EVIDENCE_V2' .github/workflows/ci.yml

# AC4
# preflight-scope: pr_review_only
$ test "$(rg -F -c 'name: component-vrt-evidence-manifest-${{ github.run_attempt }}' .github/workflows/ci.yml)" -eq 2

# AC5
# preflight-scope: pr_review_only
$ rg -n "VISUAL_IMPACT_DECLARATION_V1" pr_body.md

# AC6
# preflight-scope: pr_review_only
$ rg -n "Closes #2384" pr_body.md

# AC7
# preflight-scope: runtime_only
$ gh pr checks "$PR_NUMBER" --repo squne121/loop-protocol --json name,bucket,state,startedAt,completedAt,link

Allowed Paths

  • .github/workflows/ci.yml

Stop Conditions

実装中にこれらの状況が発生したら直ちに作業を停止し、Issue comment に状況を記録して人間の判断を待つ。

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合
  • Phase A の merge commit 8a0598aef882260ceb00eb70efee959a6751aeeb が作業ブランチの ancestor でない場合(着手前提が未成立)
  • 動作検証 AC(AC7)の VC が SKIP(exit 77)を返した場合(実行環境不可のためエスカレーション)
  • fallback 経由でのみ「成功」する場合(FAIL として扱い、実行環境を確認する)
  • 証跡取得の開始時と終了時で PR の headRefOid が変わった場合(証跡取り直し)

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(任意)

N/A

Notes for Reviewer

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    agent/implementer
    on Aug 28, 2026
  2. squne121 commented on Aug 29, 2026

    @squne121
    OwnerAuthor

    敵対的レビュー結果

    verdict: REQUEST_CHANGES
    recommended_disposition: reframe_in_place
    implementation_readiness: blocked
    after_contract_fix: go
    repository_change_scope: .github/workflows/ci.yml only
    new_test_harness_required: false
    security_scope_expansion_required: false

    Phase A の設計と段階導入方針は妥当です。PR #2379 は 8a0598aef882260ceb00eb70efee959a6751aeeb として main にマージ済みで、main は現在もこのコミットを指しています。default branch 側の trusted consumer も legacy/generic の両ファイル名を受理できる状態です。したがって再設計は不要で、Phase B は本来 ci.yml だけの小さな変更で完結できます。

    ただし、現在の Issue #2384 をそのまま実装すると確実に CI が失敗する P0 欠落があります。加えて、PR 完了管理、visual-impact 宣言、ランタイム検証、#2287 の依存関係にも修正が必要です。

    [P0] V3 writer に必須の identity 引数が Scope から抜けている

    Issue #2384 は producer 呼び出しに --evidence-manifest-schema v3 を追加することしか要求していません。

    しかし、Phase A で実装された V3 writer は top-level envelope の次の三値を、surface record からではなくCLI 引数から独立に取得します。

    • --run-id
    • --run-attempt
    • --head-sha

    いずれかが欠けると error を追加し、workflow_run_id: null などを含む不正 manifest を書いたうえで終了コード1を返します。これは推測ではなく、現在の _run_build_evidence_manifest() の実装そのものです。

    一方、現行 ci.yml の呼び出しは次の三引数を一切渡していません。

    --mode build-evidence-manifest
    --surface-inputs-file surface_inputs.json
    --manifest-output /tmp/visual_baseline_review_evidence_v2.json

    同じステップ内の surface_inputs.json には GITHUB_RUN_ID、GH_RUN_ATTEMPT、GH_HEAD_SHA から identity が入っていますが、それだけでは V3 envelope には伝わりません。

    必要な最小修正は以下です。

    uv run --locked python3 scripts/agent-ops/resolve_visual_impact.py \
      --mode build-evidence-manifest \
      --surface-inputs-file surface_inputs.json \
      --evidence-manifest-schema v3 \
      --run-id "$GITHUB_RUN_ID" \
      --run-attempt "$GH_RUN_ATTEMPT" \
      --head-sha "$GH_HEAD_SHA" \
      --manifest-output /tmp/visual_baseline_review_evidence.json

    既に同じステップで使っている環境変数を再利用するだけなので、新しい Python 実装、環境変数生成処理、ハーネスは不要です。

    [P1] 実装 PR に VISUAL_IMPACT_DECLARATION_V1 が必要

    .github/workflows/ci.yml は resolver の META_POLICY_PATHS に含まれています。このため、内容が数行の配線変更だけでも、全登録 surface が affected と判定されます。

    現行 registry の対象は次の二つです。

    • combat-hud-running
    • combat-hud-critical

    両方とも disposition_required: true です。

    policy evaluator は affected surface に対応する PR body 宣言がない場合、明示的に missing VISUAL_IMPACT_DECLARATION_V1 entry として失敗します。つまり、コードが完全に正しくても PR body が不足していれば visual-impact-policy は green になりません。

    Issue の AC または Notes for Implementer に、実装 PR 本文へ次を入れることを追加してください。

    ## VISUAL_IMPACT_DECLARATION_V1
    
    ```yaml
    schema: VISUAL_IMPACT_DECLARATION_V1
    surfaces:
      - surface_id: combat-hud-critical
        disposition: verified_unchanged
      - surface_id: combat-hud-running
        disposition: verified_unchanged
    ```

    描画コード、baseline、VRT spec は変更しないため、verified_unchanged が妥当です。PR #2379 でも同じ宣言形式が使われています。

    [P1] Closes #2284 と dependency graph が壊れている

    Issue #2384 の Outcome と Notes は、実装 PR に Closes #2284 を要求しています。しかし #2284 は PR #2379 により既に閉じられています。このままでは Phase B をマージしても、実際に閉じるべき #2384 が open のまま残ります。

    さらに GitHub の dependency metadata 上、現在 #2384 は閉鎖済みの #2284 を blocking しています。Phase A の完了 Issue を後続 Phase B がブロックしている逆向きの関係です。

    修正は以下です。

    PR:
    Closes #2384
    Refs #2284
    Refs #2379
    Refs #2230
    

    GitHub metadata は次の形に直すのが自然です。

    削除: #2384 blocks #2284
    追加: #2387 is blocked by #2384
    

    親子関係を履歴用途で維持すること自体は問題ありません。誤っているのは blocking の向きと closure target です。

    [P1] #2287 の実行ゲートが旧 Phase 名のまま

    #2287 は現在も、実行条件を「#2284 Phase B が main へ merge」と記述しています。しかし #2284 は Phase A のみとして閉じられ、Phase B の正本は #2384 に移りました。自動オーケストレーションが body を文字どおり評価すると、#2287 が永続的に待機する可能性があります。

    #2287 の以下の参照をすべて更新してください。

    - #2284 Phase B が main へ merge
    + #2384 の実装 PR が main へ merge

    GitHub dependency も #2287 blocked by #2384 に設定します。これは repo の Allowed Paths を広げる変更ではなく、Issue metadata の整合修正です。

    [P1] Runtime Verification 契約が実行不能

    1. runtime marker の形式が違う

    Issue は AC5 にバッククォート付きで runtime-verification: true と書いていますが、SSOT が要求する正確な形式は HTML comment です。

    <!-- runtime-verification: true -->

    decision: immediate なのにこのタグがない場合、issue-contract-review では blocker になります。さらに SKIP は終了コード77、fallback 成功は FAIL、証跡は PR body に添付する必要があります。

    AC は次の形にしてください。

    - [ ] AC7: 実装 PR の現在の head SHA に対して
      `visual-impact-policy` と `visual-impact-policy-trusted` の両 check が
      pass している <!-- runtime-verification: true -->

    2. gh pr checks --json name,conclusion は無効

    gh pr checks の JSON フィールドに conclusion はありません。利用可能なのは name、bucket、state、link、startedAt、completedAt などです。また pending 状態では終了コード8になります。現在の AC5 コマンドは実装の正否にかかわらず引数エラーになり得ます。([cli.github.com]1)

    最低限、次のフィールドを使う必要があります。

    gh pr checks "$PR_NUMBER" \
      --repo squne121/loop-protocol \
      --json name,bucket,state,startedAt,completedAt,link

    判定条件は、最新の各 check について bucket == "pass" です。

    3. trusted check の出現待ちが必要

    visual-impact-policy-trusted は workflow_run の completed を起点に default branch 側の workflow が非同期で生成します。したがって、source CI の check が揃った瞬間に一度だけ gh pr checks を実行すると、trusted check がまだ作成されていない可能性があります。これは GitHub のイベント仕様から導かれる運用上の推論です。([docs.github.com]2)

    成功条件は単なる「現在見える check が全部 pass」ではなく、次の三条件にしてください。

    1. visual-impact-policy が存在して pass。
    2. visual-impact-policy-trusted が存在して pass。
    3. 証跡取得前後で PR の headRefOid が変わっていない。

    両 check が出現するまで bounded poll し、存在しない状態を PASS にしてはいけません。gh または認証が利用不能なら終了コード77、check の failure・cancel・期限内未出現は終了コード1です。

    また、「ローカルまたは PR CI で確認」という記述は修正が必要です。ローカルでは default-branch workflow_run と CheckRun publication を再現できません。ローカルは静的配線確認、AC7 は GitHub-hosted PR CI のみを正本にしてください。

    [P1] AC2 の rg -c は正しい状態で失敗する

    現在の AC2 は以下です。

    rg -c "visual_baseline_review_evidence_v2" .github/workflows/ci.yml

    ripgrep は一致なしの場合に終了コード1を返します。そのため、legacy 名を完全に除去した正しい状態で VC が失敗します。([github.com]3)

    否定条件は次のように書く必要があります。

    if rg -F -n 'visual_baseline_review_evidence_v2.json' .github/workflows/ci.yml; then
      echo "FAIL: legacy V2 filename remains" >&2
      exit 1
    fi

    また、AC1 と AC3 は単なる文字列の存在確認なので、コメントに文字列を書いただけでも通ります。必要な呼び出し位置と、禁止文字列の不在を同時に検証すべきです。

    [P2] V2 表記は summary だけでなく step 名とコメントにも残る

    現行 ci.yml には次の human-facing 表記があります。

    Build VISUAL_BASELINE_REVIEW_EVIDENCE_V2 manifest
    Upload VISUAL_BASELINE_REVIEW_EVIDENCE_V2 manifest
    ### VISUAL_BASELINE_REVIEW_EVIDENCE_V2
    

    さらに、download 後の検証コメントも build_evidence_from_manifest_v2 のみを使うと説明しており、V3 cutover 後は誤った説明になります。

    同じ ci.yml 内なので、次も一緒に更新してください。

    Build VISUAL_BASELINE_REVIEW_EVIDENCE_V3 manifest
    Upload VISUAL_BASELINE_REVIEW_EVIDENCE_V3 manifest
    ### VISUAL_BASELINE_REVIEW_EVIDENCE_V3
    

    近傍コメントも「V3 producer/V2・V3 schema dispatch」に合わせます。機能上の blocker ではありませんが、CI ログの診断性を損なうため Phase B で直すのが適切です。

    [P2] Stop Conditions が自己矛盾している

    現在の Stop Conditions には次が含まれます。

    • 後続 Phase・別スコープへの波及が判明した場合
    • 外部サービス利用が必要な場合
    • nested SubAgent delegation が必要な場合
    • 新規 Issue が必要と判断した場合

    しかしこの Issue は、最初から Phase C と #2287 を認識しており、AC5 は GitHub Actions という外部サービスを必須としています。文字どおり適用すると、着手直後に stop します。

    個人開発の進行を止めないため、Stop Conditions は次だけで十分です。

    ## Stop Conditions
    
    - Phase A の merge commit
      `8a0598aef882260ceb00eb70efee959a6751aeeb`
      が作業ブランチの ancestor でない場合
    - V3 producer cutover を成立させるために
      `.github/workflows/ci.yml` 以外の repository file 修正が必要と判明した場合
    - GitHub-hosted runtime verification が `gh`・認証・権限不足で実行不能な場合
      (SKIP exit 77。PASS や merge-ready とは扱わない)
    - PR head が証跡取得中に更新された場合

    SubAgent 利用、新規 Issue の提案、既知の後続 Phase は stop 条件から外してください。

    維持すべき設計

    以下は現在の Issue の方針どおりで問題ありません。

    • repository file の Allowed Paths は .github/workflows/ci.yml のみ。
    • resolve_visual_impact.py は変更しない。
    • visual-impact-trusted-consumer.yml は変更しない。
    • V2 reader・legacy fallback の削除は Phase C へ残す。
    • artifact 名 component-vrt-evidence-manifest-${{ github.run_attempt }} は維持する。
    • Actions バージョン更新、permissions 変更、OIDC、attestation、actionlint、新規 pytest は追加しない。

    GITHUB_RUN_ATTEMPT は rerun ごとに増えるため、attempt-specific artifact 名を維持する判断は正しいです。upload-artifact の artifact は immutable であり、download-artifact は exact artifact name で取得して指定先へ展開するため、artifact 名を変えず ZIP 内のファイル basename だけ generic 化する設計にも問題はありません。([GitHub Docs]4)

    推奨 Acceptance Criteria

    ## Acceptance Criteria
    
    - [ ] AC1: Phase A merge commit
      `8a0598aef882260ceb00eb70efee959a6751aeeb`
      が作業ブランチの ancestor である
    
    - [ ] AC2: evidence manifest producer の実 CLI 呼び出しに
      `--evidence-manifest-schema v3`,
      `--run-id "$GITHUB_RUN_ID"`,
      `--run-attempt "$GH_RUN_ATTEMPT"`,
      `--head-sha "$GH_HEAD_SHA"`
      がすべて指定されている
    
    - [ ] AC3: producer output、summary の `cat`、upload path、
      `visual-impact-policy` の `--evidence-manifest-file` がすべて
      `visual_baseline_review_evidence.json` を参照し、
      `visual_baseline_review_evidence_v2.json` が残っていない
    
    - [ ] AC4: Build step、Upload step、job summary の表記が V3 に更新され、
      `VISUAL_BASELINE_REVIEW_EVIDENCE_V2` が残っていない
    
    - [ ] AC5: upload と same-run download の artifact 名がどちらも
      `component-vrt-evidence-manifest-${{ github.run_attempt }}` のままである
    
    - [ ] AC6: 実装 PR body に `combat-hud-critical` と
      `combat-hud-running` の `verified_unchanged` 宣言を含む
      `VISUAL_IMPACT_DECLARATION_V1` がある
    
    - [ ] AC7: 実装 PR の現在の head SHA に対して
      `visual-impact-policy` と `visual-impact-policy-trusted` の
      最新 check がどちらも pass している
      <!-- runtime-verification: true -->
    
    - [ ] AC8: 実装 PR は `Closes #2384` を含み、
      `Refs #2284`, `Refs #2379`, `Refs #2230` を含む

    推奨静的 Verification Commands

    set -euo pipefail
    
    workflow=.github/workflows/ci.yml
    phase_a_commit=8a0598aef882260ceb00eb70efee959a6751aeeb
    
    git cat-file -e "${phase_a_commit}^{commit}"
    git merge-base --is-ancestor "$phase_a_commit" HEAD
    
    # V3 writer と envelope identity の完全な配線
    rg -F -- '--evidence-manifest-schema v3' "$workflow"
    rg -F -- '--run-id "$GITHUB_RUN_ID"' "$workflow"
    rg -F -- '--run-attempt "$GH_RUN_ATTEMPT"' "$workflow"
    rg -F -- '--head-sha "$GH_HEAD_SHA"' "$workflow"
    
    # generic basename の全 consumer seam
    rg -F -- '--manifest-output /tmp/visual_baseline_review_evidence.json' "$workflow"
    rg -F -- 'cat /tmp/visual_baseline_review_evidence.json' "$workflow"
    rg -F -- 'path: /tmp/visual_baseline_review_evidence.json' "$workflow"
    rg -F -- \
      '--evidence-manifest-file evidence-manifest-download/visual_baseline_review_evidence.json' \
      "$workflow"
    
    # legacy basename・表示名の不在
    if rg -F -n 'visual_baseline_review_evidence_v2.json' "$workflow"; then
      echo 'FAIL: legacy V2 filename remains' >&2
      exit 1
    fi
    
    if rg -F -n 'VISUAL_BASELINE_REVIEW_EVIDENCE_V2' "$workflow"; then
      echo 'FAIL: stale V2 step/summary label remains' >&2
      exit 1
    fi
    
    # upload と same-run download の2箇所で attempt-specific name を維持
    test "$(
      rg -F -c \
        'name: component-vrt-evidence-manifest-${{ github.run_attempt }}' \
        "$workflow"
    )" -eq 2
    
    git diff --check

    推奨 Runtime Verification の判定条件

    gh pr checks は bounded poll し、各 name の最新行を抽出して次を満たした場合だけ PASS とします。

    def latest($name):
      [ .[] | select(.name == $name) ]
      | sort_by(.startedAt // "")
      | last;
    
    (latest("visual-impact-policy")) as $policy
    | (latest("visual-impact-policy-trusted")) as $trusted
    | (
        $policy != null
        and $trusted != null
        and $policy.bucket == "pass"
        and $trusted.bucket == "pass"
      )

    問い合わせフィールドは以下です。

    gh pr checks "$PR_NUMBER" \
      --repo squne121/loop-protocol \
      --json name,bucket,state,startedAt,completedAt,link

    証跡には、PR 番号、検証開始時と終了時の同一 headRefOid、両 check の name・bucket・state・link を保存し、PR body の ## Runtime Verification Evidence に inline で転記します。tracked script や新規ハーネスを追加する必要はありません。

    最終判断

    Issue #2384 は閉じたり再起票したりせず、本文を reframe-in-place してから実装するべきです。

    必須修正は次の五点です。

    1. V3 producer に三つの identity 引数を追加する。
    2. PR body の visual-impact 宣言を契約化する。
    3. Closes #2384 と正しい dependency graph に直す。
    4. Runtime AC の marker・gh fields・出現待ち・証跡を直す。
    5. 調査: visual-impact-policy-trusted の attempt-specific artifact naming を実 CI rerun (run_attempt>=2) で検証する #2287 の gate を 実装: ci.yml の producer を V3 evidence manifest へ切り替える(Phase B, Issue #2284 follow-up) #2384 に付け替える。

    これらを直した後は、ci.yml 一ファイルの小さな PRとしてそのまま進めてよいです。追加の security hardening、permissions 変更、新規テスト基盤、Action upgrade は品質向上よりワークフロー摩擦の方が大きいため、Phase B の merge 条件に含めないのが妥当です。

  3. squne121 commented on Aug 29, 2026

    @squne121
    OwnerAuthor

    Issue Refinement Loop 完了報告

    anchor comment(OWNER 敵対的レビュー: https://github.com/squne121/loop-protocol/issues/2384#issuecomment-5459088653)を起点に issue-refinement-loop を実行しました。

    Reviewed body_sha256: sha256:93847235999f51d67e77976a451a425db00b7ac3238599fbb88880c53d8ea61b

    Final Gate

    • termination_cause: approved
    • next: impl-review-loop への handoff 判定は root_entry_router.py の判定に従う
    schema: LOOP_HANDOFF_RESULT_V1
    issue_number: 2384
    repo: squne121/loop-protocol
    reviewed_body_sha256: sha256:93847235999f51d67e77976a451a425db00b7ac3238599fbb88880c53d8ea61b
    issue_kind: implementation
    termination_cause: approved
  4. squne121 commented on Aug 29, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  5. self-assigned this
    on Aug 29, 2026
  6. squne121 commented on Aug 29, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-08-29T10:40:00Z)

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      pr_url: "https://github.com/squne121/loop-protocol/pull/2388"
      head_sha: "9cad64a7063ce1f012bb03cbadba75409e1ea576"
      issue_number: 2384
      termination_reason: approved
      merge_ready: true
      iteration: 0
    
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations:
        - dedupe_key: "issue-2384-runtime-evidence-run-id-freshness"
          source_url: "https://github.com/squne121/loop-protocol/pull/2388#issuecomment-5459494317"
          source_note_id: "pr-reviewer-warning-1"
          summary: "PR body の Runtime Verification Evidence table が review 時点よりやや古い run ID を記載しているが、両 check とも同一 head で SUCCESS のため記録のみで follow-up 起票は不要と判断"
    
    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-08-29T10:40:00Z"
      rollup_plan_ref:
        body_sha256: null
        generated_at: null
      decision: skipped
      executed_actions: []
      skipped_reason: "preparation Step 2.5 は#1860 Owner Decisionによりmanual advisory diagnosticであり、本イテレーションでは実行しなかった"
      candidates_reviewed: []
  7. squne121 commented on Aug 29, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-08-29T11:26:00Z)

    補足: OWNER が COMMENT レビュー(https://github.com/squne121/loop-protocol/pull/2388#issuecomment-5459644421)で evidence_blocker を指摘。fix_delta(PR ready 化・最終CI待機・証跡コメント記録・P2 typo修正)を1周実行し、独立検証で懸念解消を確認、pr-reviewer が新 head で再度 APPROVE。

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      pr_url: "https://github.com/squne121/loop-protocol/pull/2388"
      head_sha: "dc5ea9c9cdc0c2d05c45635224d2cbd86487e761"
      issue_number: 2384
      termination_reason: approved
      merge_ready: true
      iteration: 1
    
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations:
        - dedupe_key: "issue-2384-body-evidence-table-stale-by-design"
          source_url: "https://github.com/squne121/loop-protocol/pull/2388#issuecomment-5459742973"
          source_note_id: "pr-reviewer-warning-iteration-1"
          summary: "PR body の Runtime Verification Evidence table は旧 head/run ID のまま残存。OWNER自身の指示(body再編集禁止)どおりの意図的設計であり follow-up 不要"
        - dedupe_key: "issue-2287-phase-b-merge-sha-linkage"
          source_url: "https://github.com/squne121/loop-protocol/pull/2388#issuecomment-5459644421"
          source_note_id: "owner-p2-followup"
          summary: "OWNER指摘: マージ後に #2287 へ Phase B merge SHA(#2388のmerge commit)を追記する必要あり。#2388自体には取り込まない。マージ後のpost-merge-cleanupフェーズで人間または別作業として対応"
    
    ISSUE_SCOPE_ROLLUP_DECISION_V2:
      schema_version: 2
      recorded_at: "2026-08-29T11:26:00Z"
      rollup_plan_ref:
        body_sha256: null
        generated_at: null
      decision: skipped
      executed_actions: []
      skipped_reason: "preparation Step 2.5 は#1860 Owner Decisionによりmanual advisory diagnosticであり、本イテレーションでは実行しなかった"
      candidates_reviewed: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent/implementerenhancementphase/implementationtriage-required

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions