Skip to content

fix: pr_review_only VC の current-head 判定を修正する - #1544

Merged
squne121 merged 16 commits into
mainfrom
worktree-issue-1540-pr-review-only-vc-current-head-adjudication
Jul 18, 2026
Merged

squne121 merged 16 commits into
mainfrom
worktree-issue-1540-pr-review-only-vc-current-head-adjudication

Conversation

@squne121

@squne121 squne121 commented Jul 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Issue #1540 の current-head VC adjudication と CI verdict artifact binding を強化します。TEST_VERDICT_MACHINE/v2 では GitHub Actions artifact API の digest と payload の canonical hash を別フィールドに分離し、異なる意味の hash を成功根拠として混同しない fail-closed 境界にしました。

Checks

以下の証跡は、すべて current HEAD f681c50f6b7962ef15cf1e2e4cc08064cea97c37 に固定しています。

受け入れ条件の達成状況

  • AC1: pr_review_only の限定除外を current-head runtime evidence と結び付けるテストは 9 passed。
  • AC2: current-head runtime evidence のテストは 1 passed。
  • AC3: 不完全 evidence の fail-closed テストは 1 passed。
  • AC4: non-regression gate 全体は 19 passed。
  • AC5: complete coverage のテストは 2 passed。
  • AC6: TEST_VERDICT binding のテストは 1 passed。
  • AC7: expected contract fingerprint の allowed paths テストは 1 passed。
  • AC8: TEST_VERDICT/v2 provenance のテストは 1 passed。GitHub Actions artifact API digest を artifact.artifact_digest に必須化した。
  • AC9: per-AC coverage のテストは 1 passed。
  • AC10: PR head binding の CI verdict テストは 3 passed。
  • AC11: upload 済み artifact binding のテストは 2 passed。

検証コマンド結果

  • uv run --locked pytest .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py は 19 passed。
  • Issue 実装: pr_review_only VC の current-head adjudication を修正する #1540 の AC1–AC11 Verification Commands は current HEAD で exit 0 を確認した。
  • CI run 29645576063 は success。artifact readback は current HEAD と run/attempt の一致を確認した。

Runtime Verification Evidence(実行時検証の証跡)

  • binding artifact: ci-verdict-summary-v2-binding-29645576063-1、artifact id 8429960729、GitHub Actions API digest sha256:55566849c8622ff0e26361d4a3511758d745137631cb8aefe3a0f2d213435518
  • summary artifact API digest: sha256:f602fd…426d。binding artifact の digest や payload hash と同一視しない。
  • TEST_VERDICT artifact payload canonical hash: sha256:f89a8b…0d61。これは API artifact digest ではなく、payload 自体の integrity binding である。
  • ci_verdict_summary_v2.json の head_sha と expected_head_sha はともに f681c50f6b7962ef15cf1e2e4cc08064cea97c37。artifact reference は非空で、workflow run 29645576063 / attempt 1 に束縛される。

Allowed Paths 遵守

以下の許可済みパスだけを変更しています。

  • .claude/agents/test-runner.md(TEST_VERDICT の発行定義)
  • .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py(判定の fail-closed 検証)
  • .claude/skills/impl-review-loop/steps/step-2-verification.md(検証手順)
  • .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py(回帰テスト)
  • .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py(CI artifact の HEAD 束縛)
  • .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.py(CI artifact テスト)
  • .github/workflows/ci.yml(CI 実行定義)

Schema Change Applicability

  • decision: schema_change
  • reason: TEST_VERDICT_MACHINE/v2 の artifact provenance を、GitHub API の artifact_digest と payload integrity の artifact_payload_sha256 に分離する additive contract change である。

Schema Consumer Inventory

Before(変更前)

TEST_VERDICT_MACHINE/v2 の artifact 内 sha256 は、GitHub Actions artifact API の digest と payload integrity hash のどちらを表すか区別していなかった。

After(変更後)

artifact.artifact_digest は GitHub Actions artifact API の digest、artifact_payload_sha256 は canonical payload JSON の hash として別々に必須化する。

Consumer ファイル 更新有無 備考
.claude/agents/test-runner.md はい API readback digest と payload hash を別記録し、新規必須フィールドを生成する
.claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py はい 両 hash を別々に fail-closed 検証し、旧 artifact.sha256 単独の verdict は non-PASS とする
.claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py はい API artifact digest を remote readback と照合し、payload hash を API digest の代用にしない

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
pr_review_only の限定除外は authorization と current-head evidence の両方を要求する yes N/A AC1–AC9 と TEST_VERDICT/v2 N/A
CI verdict artifact は upload 前 payload と API digest を current HEAD に束縛する yes N/A AC10–AC11、run 29645576063 N/A

CI テスト性能の判断

CI_TEST_PERFORMANCE_DECISION_V1:
  schema: CI_TEST_PERFORMANCE_DECISION_V1
  issue_number: 1540
  pr_number: 1544
  decision_scope: ci_change
  changed_paths:
    - .github/workflows/ci.yml
    - .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py
    - .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.py
  lane_classification:
    fast_static: {applicable: true, evidence: ["workflow / Python lint"], required_commands: ["ruff check"]}
    python_unit: {applicable: true, evidence: ["AC1-AC11 pytest"], required_commands: ["Issue #1540 Verification Commands"]}
    contract_artifact: {applicable: true, evidence: ["TEST_VERDICT_MACHINE/v2 and ci_verdict_summary_v2"], required_commands: ["current-head artifact readback"]}
    integration: {applicable: true, evidence: ["pull_request workflow"], required_commands: ["required GitHub Actions checks"]}
  baseline_inputs: {ci_runtime_baseline_v1_available: false, run_count: 0, p50_p95_ready: false}
  artifact_consistency: {ci_test_selection_v1_checked: true, missing_pytest_args: []}
  risk_flags: [baseline_insufficient]
  reviewer_gate:
    approve_allowed: true
    required_evidence: [TEST_VERDICT_MACHINE, CI_CHECK_RUN_SCOPED, current-head artifact readback]
  follow_up_required: []

Notes

この本文は contract、親 Issue、証跡の境界を記録し、別 HEAD の結果を採用しません。

@github-actions

github-actions Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL

Preview removed (PR #1544 closed).

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES

Mergeability

  • reviewed head: 3a202d31b77f5bfc6cebcb716a6a908181e765ff
  • GitHub: MERGEABLE / BEHIND。Draft 状態は blocker ではありません。

Evidence Check

  • Linked Issue: PR 本文の Closes #1540 と、Issue #1540 の fresh snapshot(body SHA sha256:efbd52f508296e69f8bfdc981f97400c52b1d12a5bdae02b188daf9b2fb65b9d)をライブ照合しました。
  • AC/VC: reviewed HEAD の dedicated worktree で AC1=6 selected、AC2=1、AC3=1、AC4=13 passed。py_compile と git diff --check も pass です。pytest の deselected は -k の非選択であり、VC の SKIP・exit 77・fallback ではありません。
  • CI: ci_verdict_summary.py --expected-head-sha は all_pass。required CI、e2e、node-backed hook tests、deploy-pr は成功しています。ci_test_selection/v1 の G1 と head consistency の G4 も pass です。
  • Changed files: GitHub PR files API の 2 files はともに Issue contract の Allowed Paths に列挙されています(rename なし)。ただし snapshot に expected_contract_fingerprint がなく、Allowed Paths gate は indeterminate のままです。
  • Safety/schema: .claude/skills/** の変更のため safety-sensitive と判定。Safety Claim Matrix は存在し、限定 claim とテスト根拠は整合します。Schema Change Applicability は not_schema_change で、consumer schema の変更は diff から確認できません。

Blockers

  • fresh contract snapshot に expected_contract_fingerprint がなく、Allowed Paths gate が indeterminate(merge-blocking)です。

Required auto actions

  • PR本文に「受け入れ条件の達成状況」「検証コマンド結果」「Allowed Paths 遵守」を、AC ごとの [x] と current-head 根拠つきで補完する。
  • BEHIND を解消し、新 HEAD に対して CI / VC / review を再bindする。

LOOP_VERDICT_V2

verdict: REQUEST_CHANGES
reviewed_head_sha: "3a202d31b77f5bfc6cebcb716a6a908181e765ff"
merge_ready: false
mergeability:
  mergeable: "MERGEABLE"
  merge_state_status: "BEHIND"
blockers:
  - "allowed_paths_gate: expected_contract_fingerprint_missing により indeterminate(merge-blocking)"
required_auto_actions:
  - kind: update_pr_body_hygiene
    executor: implementation-worker
    skill: open-pr.update_pr
    blocking_merge_ready: true
    mechanical: true
  - kind: update_branch
    executor: implementation-worker
    skill: implement-issue.update_branch
    blocking_merge_ready: true
    mechanical: true
    expected_head_sha: "3a202d31b77f5bfc6cebcb716a6a908181e765ff"
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
  status: indeterminate
  changed_files_source: github_pull_request_files_api_with_previous_filename
  changed_files:
    - .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
    - .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py
  reason: "expected_contract_fingerprint_missing (merge-blocking)"
  producer_role: review_subagent
  worker_report_used_as_canonical: false
allowed_paths_gate_source: review_subagent

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES

Mergeability と証跡

  • reviewed head e4d95c81a397aabb6603e4c81272a0568fad7ca8 は live PR head と一致し、GitHub は MERGEABLE / CLEAN です。
  • current-head CI verdict は all_pass。required CI、e2e、node-backed hook tests、deploy-pr は成功しています。
  • Issue #1540 の AC1=6、AC2=1、AC3=1、AC4=13 は current-head worktree で PASS。py_compile と git diff --check も PASS です。VC の SKIP、exit 77、fallback はありません。
  • PR本文の AC/VC/Allowed Paths 根拠、Safety Claim Matrix、Schema Change Applicability(not_schema_change)を確認しました。変更 2 files は Issue contract の Allowed Paths 内で、rename はありません。

Blocker

  • fresh snapshot #issuecomment-4996876764(body SHA sha256:efbd52f508296e69f8bfdc981f97400c52b1d12a5bdae02b188daf9b2fb65b9d)には expected_contract_fingerprint がありません。Allowed Paths review gate は current head でも indeterminate となり、これは未 waiver の merge-blocking gate です。

前回の PR本文補完と update_branch は完了済みで、追加の機械的対応はありません。

LOOP_VERDICT_V2

verdict: REQUEST_CHANGES
reviewed_head_sha: "e4d95c81a397aabb6603e4c81272a0568fad7ca8"
merge_ready: false
mergeability:
  mergeable: "MERGEABLE"
  merge_state_status: "CLEAN"
blockers:
  - "allowed_paths_gate: expected_contract_fingerprint_missing により indeterminate(merge-blocking、未waive)"
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
  status: indeterminate
  changed_files_source: github_pull_request_files_api_with_previous_filename
  changed_files:
    - .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
    - .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py
  reason: "expected_contract_fingerprint_missing (merge-blocking)"
  producer_role: review_subagent
  worker_report_used_as_canonical: false
allowed_paths_gate_source: review_subagent

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最終手動レビュー(限定 waiver)

レビュー対象は current HEAD e4d95c81a397aabb6603e4c81272a0568fad7ca8 です。ライブ確認では MERGEABLE / CLEAN、ci_verdict_summary.py は all_pass、Issue #1540 の AC1=6、AC2=1、AC3=1、AC4=13 は current-head worktree で PASS、py_compile と git diff --check も PASS でした。

Issue #1540 fresh snapshot #issuecomment-4996876764 は OWNER 投稿で、PR 本文の fresh body SHA sha256:efbd52f508296e69f8bfdc981f97400c52b1d12a5bdae02b188daf9b2fb65b9d と一致します。GitHub PR files API の変更2ファイルは contract の Allowed Paths に一致し、rename はありません。PR 本文の AC/VC/Allowed Paths 根拠、Schema Change Applicability、Schema Consumer Inventory、Safety Claim Matrix を確認しました。

MANUAL_GATE_WAIVER_V1

pr_number: 1544
reviewed_head_sha: "e4d95c81a397aabb6603e4c81272a0568fad7ca8"
authorization: user_direct
waived_gates:
  - expected_contract_fingerprint_missing
scope: "PR #1544 and reviewed head e4d95c81a397aabb6603e4c81272a0568fad7ca8 only"
non_waived_gates:
  - head_consistency
  - issue_snapshot_body_sha_consistency
  - pr_body_evidence
  - allowed_path_fact_disclosure
  - verification_commands
  - current_head_ci
  - mergeability
  - schema
  - safety

事実として、snapshot に expected_contract_fingerprint がないため Allowed Paths gate は indeterminate のままです。これを ok とは扱いません。今回の waiver はこの一点だけに限定し、他の gate を免除しません。

LOOP_VERDICT_V2

verdict: APPROVE
reviewed_head_sha: "e4d95c81a397aabb6603e4c81272a0568fad7ca8"
merge_ready: true
mergeability:
  mergeable: "MERGEABLE"
  merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
  status: indeterminate
  changed_files_source: github_pull_request_files_api_with_previous_filename
  changed_files:
    - .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
    - .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py
  reason: "expected_contract_fingerprint_missing; manually waived for PR #1544 at reviewed head only"
  producer_role: review_subagent
  worker_report_used_as_canonical: false
allowed_paths_gate_source: review_subagent
manual_waiver_applied: true
manual_waiver_scope: "PR #1544 and reviewed head e4d95c81a397aabb6603e4c81272a0568fad7ca8 only; expected_contract_fingerprint_missing only"

@squne121

Copy link
Copy Markdown
Owner Author

判定

REQUEST_CHANGES / merge_ready: false

レビュー対象は、取得できた最終HEAD e4d95c81a397aabb6603e4c81272a0568fad7ca8 です。既存の手動waiverは expected_contract_fingerprint_missing だけに限定されており、以下の実装上の欠陥はwaiveされていません。

Issue #1540 の中心要件は、pr_review_only のbaseline項目を比較対象から外しても、同一HEADに束縛されたtest-runnerの実行結果が完全な場合だけPASSにすることです。現実装は、コマンドを実行せずに生成された skipped/go レコードをcurrent-head runtime evidenceとして受理します。AC2・AC3を満たしていません。


Findings

P0-1 — pr_review_only VCを一件も実行せず、全体PASSにできる

baseline_vc_preflight.py は preflight_scope=pr_review_only を見ると、evidence modeに関係なくコマンド実行前に次の値を設定します。

  • runner: skipped

  • exit_code: null

  • classification: skipped

  • decision: go

  • verification_owner: pr-review-judge

  • runtime_verification_required: false

deferred_reason には、検証をPR reviewへ委譲したと明記されています。つまり、これは実行証跡ではなく未実行のrouting recordです。

ところがproducer全体の status は、blocked または human_judgment がなければ pass のままです。全項目が skipped/go でもcurrent-headのHEAD・worktree検査だけを通れば、status: pass のenvelopeになります。

adjudicator側の _current_pass_envelope_is_certified() は、envelopeの status、body SHA、HEAD一致、changed pathsだけを確認しています。次を確認していません。

  • TEST_VERDICT_MACHINE

  • 各VCの実行有無

  • 各VCのexit code

  • verification_skipped_count

  • runtime_ac_results

  • evidence_mode

  • clean_before / clean_after

  • head_after_sha

  • producer schema・producer identity

そのうえ、current側の正規化済み項目が空で、除外項目が一件以上あり、envelopeが上記の弱い条件を満たすと、即座に overall_status: pass、per_ac: [] を返します。

実際、新規テストは「producer出力が classification=skipped であること」を確認した直後に、adjudicatorが pass と per_ac=[] を返すことを正しい挙動として固定しています。

反例

# AC1
# preflight-scope: pr_review_only
$ rg -q NEVER_PRESENT tracked.txt

tracked.txt に NEVER_PRESENT がなければ、実行時はexit 1です。しかし現経路ではコマンド自体が実行されないため、

producer: skipped/go + envelope status=pass
adjudicator: overall_status=pass, per_ac=[]

になります。

リポジトリ自身のtest-runner契約では、Verification Commandsを実行し、各コマンドのexit codeを記録し、明確に「SKIPはPASSではない」と定義しています。TEST_VERDICT_MACHINE には verification_skipped_count と各ACの runtime_ac_results が存在します。

また、PR Evidence Policyも、TEST_VERDICTまたはhead-bound CI evidenceがなければREQUEST_CHANGES、skipped はrequired passとして扱わない、と規定しています。

修正方針

pr_review_only のcurrent evidenceには、baseline producerのskip recordを使用してはいけません。TEST_VERDICT_MACHINE または同等のscoped CI check artifactを別入力として受け、各除外VCに対して以下を要求してください。

exact AC + canonical command hash mapping
head_sha == reviewed_head_sha == diff_head_sha
status == pass
exit_code == 0
fallback_detected == false
human_review_required == false
stop_condition_triggered == false
verification_skipped_count == 0
artifact_present == true  # 要求されるVCのみ

test verdictが取得できない場合は indeterminate とし、PASSにしないのが正しいfail-closedです。


P0-2 — 除外VCが一件あれば、通常VCのcurrent結果欠落も迂回できる

baselineに以下がある場合を考えます。

AC1: expected_fail        ← 通常の比較対象
AC2: pr_review_only skip  ← 除外対象

current payloadにAC2だけを含め、AC1を完全に落とすと、

  1. AC2は除外される

  2. normalized_current は空になる

  3. excluded_current_count > 0

  4. early returnでPASS

  5. その後の current_keys != set(baseline_by_key) 検査には到達しない

という流れになります。

既存のmixed testは、通常VCであるAC1をcurrent payloadにも含めているため、この欠落反例を検出しません。

修正方針

early returnを削除し、最初にbaselineを厳密に二分してください。

expected_regular_keys
expected_pr_review_only_keys

current側も同様に二分し、少なくとも次を先に検証します。

actual_regular_keys == expected_regular_keys
actual_pr_review_only_keys == expected_pr_review_only_keys

その後で各partitionの証跡を評価すべきです。not normalized_current をPASS条件に使用してはいけません。


P0-3 — 4件の除外VCに対して、1件だけ提示してもPASSになる

Issue #1540 のfresh contract snapshotには、AC1からAC4まで4件の pr_review_only VCがあります。4件とも runner=skipped、exit_code=null、classification=skipped です。

しかしcurrent側で管理しているのは excluded_current_count という整数だけです。baselineに存在する除外キー集合との完全一致を確認していません。したがって、4件中1件だけをcurrent payloadへ残しても、

excluded_current_count == 1
normalized_current == []
current_pass_certified == true

ならPASSです。

これはACごとのevidence completenessを破壊します。

修正方針

seen_excluded_current_keys: set[tuple[str, str]]

を保持し、次を必須にしてください。

seen_excluded_current_keys == excluded_pr_review_only_keys

不足、余剰、別hash、別ACはいずれも baseline_current_mapping_mismatch 相当でfail-closedにすべきです。


P1-1 — 「producer-authorized」が自己申告フィールドの一致に過ぎない

_is_producer_authorized_pr_review_only_skip() は、入力オブジェクト内の文字列・booleanを比較しているだけです。schema、署名、artifact、workflow run、check run、producer identityを確認していません。exit_code も認証条件に含まれていません。

したがって、呼び出し側が次のフィールドを手作業で埋めれば、「producer-authorized」と認識されます。

runner=skipped
scope_class=pr_review_only
classification=skipped
decision=go
category=preflight_scope_pr_review_only
verification_owner=pr-review-judge
deferred_reason=<non-empty>
runtime_verification_required=false

さらに _build_evidence_refs() は、入力がproducerによって認証されたかに関係なく、inline evidenceへ一律に validation_verdict: pass を付与しています。これは監査出力として誤解を招きます。

修正方針

最小構成として、evidenceへ次を持たせて検証してください。

schema / schema_version
producer_kind
repository
workflow_run_id
run_attempt
check_run_id
head_sha
canonical command hash
artifact digest
generated_at

GitHub Actions artifact APIのartifact recordにはSHA-256 digestとworkflow runのhead_shaが含まれるため、少なくともartifact digest・run ID・head SHAを一体として検証できます。(GitHub Docs)

より強い、持続的な証跡にする場合は、in-toto Statementの subject.digest と predicateType で対象artifactを束縛し、SLSA provenanceの buildDefinition、runDetails、builder.id でproducer実行を表現できます。(GitHub) GitHub ActionsのOIDC claimにも repository、run_id、workflow_sha などが含まれるため、producer identityとrun bindingに利用できます。(GitHub Docs)

ただし、attestationを生成するだけでは保証にならず、consumer側でpolicy verificationする必要があります。(GitHub Docs)


P1-2 — test-runner evidenceを要求しているが、adjudicatorに入力経路がない

Step 2はtest-runnerがVerification Commandsを実行し、TEST_VERDICT_MACHINE v1 を投稿すると定義しています。

一方、adjudicate_vc_result.py のCLI入力は次の4系統だけです。

--contract-snapshot-file
--current-vc-result-file
--diff-summary-file
--allowed-paths-file

TEST_VERDICT_MACHINE、test verdict file、CI check artifactを渡す引数がありません。

リポジトリ検索でも、current-vc-result-file を構築するtest-verdict adapterは確認できず、TEST_VERDICT_MACHINE とadjudicatorの接続はStep 2の文書上にしか見つかりません。

つまり、Issue #1540が要求するruntime evidenceを、現在のfunction signatureとCLIでは表現できません。

修正方針

次のいずれかが必要です。

  1. --test-verdict-file を追加し、adjudicator自身が TEST_VERDICT_MACHINE をparse・検証する。

  2. schema-governedなadapterを追加し、TEST_VERDICTから CURRENT_VC_RESULT_V2 を生成する。

  3. scoped GitHub check runをAPIで読み、head・workflow・job・commandを直接bindする。

この変更が現在のAllowed Paths外のstep、adapter、consumer更新を必要とするなら、Issue #1540のstop conditionを発火させてscopeを再定義すべきです。skip envelopeをruntime evidenceに読み替えることでscope内に押し込めるのは不適切です。


P1-3 — VC_ADJUDICATION_RESULT_V1 の意味論変更を not_schema_change としている

PR本文は decision: not_schema_change としています。

しかし本変更により、従来はempty current resultとして indeterminate だった状態から、次の新しい到達可能状態が追加されています。

schema: VC_ADJUDICATION_RESULT_V1
schema_version: 1
overall_status: pass
blocking: false
per_ac: []

early returnがこの状態を生成し、_result() は per_ac=[] かつ overall_status=pass の場合に blocking=false を返します。

リポジトリのSchema Governanceは、producer/consumer境界を越えてparse・validateされるmachine-readable contractをschemaとして扱うと定義しています。

したがって、フィールド追加がなくても、pass の意味と per_ac coverage invariantを変更するsemantic schema changeです。versionは依然として1のままです。

修正方針

少なくとも以下を行うべきです。

  • schema_change としてconsumer inventoryを作成する

  • overall_status=pass 時のcoverage invariantを定義する

  • 除外項目も per_ac に残す

例えば、

per_ac:
  - ac: AC1
    status: delegated_verified
    command_hash: sha256:...
    evidence_ref: test-verdict:run-...

のようにし、silentな per_ac=[] PASSを禁止する方が監査可能です。


CI・配布資産の証跡不整合

既存の最終手動レビューは、対象HEADについて ci_verdict_summary.py が all_pass と述べ、waiver対象を expected_contract_fingerprint_missing のみに限定しています。

一方、同HEADのworkflow runから配布された ci-verdict-summary-v2 artifactを展開すると、以下が記録されています。

expected_head_sha: e4d95c81a397aabb6603e4c81272a0568fad7ca8
head_sha: null
overall_status: stale_head_sha
next_action: refresh_head_sha

各checkも head_sha_match: false、blocking_merge_ready: true です。

  • CI verdict JSON

  • CI verdict artifact ZIP

  • ZIP SHA-256: cbaf1d0da732af0d6a82843420538e0c82dabdbc10e38e156bc53b483e64aa31

GitHub artifact metadataが持つdigestとworkflow-run head_sha は、artifactを特定のrunとcommitへ結び付けるために利用できます。(GitHub Docs) また、GitHubのupload/download artifactはSHA-256 digestを検証します。(GitHub Docs)

したがって、これは「CI jobが失敗している」という指摘ではなく、配布されたCI verdict artifact自体が all_pass の根拠になっていないという証跡blockerです。artifact生成タイミングまたはGitHub API取得処理を修正し、current HEADへ再bindする必要があります。

Pages previewの「verified live assets」は静的配布物の疎通確認です。今回変更されたPython adjudicatorの実行意味論を検証するものではありません。

Python JUnit artifactでは新規テストを含めて成功していますが、上記のとおりテスト自体がskip-only payloadをPASSとして期待しています。

  • Python JUnit artifact ZIP

  • ZIP SHA-256: d76399fd569a118f352cea9a55c23f2e9d1544e0d02e6b23f86fe227e4a4626c


推奨する実装構造

baseline_regular: dict[Key, BaselineVC]
baseline_pr_review_only: dict[Key, BaselineVC]

current_regular: dict[Key, CurrentVC]
test_verdict_results: dict[Key, RuntimeResult]

require set(current_regular) == set(baseline_regular)
require set(test_verdict_results) == set(baseline_pr_review_only)

for key, result in test_verdict_results.items():
require result.head_sha == expected_head
require result.status == "pass"
require result.exit_code == 0
require not result.fallback_detected
require not result.human_review_required
require not result.stop_condition_triggered
require result.artifact_present in {True, "not_required"}

全baseline keyについてper_ac entryを生成

require covered_keys == set(baseline_regular) | set(baseline_pr_review_only)

pr_review_only は「検証不要」という意味ではありません。producerの deferred_reason が示すとおり、baseline preflightでは実行せず、PR review/test-runnerで実行するというownership routingです。runtime_verification_required=false を「current evidence不要」と解釈してはいけません。


修正後に必要な負例テスト

シナリオ 期待結果
pr_review_only コマンドが実行されずproducerではskipped 非PASS
baselineに通常VC+除外VC、currentに除外VCだけ mapping mismatch
baselineに除外VCが4件、currentに1件だけ 非PASS
TEST_VERDICTの該当ACがskip / exit 77 非PASS
HEAD一致だが clean_after=false または head_after_sha drift 非PASS
evidence_mode=baseline をcurrent payload風に加工 非PASS
schema、run ID、artifact digestなしの手書きpayload 非PASS
全VCが正しく実行・完全一致 per_ac coverage付きPASS

結論

このPRは、baseline regression比較から pr_review_only を除外する部分までは妥当ですが、除外後の安全条件を実装できていません。

現在の実装は、

「current-headにあるclean worktree上で、PR reviewへ委譲されたVCが未実行である」

ことを、

「current-headでVCが実行されPASSした」

こととして扱っています。

加えて、early returnにより通常VCの欠落と除外VC集合の部分欠落も隠蔽できます。Issue #1540の中心的なfail-closed要件に反するため、現HEADのままのmergeは不適切です。

## 判定

REQUEST_CHANGES / merge_ready: false

レビュー対象は、取得できた最終HEAD e4d95c81a397aabb6603e4c81272a0568fad7ca8 です。既存の手動waiverは expected_contract_fingerprint_missing だけに限定されており、以下の実装上の欠陥はwaiveされていません。

Issue #1540 の中心要件は、pr_review_only のbaseline項目を比較対象から外しても、同一HEADに束縛されたtest-runnerの実行結果が完全な場合だけPASSにすることです。現実装は、コマンドを実行せずに生成された skipped/go レコードをcurrent-head runtime evidenceとして受理します。AC2・AC3を満たしていません。


Findings

P0-1 — pr_review_only VCを一件も実行せず、全体PASSにできる

baseline_vc_preflight.py は preflight_scope=pr_review_only を見ると、evidence modeに関係なくコマンド実行前に次の値を設定します。

  • runner: skipped
  • exit_code: null
  • classification: skipped
  • decision: go
  • verification_owner: pr-review-judge
  • runtime_verification_required: false

deferred_reason には、検証をPR reviewへ委譲したと明記されています。つまり、これは実行証跡ではなく未実行のrouting recordです。

ところがproducer全体の status は、blocked または human_judgment がなければ pass のままです。全項目が skipped/go でもcurrent-headのHEAD・worktree検査だけを通れば、status: pass のenvelopeになります。

adjudicator側の _current_pass_envelope_is_certified() は、envelopeの status、body SHA、HEAD一致、changed pathsだけを確認しています。次を確認していません。

  • TEST_VERDICT_MACHINE
  • 各VCの実行有無
  • 各VCのexit code
  • verification_skipped_count
  • runtime_ac_results
  • evidence_mode
  • clean_before / clean_after
  • head_after_sha
  • producer schema・producer identity

そのうえ、current側の正規化済み項目が空で、除外項目が一件以上あり、envelopeが上記の弱い条件を満たすと、即座に overall_status: pass、per_ac: [] を返します。

実際、新規テストは「producer出力が classification=skipped であること」を確認した直後に、adjudicatorが pass と per_ac=[] を返すことを正しい挙動として固定しています。

反例

# AC1
# preflight-scope: pr_review_only
$ rg -q NEVER_PRESENT tracked.txt

tracked.txt に NEVER_PRESENT がなければ、実行時はexit 1です。しかし現経路ではコマンド自体が実行されないため、

producer: skipped/go + envelope status=pass
adjudicator: overall_status=pass, per_ac=[]

になります。

リポジトリ自身のtest-runner契約では、Verification Commandsを実行し、各コマンドのexit codeを記録し、明確に「SKIPはPASSではない」と定義しています。TEST_VERDICT_MACHINE には verification_skipped_count と各ACの runtime_ac_results が存在します。

また、PR Evidence Policyも、TEST_VERDICTまたはhead-bound CI evidenceがなければREQUEST_CHANGES、skipped はrequired passとして扱わない、と規定しています。

修正方針

pr_review_only のcurrent evidenceには、baseline producerのskip recordを使用してはいけません。TEST_VERDICT_MACHINE または同等のscoped CI check artifactを別入力として受け、各除外VCに対して以下を要求してください。

exact AC + canonical command hash mapping
head_sha == reviewed_head_sha == diff_head_sha
status == pass
exit_code == 0
fallback_detected == false
human_review_required == false
stop_condition_triggered == false
verification_skipped_count == 0
artifact_present == true  # 要求されるVCのみ

test verdictが取得できない場合は indeterminate とし、PASSにしないのが正しいfail-closedです。


P0-2 — 除外VCが一件あれば、通常VCのcurrent結果欠落も迂回できる

baselineに以下がある場合を考えます。

AC1: expected_fail        ← 通常の比較対象
AC2: pr_review_only skip  ← 除外対象

current payloadにAC2だけを含め、AC1を完全に落とすと、

  1. AC2は除外される
  2. normalized_current は空になる
  3. excluded_current_count > 0
  4. early returnでPASS
  5. その後の current_keys != set(baseline_by_key) 検査には到達しない

という流れになります。

既存のmixed testは、通常VCであるAC1をcurrent payloadにも含めているため、この欠落反例を検出しません。

修正方針

early returnを削除し、最初にbaselineを厳密に二分してください。

expected_regular_keys
expected_pr_review_only_keys

current側も同様に二分し、少なくとも次を先に検証します。

actual_regular_keys == expected_regular_keys
actual_pr_review_only_keys == expected_pr_review_only_keys

その後で各partitionの証跡を評価すべきです。not normalized_current をPASS条件に使用してはいけません。


P0-3 — 4件の除外VCに対して、1件だけ提示してもPASSになる

Issue #1540 のfresh contract snapshotには、AC1からAC4まで4件の pr_review_only VCがあります。4件とも runner=skipped、exit_code=null、classification=skipped です。

しかしcurrent側で管理しているのは excluded_current_count という整数だけです。baselineに存在する除外キー集合との完全一致を確認していません。したがって、4件中1件だけをcurrent payloadへ残しても、

excluded_current_count == 1
normalized_current == []
current_pass_certified == true

ならPASSです。

これはACごとのevidence completenessを破壊します。

修正方針

seen_excluded_current_keys: set[tuple[str, str]]

を保持し、次を必須にしてください。

seen_excluded_current_keys == excluded_pr_review_only_keys

不足、余剰、別hash、別ACはいずれも baseline_current_mapping_mismatch 相当でfail-closedにすべきです。


P1-1 — 「producer-authorized」が自己申告フィールドの一致に過ぎない

_is_producer_authorized_pr_review_only_skip() は、入力オブジェクト内の文字列・booleanを比較しているだけです。schema、署名、artifact、workflow run、check run、producer identityを確認していません。exit_code も認証条件に含まれていません。

したがって、呼び出し側が次のフィールドを手作業で埋めれば、「producer-authorized」と認識されます。

runner=skipped
scope_class=pr_review_only
classification=skipped
decision=go
category=preflight_scope_pr_review_only
verification_owner=pr-review-judge
deferred_reason=<non-empty>
runtime_verification_required=false

さらに _build_evidence_refs() は、入力がproducerによって認証されたかに関係なく、inline evidenceへ一律に validation_verdict: pass を付与しています。これは監査出力として誤解を招きます。

修正方針

最小構成として、evidenceへ次を持たせて検証してください。

schema / schema_version
producer_kind
repository
workflow_run_id
run_attempt
check_run_id
head_sha
canonical command hash
artifact digest
generated_at

GitHub Actions artifact APIのartifact recordにはSHA-256 digestとworkflow runのhead_shaが含まれるため、少なくともartifact digest・run ID・head SHAを一体として検証できます。([GitHub Docs]1)

より強い、持続的な証跡にする場合は、in-toto Statementの subject.digest と predicateType で対象artifactを束縛し、SLSA provenanceの buildDefinition、runDetails、builder.id でproducer実行を表現できます。([GitHub]2) GitHub ActionsのOIDC claimにも repository、run_id、workflow_sha などが含まれるため、producer identityとrun bindingに利用できます。([GitHub Docs]3)

ただし、attestationを生成するだけでは保証にならず、consumer側でpolicy verificationする必要があります。([GitHub Docs]4)


P1-2 — test-runner evidenceを要求しているが、adjudicatorに入力経路がない

Step 2はtest-runnerがVerification Commandsを実行し、TEST_VERDICT_MACHINE v1 を投稿すると定義しています。

一方、adjudicate_vc_result.py のCLI入力は次の4系統だけです。

--contract-snapshot-file
--current-vc-result-file
--diff-summary-file
--allowed-paths-file

TEST_VERDICT_MACHINE、test verdict file、CI check artifactを渡す引数がありません。

リポジトリ検索でも、current-vc-result-file を構築するtest-verdict adapterは確認できず、TEST_VERDICT_MACHINE とadjudicatorの接続はStep 2の文書上にしか見つかりません。

つまり、Issue #1540が要求するruntime evidenceを、現在のfunction signatureとCLIでは表現できません。

修正方針

次のいずれかが必要です。

  1. --test-verdict-file を追加し、adjudicator自身が TEST_VERDICT_MACHINE をparse・検証する。
  2. schema-governedなadapterを追加し、TEST_VERDICTから CURRENT_VC_RESULT_V2 を生成する。
  3. scoped GitHub check runをAPIで読み、head・workflow・job・commandを直接bindする。

この変更が現在のAllowed Paths外のstep、adapter、consumer更新を必要とするなら、Issue #1540のstop conditionを発火させてscopeを再定義すべきです。skip envelopeをruntime evidenceに読み替えることでscope内に押し込めるのは不適切です。


P1-3 — VC_ADJUDICATION_RESULT_V1 の意味論変更を not_schema_change としている

PR本文は decision: not_schema_change としています。

しかし本変更により、従来はempty current resultとして indeterminate だった状態から、次の新しい到達可能状態が追加されています。

schema: VC_ADJUDICATION_RESULT_V1
schema_version: 1
overall_status: pass
blocking: false
per_ac: []

early returnがこの状態を生成し、_result() は per_ac=[] かつ overall_status=pass の場合に blocking=false を返します。

リポジトリのSchema Governanceは、producer/consumer境界を越えてparse・validateされるmachine-readable contractをschemaとして扱うと定義しています。

したがって、フィールド追加がなくても、pass の意味と per_ac coverage invariantを変更するsemantic schema changeです。versionは依然として1のままです。

修正方針

少なくとも以下を行うべきです。

  • schema_change としてconsumer inventoryを作成する
  • overall_status=pass 時のcoverage invariantを定義する
  • 除外項目も per_ac に残す

例えば、

per_ac:
  - ac: AC1
    status: delegated_verified
    command_hash: sha256:...
    evidence_ref: test-verdict:run-...

のようにし、silentな per_ac=[] PASSを禁止する方が監査可能です。


CI・配布資産の証跡不整合

既存の最終手動レビューは、対象HEADについて ci_verdict_summary.py が all_pass と述べ、waiver対象を expected_contract_fingerprint_missing のみに限定しています。

一方、同HEADのworkflow runから配布された ci-verdict-summary-v2 artifactを展開すると、以下が記録されています。

expected_head_sha: e4d95c81a397aabb6603e4c81272a0568fad7ca8
head_sha: null
overall_status: stale_head_sha
next_action: refresh_head_sha

各checkも head_sha_match: false、blocking_merge_ready: true です。

  • [CI verdict JSON](sandbox:/mnt/data/ci-verdict-summary-1544/ci_verdict_summary_v2.json)
  • [CI verdict artifact ZIP](sandbox:/mnt/data/ci-verdict-summary-1544.zip)
  • ZIP SHA-256: cbaf1d0da732af0d6a82843420538e0c82dabdbc10e38e156bc53b483e64aa31

GitHub artifact metadataが持つdigestとworkflow-run head_sha は、artifactを特定のrunとcommitへ結び付けるために利用できます。([GitHub Docs]1) また、GitHubのupload/download artifactはSHA-256 digestを検証します。([GitHub Docs]5)

したがって、これは「CI jobが失敗している」という指摘ではなく、配布されたCI verdict artifact自体が all_pass の根拠になっていないという証跡blockerです。artifact生成タイミングまたはGitHub API取得処理を修正し、current HEADへ再bindする必要があります。

Pages previewの「verified live assets」は静的配布物の疎通確認です。今回変更されたPython adjudicatorの実行意味論を検証するものではありません。

Python JUnit artifactでは新規テストを含めて成功していますが、上記のとおりテスト自体がskip-only payloadをPASSとして期待しています。

  • [Python JUnit artifact ZIP](sandbox:/mnt/data/python-test-junit-1544.zip)
  • ZIP SHA-256: d76399fd569a118f352cea9a55c23f2e9d1544e0d02e6b23f86fe227e4a4626c

推奨する実装構造

baseline_regular: dict[Key, BaselineVC]
baseline_pr_review_only: dict[Key, BaselineVC]

current_regular: dict[Key, CurrentVC]
test_verdict_results: dict[Key, RuntimeResult]

require set(current_regular) == set(baseline_regular)
require set(test_verdict_results) == set(baseline_pr_review_only)

for key, result in test_verdict_results.items():
    require result.head_sha == expected_head
    require result.status == "pass"
    require result.exit_code == 0
    require not result.fallback_detected
    require not result.human_review_required
    require not result.stop_condition_triggered
    require result.artifact_present in {True, "not_required"}

# 全baseline keyについてper_ac entryを生成
require covered_keys == set(baseline_regular) | set(baseline_pr_review_only)

pr_review_only は「検証不要」という意味ではありません。producerの deferred_reason が示すとおり、baseline preflightでは実行せず、PR review/test-runnerで実行するというownership routingです。runtime_verification_required=false を「current evidence不要」と解釈してはいけません。


修正後に必要な負例テスト

シナリオ 期待結果
pr_review_only コマンドが実行されずproducerではskipped 非PASS
baselineに通常VC+除外VC、currentに除外VCだけ mapping mismatch
baselineに除外VCが4件、currentに1件だけ 非PASS
TEST_VERDICTの該当ACがskip / exit 77 非PASS
HEAD一致だが clean_after=false または head_after_sha drift 非PASS
evidence_mode=baseline をcurrent payload風に加工 非PASS
schema、run ID、artifact digestなしの手書きpayload 非PASS
全VCが正しく実行・完全一致 per_ac coverage付きPASS

結論

このPRは、baseline regression比較から pr_review_only を除外する部分までは妥当ですが、除外後の安全条件を実装できていません。

現在の実装は、

「current-headにあるclean worktree上で、PR reviewへ委譲されたVCが未実行である」

ことを、

「current-headでVCが実行されPASSした」

こととして扱っています。

加えて、early returnにより通常VCの欠落と除外VC集合の部分欠落も隠蔽できます。Issue #1540の中心的なfail-closed要件に反するため、現HEADのままのmergeは不適切です。

@squne121

Copy link
Copy Markdown
Owner Author

Step 2 current-head verification

対象: Issue #1540 / PR #1544 / HEAD c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
fresh contract snapshot: #4997359279 / body SHA sha256:8616a071f5debf9914b18e00748bf66b0f739c2bb708d46b039a9def4c01ed85

TEST_VERDICT:
  schema: TEST_VERDICT_MACHINE/v1
  issue_number: 1540
  pr_number: 1544
  head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
  reviewed_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
  diff_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
  contract_body_sha256: sha256:8616a071f5debf9914b18e00748bf66b0f739c2bb708d46b039a9def4c01ed85
  run_id: "29541468468"
  run_url: https://github.com/squne121/loop-protocol/actions/runs/29541468468
  result: FAIL
  mergeable: MERGEABLE
  merge_state_status: UNSTABLE
  branch_behind_main: false
  baseline_only: false
  verification_commands_pass: 6
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - {ac: AC1, command_hash: sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "9 passed"}
    - {ac: AC2, command_hash: sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC3, command_hash: sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC4, command_hash: sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "16 passed"}
    - {ac: AC5, command_hash: sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "2 passed"}
    - {ac: AC6, command_hash: sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}

VC_ADJUDICATION_RESULT_V1:
  schema_version: 1
  overall_status: indeterminate
  blocking: true
  rerun_required: true
  errors: [test_verdict_result_not_pass]
  artifact_ref: vc-adjudication-private-bundle
  artifact_digest: sha256:3daf804e08c283e0bd7ca2b80fd89c5879df9f1f29fdb8f33f58d218cc5207bb
  source_integrity:
    evidence_complete: true
    evidence_fresh: true
    baseline_items_count: 6
    current_items_count: 6
    head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
    reviewed_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
    diff_summary_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43

AC1–AC6 の VC はすべて exit 0 / PASS で、skip・fallback はありません。一方、同じ HEAD の deploy-pr が失敗したため、TEST_VERDICT は FAIL、adjudication は fail-closed で blocking です。失敗 job: https://github.com/squne121/loop-protocol/actions/runs/29541468468/job/87764426135

@squne121

Copy link
Copy Markdown
Owner Author

Step 2 current-head verification

対象: Issue #1540 / PR #1544 / HEAD c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
fresh contract snapshot: #4997359279 / body SHA sha256:8616a071f5debf9914b18e00748bf66b0f739c2bb708d46b039a9def4c01ed85

TEST_VERDICT:
  schema: TEST_VERDICT_MACHINE/v1
  issue_number: 1540
  pr_number: 1544
  head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
  reviewed_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
  diff_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
  contract_body_sha256: sha256:8616a071f5debf9914b18e00748bf66b0f739c2bb708d46b039a9def4c01ed85
  run_id: "29541468468"
  run_url: https://github.com/squne121/loop-protocol/actions/runs/29541468468
  result: PASS
  mergeable: MERGEABLE
  merge_state_status: CLEAN
  branch_behind_main: false
  baseline_only: false
  verification_commands_pass: 6
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - {ac: AC1, command_hash: sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "9 passed"}
    - {ac: AC2, command_hash: sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC3, command_hash: sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC4, command_hash: sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "16 passed"}
    - {ac: AC5, command_hash: sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "2 passed"}
    - {ac: AC6, command_hash: sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, exit_code: 0, status: pass, fallback_detected: false, artifact_present: not_required, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}

VC_ADJUDICATION_RESULT_V1:
  schema_version: 1
  overall_status: pass
  blocking: false
  rerun_required: false
  errors: []
  artifact_ref: vc-adjudication-private-bundle
  artifact_digest: sha256:6d53336d8cee4fcf96f7163e90762a65f99f426642563b1e6ec00f8c59f412e7
  source_integrity:
    evidence_complete: true
    evidence_fresh: true
    baseline_items_count: 6
    current_items_count: 6
    head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
    reviewed_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43
    diff_summary_head_sha: c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43

AC1–AC6 の VC はすべて exit 0 / PASS で、skip・fallback はありません。同じ HEAD の deploy-pr rerun も SUCCESS です。https://github.com/squne121/loop-protocol/actions/runs/29541468468/job/87858826812

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST_CHANGES

Mergeability と current-head 証跡

  • reviewed head c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43 はライブ PR head と一致し、GitHub は MERGEABLE / CLEAN です。
  • Issue #1540 の fresh snapshot #issuecomment-4997359279 は status: go、body SHA sha256:8616a071f5debf9914b18e00748bf66b0f739c2bb708d46b039a9def4c01ed85 で、PR 本文と一致します。
  • Step 2 の最終 TEST_VERDICT_MACHINE/v1 は同一 HEAD・AC1--AC6・skip/fallback 0・result: PASS、VC_ADJUDICATION_RESULT_V1: pass/nonblocking を示します。レビュー worktree でも AC1=9、AC2=1、AC3=1、AC4=16、AC5=2、AC6=1 が PASS し、py_compile と git diff --check も PASS でした。
  • ci_verdict_summary.py --expected-head-sha c50... は all_pass(Passed 13、Failed 0)です。
  • current diff は4ファイルで、すべて Issue #1540 の Allowed Paths 内です。ローカルの git diff --name-status -M -z では rename はありません。

P0 照合

  • P0 の集合完全性は、通常VCと pr_review_only 除外VCを別集合として照合し、欠落を fail-closed にする実装・負例テストで確認できました。
  • P0 の実行済み証跡入力も、--test-verdict-file と ACごとの command hash / PASS / exit 0 / no fallback / no skip の検証で確認できました。

Blockers

  • fresh snapshot には expected_contract_fingerprint がありません。Allowed Paths gate を再計算すると indeterminate(expected_contract_fingerprint_missing (merge-blocking))です。過去 e4 HEAD 専用 waiver は current HEAD に適用できず、今回新規 waiver もありません。
  • P1-1 は未解消です。--test-verdict-file の任意 JSON にある run_id / https:// URL を文字列として検査するだけで、producer identity、repository、run attempt/check run、artifact digest、artifact と run/head の由来束縛を検証していません。自己申告 payload を実行証跡として通さないための provenance 検証を追加してください。
  • P1-3 は未解消です。VC_ADJUDICATION_RESULT_V1 が overall_status: pass と per_ac: [] を返す到達可能状態を残している一方、PR本文は not_schema_change / consumer inventory N/A としています。PASS時の全AC coverage invariant を明示し、既存 consumer への互換性判断を inventory に記録してください。固定 output contract の変更が必要なら Issue #1540 の Stop Condition に従い、正式な scope 再定義または別 Issue に分離してください。

Required auto action

  • PR本文に ## 検証コマンド結果 と ## Allowed Paths 遵守 を明示し、現HEADに再bindした根拠を配置してください(既存の Checks / AC本文だけでは required section を満たしません)。

LOOP_VERDICT_V2

LOOP_VERDICT_V2:
  verdict: REQUEST_CHANGES
  reviewed_head_sha: "c50f3a6fd67bde5dd8d3754f8ffa43777f5d1a43"
  merge_ready: false
  mergeability:
    mergeable: "MERGEABLE"
    merge_state_status: "CLEAN"
  blockers:
    - "allowed_paths_gate: expected_contract_fingerprint_missing により indeterminate(merge-blocking、current HEAD の waiver なし)"
    - "P1-1: TEST_VERDICT の producer/artifact provenance が検証されず、自己申告 payload を実行証跡として識別できない"
    - "P1-3: per_ac: [] PASS の semantic contract を not_schema_change としており、coverage invariant と consumer inventory がない"
  required_auto_actions:
    - kind: update_pr_body_hygiene
      executor: implementation-worker
      skill: open-pr.update_pr
      blocking_merge_ready: true
      mechanical: true
  auto_fix_applied: []
  follow_up_issue_requests: []
  allowed_paths_gate:
    status: indeterminate
    changed_files_source: git_diff_name_status_find_renames_z
    changed_files:
      - .claude/agents/test-runner.md
      - .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
      - .claude/skills/impl-review-loop/steps/step-2-verification.md
      - .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py
    reason: "expected_contract_fingerprint_missing (merge-blocking)"
    producer_role: review_subagent
    worker_report_used_as_canonical: false
  allowed_paths_gate_source: review_subagent

@squne121

Copy link
Copy Markdown
Owner Author

Step 2 current-head 検証

Issue #1540 / PR #1544 の current HEAD 71f915879922545bdd32dd60ffd4f4764f73cdfe を再取得して検証しました。fresh contract snapshot は #issuecomment-5010241016 です。

9 本の Verification Commands はすべて exit 0 でした。しかし同一 HEAD の required CI は python-test が失敗(Ruff check、job 88066317185)しているため、fail-closed で TEST_VERDICT は FAIL、VC adjudication は blocking とします。MERGEABLE / BEHIND は競合ではありません。

TEST_VERDICT:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  repository: squne121/loop-protocol
  issue_number: 1540
  pr_number: 1544
  head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
  reviewed_head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
  diff_head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
  contract_body_sha256: sha256:14882d8bd788e08bb6c829ae0cfee599170a76452a6350db1641fd76c3782a17
  run_id: "29639046663"
  run_url: https://github.com/squne121/loop-protocol/actions/runs/29639046663
  workflow_run_id: 29639046663
  workflow_run_attempt: 1
  check_run_id: 88066317185
  artifact:
    name: ci-verdict-summary-v2-29639046663-1
    sha256: sha256:5cb52b236ce6f6a11d62826c1a918c04be738ace7d732ef6f89033620c273525
    url: https://github.com/squne121/loop-protocol/actions/runs/29639046663/artifacts/8428039900
  artifact_payload:
    issue_number: 1540
    pr_number: 1544
    head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
    reviewed_head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
    diff_head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
    contract_body_sha256: sha256:14882d8bd788e08bb6c829ae0cfee599170a76452a6350db1641fd76c3782a17
    command_hashes: [sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, sha256:bd2baac4b934a7b606b83a9a9e17ed0b040539160cc85d65e2febaca8104baa6, sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, sha256:edd1610c08e0301fefad27377025ff566c349a52d1cf1ad0f781fa3b23418c8a, sha256:f30ce4012aebc14528a08f0a5efb842c4cd402995bb91c9a2eb4d8bd505d2708, sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850]
  result: FAIL
  mergeable: MERGEABLE
  merge_state_status: BEHIND
  branch_behind_main: true
  baseline_only: false
  verification_commands_pass: 9
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - {ac: AC1, command_hash: sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "9 passed"}
    - {ac: AC2, command_hash: sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC3, command_hash: sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC4, command_hash: sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "18 passed"}
    - {ac: AC5, command_hash: sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "2 passed"}
    - {ac: AC6, command_hash: sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC7, command_hash: sha256:bd2baac4b934a7b606b83a9a9e17ed0b040539160cc85d65e2febaca8104baa6, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC8, command_hash: sha256:f30ce4012aebc14528a08f0a5efb842c4cd402995bb91c9a2eb4d8bd505d2708, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC9, command_hash: sha256:edd1610c08e0301fefad27377025ff566c349a52d1cf1ad0f781fa3b23418c8a, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
VC_ADJUDICATION_RESULT_V1:
  schema_version: 1
  overall_status: indeterminate
  blocking: true
  rerun_required: true
  errors: [test_verdict_result_not_pass]
  artifact_ref: vc-adjudication-private-bundle
  artifact_digest: sha256:e4a9d8c55dadd5fc73b24e74f4bf4d0d20417c4a536e61277129011e66f52baa
  source_integrity:
    evidence_complete: true
    evidence_fresh: true
    baseline_items_count: 9
    current_items_count: 9
    head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
    reviewed_head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe
    diff_summary_head_sha: 71f915879922545bdd32dd60ffd4f4764f73cdfe

次の routing: REQUEST_CHANGES。current HEAD に対する python-test の失敗を解消し、同一 HEAD または新 HEAD で全 VC・CI・artifact を再検証してください。

@squne121

Copy link
Copy Markdown
Owner Author

Step 2 current-head 検証

Issue #1540 / PR #1544 の current HEAD 0b5da2ec6b24be0f7b21409e0dbde68688687706 を対象に、fresh contract snapshot #issuecomment-5010907953(body SHA sha256:8226dcdc188b20dec0d5de0857a39c7792b92222a702546761cf6ea4d8c917d3)へ束縛して再検証しました。AC1–AC11 はすべて exit 0、同一 HEAD の CI run 29644418119 は success、upload 済み binding artifact は current HEAD と run/attempt を一致させます。

TEST_VERDICT:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  repository: squne121/loop-protocol
  issue_number: 1540
  pr_number: 1544
  head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
  reviewed_head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
  diff_head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
  contract_body_sha256: sha256:8226dcdc188b20dec0d5de0857a39c7792b92222a702546761cf6ea4d8c917d3
  run_id: "29644418119"
  run_url: https://github.com/squne121/loop-protocol/actions/runs/29644418119
  workflow_run_id: 29644418119
  workflow_run_attempt: 1
  check_run_id: 88080481859
  artifact:
    name: ci-verdict-summary-v2-binding-29644418119-1
    sha256: sha256:0795ae979eec1563ef9d1f8880260cd15f6ef63917d6c7b7fc4f47eaa2f8bb50
    url: https://github.com/squne121/loop-protocol/actions/runs/29644418119/artifacts/8429633052
  artifact_payload:
    issue_number: 1540
    pr_number: 1544
    head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
    reviewed_head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
    diff_head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
    contract_body_sha256: sha256:8226dcdc188b20dec0d5de0857a39c7792b92222a702546761cf6ea4d8c917d3
    command_hashes: [sha256:05c24f3b254795ca50133485a6692202f15640026e185ffabdde9836276c1273, sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, sha256:9d5adf171dcb62573cdfd6f6b47cc431d032e8a8973293fab4b6566dcae0e5fc, sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, sha256:bd2baac4b934a7b606b83a9a9e17ed0b040539160cc85d65e2febaca8104baa6, sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, sha256:edd1610c08e0301fefad27377025ff566c349a52d1cf1ad0f781fa3b23418c8a, sha256:f30ce4012aebc14528a08f0a5efb842c4cd402995bb91c9a2eb4d8bd505d2708, sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850]
  result: PASS
  mergeable: MERGEABLE
  merge_state_status: CLEAN
  branch_behind_main: false
  baseline_only: false
  verification_commands_pass: 11
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - {ac: AC1, command_hash: sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "9 passed"}
    - {ac: AC2, command_hash: sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC3, command_hash: sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC4, command_hash: sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "18 passed"}
    - {ac: AC5, command_hash: sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "2 passed"}
    - {ac: AC6, command_hash: sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC7, command_hash: sha256:bd2baac4b934a7b606b83a9a9e17ed0b040539160cc85d65e2febaca8104baa6, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC8, command_hash: sha256:f30ce4012aebc14528a08f0a5efb842c4cd402995bb91c9a2eb4d8bd505d2708, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC9, command_hash: sha256:edd1610c08e0301fefad27377025ff566c349a52d1cf1ad0f781fa3b23418c8a, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed"}
    - {ac: AC10, command_hash: sha256:05c24f3b254795ca50133485a6692202f15640026e185ffabdde9836276c1273, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "3 passed"}
    - {ac: AC11, command_hash: sha256:9d5adf171dcb62573cdfd6f6b47cc431d032e8a8973293fab4b6566dcae0e5fc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "2 passed"}

CI verdict summary artifact の head_sha は current HEAD と一致し、binding artifact は non-empty reference(run/attempt/digest)を保持します。ci_verdict_summary.py は同じ HEAD で all_pass を返しました。

@squne121

Copy link
Copy Markdown
Owner Author
VC_ADJUDICATION_RESULT_V1:
  schema_version: 1
  overall_status: pass
  blocking: false
  rerun_required: false
  errors: []
  artifact_ref: vc-adjudication-private-bundle
  artifact_digest: sha256:fd7c95c72f7061d2b543b14c7715e6e6a0d57457efdbdc55b98e0519a87aaf2c
  source_integrity:
    evidence_complete: true
    evidence_fresh: true
    baseline_items_count: 11
    current_items_count: 11
    head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
    reviewed_head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
    diff_summary_head_sha: 0b5da2ec6b24be0f7b21409e0dbde68688687706
  per_ac:
    - {ac: AC1, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC2, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC3, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC4, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC5, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC6, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC7, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC8, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC9, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC10, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC11, status: pass, reason_code: pr_review_only_runtime_evidence_pass}

生成 artifact: artifacts/1544/step2-current-contract/adjudication.json。TEST_VERDICT_MACHINE/v2 と CI run 29644418119 の upload 済み binding artifact を入力に、全 AC の coverage を current HEAD 固定で確認しました。

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOOP_VERDICT_V2

LOOP_VERDICT_V2:
  verdict: REQUEST_CHANGES
  reviewed_head_sha: "0b5da2ec6b24be0f7b21409e0dbde68688687706"
  merge_ready: false
  mergeability:
    mergeable: MERGEABLE
    merge_state_status: CLEAN
  blockers:
    - "AC8/AC11: TEST_VERDICT が主張する artifact 8429633052 の digest sha256:0795... は、GitHub Actions artifact API の sha256:bd3d960d6e4c06a140a85fcda803b6937c2bfb08dd2ff5d5a07a6d3c24784e77 と不一致。current-head artifact provenance を fail-closed で拒否する。"
    - "PR本文の AC1-AC11 は [ ] のままで、各ACの達成根拠がない。"
  required_auto_actions: []
  auto_fix_applied: []
  follow_up_issue_requests: []
  allowed_paths_gate:
    status: ok
    changed_files_source: git_diff_name_status_find_renames_z
    changed_files:
      - .claude/agents/test-runner.md
      - .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
      - .claude/skills/impl-review-loop/steps/step-2-verification.md
      - .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py
      - .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py
      - .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.py
      - .github/workflows/ci.yml
  allowed_paths_gate_source: review_subagent

@squne121

Copy link
Copy Markdown
Owner Author

Step 2 current-head 検証

Issue #1540 / PR #1544 の current HEAD f681c50f6b7962ef15cf1e2e4cc08064cea97c37 を投稿直前に再取得しました。fresh contract snapshot は #issuecomment-5010907953(body SHA sha256:8226dcdc188b20dec0d5de0857a39c7792b92222a702546761cf6ea4d8c917d3)です。

AC1–AC11 はすべて exit 0、GitHub Actions run 29645576063(attempt 1)は同一HEADで success、PR は MERGEABLE / CLEAN です。Artifact API readback は summary と binding の run/head を一致させています。

Artifact API digest と canonical payload hash を区別して記録します。artifact.artifact_digest は GitHub Actions API の binding artifact digest、artifact_payload_sha256 は下記 canonical payload の SHA-256 であり、ZIP のハッシュではありません。

TEST_VERDICT:
  schema: TEST_VERDICT_MACHINE/v2
  producer_kind: test-runner
  repository: squne121/loop-protocol
  issue_number: 1540
  pr_number: 1544
  head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
  reviewed_head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
  diff_head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
  contract_body_sha256: sha256:8226dcdc188b20dec0d5de0857a39c7792b92222a702546761cf6ea4d8c917d3
  run_id: "29645576063"
  run_url: https://github.com/squne121/loop-protocol/actions/runs/29645576063
  workflow_run_id: 29645576063
  workflow_run_attempt: 1
  check_run_id: 88083443489
  artifact:
    name: ci-verdict-summary-v2-binding-29645576063-1
    artifact_digest: sha256:55566849c8622ff0e26361d4a3511758d745137631cb8aefe3a0f2d213435518
    url: https://github.com/squne121/loop-protocol/actions/runs/29645576063/artifacts/8429960729
  summary_artifact:
    name: ci-verdict-summary-v2-29645576063-1
    artifact_digest: sha256:f602fd57bc018179af717b4b135906fdb8c5fd0366b673ac321ed2f9e77e426d
    url: https://github.com/squne121/loop-protocol/actions/runs/29645576063/artifacts/8429960865
  artifact_payload:
    issue_number: 1540
    pr_number: 1544
    head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
    reviewed_head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
    diff_head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
    contract_body_sha256: sha256:8226dcdc188b20dec0d5de0857a39c7792b92222a702546761cf6ea4d8c917d3
    command_hashes: [sha256:05c24f3b254795ca50133485a6692202f15640026e185ffabdde9836276c1273, sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, sha256:9d5adf171dcb62573cdfd6f6b47cc431d032e8a8973293fab4b6566dcae0e5fc, sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, sha256:bd2baac4b934a7b606b83a9a9e17ed0b040539160cc85d65e2febaca8104baa6, sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, sha256:edd1610c08e0301fefad27377025ff566c349a52d1cf1ad0f781fa3b23418c8a, sha256:f30ce4012aebc14528a08f0a5efb842c4cd402995bb91c9a2eb4d8bd505d2708, sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850]
  artifact_payload_sha256: sha256:f89a8b224e9ca984f2b83ad970304906efba45e767128d41dca877ec9d430d61
  result: PASS
  mergeable: MERGEABLE
  merge_state_status: CLEAN
  branch_behind_main: false
  baseline_only: false
  verification_commands_pass: 11
  verification_commands_fail: 0
  verification_skipped_count: 0
  runtime_ac_results:
    - {ac: AC1, command_hash: sha256:5516e3baf3b5955c2c9aacff740b4d16a92c4f8b3e0bd1194d8208afacb51d1b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "9 passed, 10 deselected"}
    - {ac: AC2, command_hash: sha256:0dac6c02d3a0399b8430891dc9e88da452c27020e25c83e1ab52a7bfd8200400, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed, 18 deselected"}
    - {ac: AC3, command_hash: sha256:b519da797b5ea5c2f87ddc6870fe640ba39c834b7d76cc6e20115721f6e9a5cc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed, 18 deselected"}
    - {ac: AC4, command_hash: sha256:fa624bbbae9435ef572e066b943c5b30f507a808d6c6c9ca84456f45629dc850, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "19 passed"}
    - {ac: AC5, command_hash: sha256:cb22400b0d537bd8cd4aff5e3ca5e81fcbb303711f1b757a650a07b1b41b6e5b, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "2 passed, 17 deselected"}
    - {ac: AC6, command_hash: sha256:7566b2d69f67c36a8d2d6daa826749db285c9c258e2f1db12ea75b6fd6414f79, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed, 18 deselected"}
    - {ac: AC7, command_hash: sha256:bd2baac4b934a7b606b83a9a9e17ed0b040539160cc85d65e2febaca8104baa6, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed, 8 deselected"}
    - {ac: AC8, command_hash: sha256:f30ce4012aebc14528a08f0a5efb842c4cd402995bb91c9a2eb4d8bd505d2708, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "2 passed, 17 deselected"}
    - {ac: AC9, command_hash: sha256:edd1610c08e0301fefad27377025ff566c349a52d1cf1ad0f781fa3b23418c8a, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "1 passed, 18 deselected"}
    - {ac: AC10, command_hash: sha256:05c24f3b254795ca50133485a6692202f15640026e185ffabdde9836276c1273, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "3 passed, 3 deselected"}
    - {ac: AC11, command_hash: sha256:9d5adf171dcb62573cdfd6f6b47cc431d032e8a8973293fab4b6566dcae0e5fc, exit_code: 0, status: pass, fallback_detected: false, artifact_present: true, human_review_required: false, stop_condition_triggered: false, notes: "2 passed, 4 deselected"}
VC_ADJUDICATION_RESULT_V1:
  schema_version: 1
  overall_status: pass
  blocking: false
  rerun_required: false
  errors: []
  artifact_ref: vc-adjudication-private-bundle
  artifact_digest: sha256:783750b107d7f16ee3a26943eb9c5e70bc46f551cdca857c8c807ea48ee933ba
  source_integrity:
    evidence_complete: true
    evidence_fresh: true
    baseline_items_count: 11
    current_items_count: 11
    head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
    reviewed_head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
    diff_summary_head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
  per_ac:
    - {ac: AC1, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC10, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC11, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC2, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC3, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC4, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC5, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC6, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC7, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC8, status: pass, reason_code: pr_review_only_runtime_evidence_pass}
    - {ac: AC9, status: pass, reason_code: pr_review_only_runtime_evidence_pass}

生成入力: artifacts/1544/step2-f681-contract/。旧 0b5da2ec… の証跡・digest は本判定に使用していません。

@squne121 squne121 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOOP_VERDICT_V2

LOOP_VERDICT_V2:
  verdict: APPROVE
  reviewed_head_sha: f681c50f6b7962ef15cf1e2e4cc08064cea97c37
  merge_ready: true
  mergeability:
    mergeable: MERGEABLE
    merge_state_status: CLEAN
  blockers: []
  required_auto_actions: []
  auto_fix_applied: []
  follow_up_issue_requests: []
  allowed_paths_gate:
    status: ok
    changed_files_source: git_diff_name_status_find_renames_z
    changed_files:
      - .claude/agents/test-runner.md
      - .claude/skills/impl-review-loop/scripts/adjudicate_vc_result.py
      - .claude/skills/impl-review-loop/steps/step-2-verification.md
      - .claude/skills/impl-review-loop/tests/test_adjudicate_vc_result_non_regression_gate.py
      - .claude/skills/pr-review-judge/scripts/ci_verdict_summary_v2.py
      - .claude/skills/pr-review-judge/scripts/tests/test_ci_verdict_summary_v2.py
      - .github/workflows/ci.yml
  allowed_paths_gate_source: review_subagent

current head の TEST_VERDICT/v2、VC adjudication、CI run 29645576063、artifact API readback を照合しました。binding artifact 8429960729 の API digest は sha256:55566849c8622ff0e26361d4a3511758d745137631cb8aefe3a0f2d213435518、summary artifact 8429960865 は sha256:f602fd57bc018179af717b4b135906fdb8c5fd0366b673ac321ed2f9e77e426d であり、payload hash とは分離して正しく記録されています。AC1-AC11、Allowed Paths、Schema Consumer Inventory、Safety Claim Matrix とも判定可能です。

@squne121
squne121 marked this pull request as ready for review July 18, 2026 13:36
@squne121
squne121 merged commit 5992b2a into main Jul 18, 2026
26 checks passed
@squne121
squne121 deleted the worktree-issue-1540-pr-review-only-vc-current-head-adjudication branch July 18, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

実装: pr_review_only VC の current-head adjudication を修正する

1 participant