Skip to content

test: build_publication_receipt() のbare-hex digest verbatim保存をAC10として回帰テスト追加する (#2555) - #2576

Merged
squne121 merged 3 commits into
mainfrom
worktree-issue-2555-close-evidence-publication-receipt-digest
Sep 8, 2026
Merged

squne121 merged 3 commits into
mainfrom
worktree-issue-2555-close-evidence-publication-receipt-digest

Conversation

@squne121

@squne121 squne121 commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

この PR は Issue #2555 の残作業のうち AC10(bare-hex digest verbatim保存の deterministic regression test)のみ を実装します。AC1〜AC9 は PR #2559(864e9fb7、main merge済み)で既に実装済みです。

新規テストファイル scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py を追加し、scripts/ci/build_close_evidence_bundle_v1.py の build_publication_receipt() が、actions/upload-artifact@v7 の実 output 形式(sha256: prefix のない bare 64-hex文字列)の github_artifact_digest を受け取った場合に、値を一切加工せず verbatim で publication receipt に保存することを検証します(test_publication_receipt_accepts_bare_hex_digest_verbatim)。既存の test_build_close_evidence_bundle_v1.py::test_close_evidence_json_excludes_github_upload_only_keys(sha256: prefix付きケースのみ検証)と対になる、prefixなし版のケースを新規ファイルで補完します。

build_publication_receipt() 自体(producer/validator の中核ロジック)は変更していません。既存テストファイルの変更もありません。

Checks

受け入れ条件の達成状況

Issue #2555 は現在 AC1〜AC10 の 10 個を持つ。AC1〜AC9 は先行 PR #2559(864e9fb7、main merge済み)で実装済みであり、本 PR はその上に AC10 のみを追加する。

検証コマンド結果

Issue #2555 の ## Verification Commands に記載された全コマンドを本 worktree(HEAD=db04c85f92d6b6945d2a70faa333503d55ee978e)で実行した結果:

# AC1
$ rg -n "close_evidence_source_artifact_id" .github/workflows/ci.yml
→ PASS (6 hits, baseline-expect: pass — PR #2559 で main 実装済み)
$ rg -n "close-evidence-publication: cross-run Reliability artifact readback" .github/workflows/ci.yml
→ PASS (1 hit, baseline-expect: pass)
$ rg -n "github.event.inputs.close_evidence_source_artifact_id != ''" .github/workflows/ci.yml
→ PASS (1 hit, baseline-expect: pass)

# AC2
$ rg -n "single Reliability close-grade artifact ID" .github/workflows/ci.yml
→ PASS (2 hits, baseline-expect: pass)
$ rg -n "not required: true -- shared workflow_dispatch namespace" .github/workflows/ci.yml
→ PASS (1 hit, baseline-expect: pass)

# AC3
$ rg -n "build_close_evidence_bundle_v1" .github/workflows/ci.yml
→ PASS (4 hits, baseline-expect: pass)

# AC4
$ rg -n "validate_close_evidence_bundle_v1" .github/workflows/ci.yml
→ PASS (3 hits, baseline-expect: pass)

# AC5
$ rg -n "close-evidence-bundle-v1" .github/workflows/ci.yml
→ PASS (2 hits, baseline-expect: pass)

# AC6
$ rg -n "build_publication_receipt" .github/workflows/ci.yml
→ PASS (1 hit, baseline-expect: pass)

# AC7
$ rg -n "close-evidence-publication-receipt-v1" .github/workflows/ci.yml
→ PASS (4 hits, baseline-expect: pass)

# AC8
$ uv run pytest scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py -v
→ 13 passed, 1 skipped
   SKIPPED reason: no close-grade eligible Reliability artifact found (SKIP は #2555 にとって
   受理可能な terminal disposition。close-blocking ではない)

# AC9
$ pnpm typecheck
→ PASS
$ pnpm lint
→ PASS (ESLint: No issues found)
$ pnpm test
→ PASS (108 files / 1939 tests passed)
$ pnpm build
→ PASS

# AC10
$ uv run pytest scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py -v
→ 1 passed

Allowed Paths 遵守

git diff --name-only main...HEAD(本 worktree、HEAD=db04c85f92d6b6945d2a70faa333503d55ee978e)で取得した本 PR の変更ファイルは以下の 1 件のみである。

  • scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py(新規作成)

Issue #2555 本文が定義する Allowed Paths 一覧は次のとおりである。

  • .github/workflows/ci.yml(本 PR では変更なし)
  • scripts/ci/build_close_evidence_bundle_v1.py(本 PR では変更なし)
  • scripts/ci/dispatch_close_evidence_publication_smoke_v1.py(本 PR では変更なし)
  • scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py(本 PR では変更なし)
  • scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py(本 PR で新規作成した唯一の変更ファイル)
  • docs/dev/ci-close-evidence-bundle.md(本 PR では変更なし)

本 PR が変更した唯一のファイル scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py は Allowed Paths に含まれており、過不足なく一致している。.github/workflows/ci.yml / scripts/ci/build_close_evidence_bundle_v1.py / scripts/ci/dispatch_close_evidence_publication_smoke_v1.py / scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py / docs/dev/ci-close-evidence-bundle.md(いずれも AC1〜AC9 として PR #2559 で既に main 実装済み)は本 PR では変更していない。

動作検証(Runtime Verification、AC8)

decision: immediate / applicable_acs: [AC8]。今回の変更範囲は AC10 のみですが、Verification Commands には AC8 も含まれるため実行しました。

Schema Change Applicability

  • decision: not_schema_change
  • reason: 新規テストファイルの追加のみであり、既存 schema(CI_CLOSE_EVIDENCE_PUBLICATION_RECEIPT_V1 を含む)の consumer が受け取る入力契約・スキーマ形状は変更していません。build_publication_receipt() 自体も変更していません。

Schema Consumer Inventory

N/A
reason: schema_change ではなく、新規 test ファイルの追加のみのため既存 consumer への before/after 差分は発生しません。

Safety Claim Matrix

Claim Implemented? Not controlled Evidence Follow-up
build_publication_receipt() は actions/upload-artifact@v7 の bare-hex(sha256: prefixなし)digest を加工せず verbatim で publication receipt に保存する yes N/A scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py::test_publication_receipt_accepts_bare_hex_digest_verbatim N/A

Notes

…回帰テスト追加する (#2555)

actions/upload-artifact@v7 の実output形式(sha256:prefixなしbare 64-hex)の
github_artifact_digestを受け取った場合にbuild_publication_receipt()が
値を加工せずverbatimでpublication receiptに保存することを検証する
deterministic regression testを新規ファイルとして追加する。
既存のsha256:prefix付きdigestのテスト(test_build_close_evidence_bundle_v1.py)
と対になる、prefixなし版のケースを補完する。producer/validatorの
中核ロジック自体は変更しない。
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Preview URL

✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2576/

The preview will be removed when this PR is closed.

@squne121

squne121 commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

impl-review-loop: 完了 (2026-09-07T21:52:00Z)

IMPL_REVIEW_LOOP_RESULT_V1:
  schema_version: 1
  status: draft_pr_ready
  pr_url: "https://github.com/squne121/loop-protocol/pull/2576"
  head_sha: "db04c85f92d6b6945d2a70faa333503d55ee978e"
  issue_number: 2555
  termination_reason: approved
  merge_ready: false
  iteration: 2

FOLLOW_UP_MATERIALIZATION_RESULT_V1:
  schema_version: 1
  materialized_by: impl-review-loop
  follow_up_issues: []
  note_only_observations: []

@squne121

squne121 commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

判定

REQUEST_CHANGESです。ただし実装バグではなく、テストが本来のAC10より広い契約を固定していることが理由です。修正量は小さく、2本目のテスト削除と説明文整理だけでほぼマージ可能です。

PR #2576 は current main の 864e9fb7 をbaseにした Draft PRで、変更対象は新規テスト1ファイルだけです。PR本文上も #2555 の残作業 AC10 のみを実装する位置付けです。 impl-review-loop は iteration 2 で APPROVE していますが、この判定には完全には同意しません。

Severity | Finding | 判定 -- | -- | -- P1 | 2本目のテストが REST API の sha256: prefix付きdigestまで build_publication_receipt() の正式入力契約として固定している | 修正推奨 / merge前 P2 | テスト・module docstringがAC10に対して過剰で、Issue/レビュー履歴まで大量に埋め込んでいる | 簡素化推奨 P3 | bare-hex equalityに加えて startswith / len を重複assertしている | 任意整理

P1 — REST digestまでproducer契約にしているのはscope逸脱

問題はこの2本目です。

test_publication_receipt_bare_hex_and_prefixed_digest_both_verbatim_distinct

このテストは、

bare-hex と sha256: prefixed の「two real digest wire shapes」を build_publication_receipt() がともに受け取る

という契約を固定しています。さらにmodule docstringは「both real wire shapes that build_publication_receipt() may actually receive from .github/workflows/ci.yml」とまで説明しています。

しかし current production topologyではそうなっていません。ci.yml は artifact A の upload stepから、

steps.upload-bundle.outputs.artifact-digest

をそのまま --github-artifact-digest に渡します。REST APIの digest を publication producer に入力する経路はありません。

公式 actions/upload-artifact@v7 も artifact-digest の例を 0fde654d... のような bare 64-hex としています。現行READMEは @v7 を案内し、最新リリースも v7.0.1 です。(GitHub) 一方、現在のGitHub Actions Artifacts REST APIのレスポンスは digest: "sha256:cfc323..." という prefix付きです。(GitHub Docs)

そして #2555 自身が既にこの境界を正しく切っています。finding #3 の disposition は、

action outputのbare digestは #2555 でverbatim保存し、REST readback時のprefix正規化は #2155 の責務

です。 AC10も要求しているのは名前付きの test_publication_receipt_accepts_bare_hex_digest_verbatim だけです。

したがって2本目は単なる余剰coverageではありません。将来、たとえば build_publication_receipt() を「upload-artifact outputしか受け付けない」と厳密化した場合、本来合法な変更をこのテストが regression として阻止します。

推奨修正は単純です。2本目を削除してください。module docstringも「REST APIには別表現が存在するが、それは #2155 readback側の責務」とだけ残し、「両方が .github/workflows/ci.yml から入る」という記述を削除するのが適切です。

P2 — AC10としてはもっと小さくてよい

build_publication_receipt() 自体は入力digestを単純にdictへ代入しているだけです。検証も正規化もありません。 したがってこのPRの価値は、複雑な処理のテストではなく、「将来ここに勝手なprefix正規化を入れない」という契約ロックです。

その目的なら1本目だけで十分です。現在のファイルには、OWNER anchor、SubAgent調査、Runtime Verification Ownership Disposition、既存テストの概算行番号など、実行結果に影響しない履歴情報がかなり入っています。 個人開発なら、この種のテストには「何を守るか」だけ残し、「なぜその判断に至ったか」はIssue側に置いた方が将来の認知負荷が低いです。

既存テストがprefix付きfixtureを使っていること自体は問題ありません。既存テストはpublication receiptのschema/key分離を主に見ており、digest wire-formatのauthorityではありません。

P3 — assertionは少し重複

1本目の

assert publication_receipt["github_artifact_digest"] == _BARE_HEX_DIGEST
assert not publication_receipt["github_artifact_digest"].startswith("sha256:")
assert len(publication_receipt["github_artifact_digest"]) == 64

は、先頭の完全一致だけで後ろ2件も論理的に保証されます。

壊れてはいませんが、今回の目的なら完全一致assertだけの方がfailure reasonも明快です。schema sanity部分も既存coverageと重複しているので、省いてもAC10の品質は落ちません。

一方、技術判断そのものは正しい

bare-hexを保存するというAC10の前提は正しいです。公式actionの仕様だけでなく、このrepositoryの現行 upload-artifact@v7 実行ログでも、実際にbare SHA-256が生成され、そのまま後段へ渡されていることを確認しました。

また、ここでREST用のnormalize helper、digest validator、signature、attestation、追加E2E harnessなどを導入する必要はありません。#2555 は publication route のproducer側、#2155 は実production artifactのreadback/binding検証側というownership分離が既に成立しています。#2155 は #2555 CLOSED後に最小実データでpublication routeをreadback確認し、その後44-runへ進む契約です。

これは今回の「個人趣味開発なのでハーネスを増やしすぎない」という前提にも合っています。

マージ前に要求する修正

最小修正は 2点だけです。

  1. test_publication_receipt_bare_hex_and_prefixed_digest_both_verbatim_distinct を削除する。

  2. module docstringから「bare/prefixed両方が build_publication_receipt() / .github/workflows/ci.yml の実入力」という説明を削除し、REST prefix差異は 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 readback ownershipだと簡潔に書く。

test_publication_receipt_accepts_bare_hex_digest_verbatim はそのまま残せば #2555 AC10 を満たします。新しいproduction code、security gate、追加runtime smokeは不要です。

この2点を直した後の判定は APPROVE でよいと見ます。現状のPRは機能的には安全ですが、テストを契約SSOTとして考えると、今の2本目を残してマージするメリットより将来の拘束コストの方が大きいです。

## 判定

REQUEST_CHANGESです。ただし実装バグではなく、テストが本来のAC10より広い契約を固定していることが理由です。修正量は小さく、2本目のテスト削除と説明文整理だけでほぼマージ可能です。

PR #2576 は current main の 864e9fb7 をbaseにした Draft PRで、変更対象は新規テスト1ファイルだけです。PR本文上も #2555 の残作業 AC10 のみを実装する位置付けです。 impl-review-loop は iteration 2 で APPROVE していますが、この判定には完全には同意しません。

Severity Finding 判定
P1 2本目のテストが REST API の sha256: prefix付きdigestまで build_publication_receipt() の正式入力契約として固定している 修正推奨 / merge前
P2 テスト・module docstringがAC10に対して過剰で、Issue/レビュー履歴まで大量に埋め込んでいる 簡素化推奨
P3 bare-hex equalityに加えて startswith / len を重複assertしている 任意整理

P1 — REST digestまでproducer契約にしているのはscope逸脱

問題はこの2本目です。

test_publication_receipt_bare_hex_and_prefixed_digest_both_verbatim_distinct

このテストは、

bare-hex と sha256: prefixed の「two real digest wire shapes」を build_publication_receipt() がともに受け取る

という契約を固定しています。さらにmodule docstringは「both real wire shapes that build_publication_receipt() may actually receive from .github/workflows/ci.yml」とまで説明しています。

しかし current production topologyではそうなっていません。ci.yml は artifact A の upload stepから、

steps.upload-bundle.outputs.artifact-digest

をそのまま --github-artifact-digest に渡します。REST APIの digest を publication producer に入力する経路はありません。

公式 actions/upload-artifact@v7 も artifact-digest の例を 0fde654d... のような bare 64-hex としています。現行READMEは @v7 を案内し、最新リリースも v7.0.1 です。([GitHub]1) 一方、現在のGitHub Actions Artifacts REST APIのレスポンスは digest: "sha256:cfc323..." という prefix付きです。([GitHub Docs]2)

そして #2555 自身が既にこの境界を正しく切っています。finding #3 の disposition は、

action outputのbare digestは #2555 でverbatim保存し、REST readback時のprefix正規化は #2155 の責務

です。 AC10も要求しているのは名前付きの test_publication_receipt_accepts_bare_hex_digest_verbatim だけです。

したがって2本目は単なる余剰coverageではありません。将来、たとえば build_publication_receipt() を「upload-artifact outputしか受け付けない」と厳密化した場合、本来合法な変更をこのテストが regression として阻止します。

推奨修正は単純です。2本目を削除してください。module docstringも「REST APIには別表現が存在するが、それは #2155 readback側の責務」とだけ残し、「両方が .github/workflows/ci.yml から入る」という記述を削除するのが適切です。

P2 — AC10としてはもっと小さくてよい

build_publication_receipt() 自体は入力digestを単純にdictへ代入しているだけです。検証も正規化もありません。 したがってこのPRの価値は、複雑な処理のテストではなく、「将来ここに勝手なprefix正規化を入れない」という契約ロックです。

その目的なら1本目だけで十分です。現在のファイルには、OWNER anchor、SubAgent調査、Runtime Verification Ownership Disposition、既存テストの概算行番号など、実行結果に影響しない履歴情報がかなり入っています。 個人開発なら、この種のテストには「何を守るか」だけ残し、「なぜその判断に至ったか」はIssue側に置いた方が将来の認知負荷が低いです。

既存テストがprefix付きfixtureを使っていること自体は問題ありません。既存テストはpublication receiptのschema/key分離を主に見ており、digest wire-formatのauthorityではありません。

P3 — assertionは少し重複

1本目の

assert publication_receipt["github_artifact_digest"] == _BARE_HEX_DIGEST
assert not publication_receipt["github_artifact_digest"].startswith("sha256:")
assert len(publication_receipt["github_artifact_digest"]) == 64

は、先頭の完全一致だけで後ろ2件も論理的に保証されます。

壊れてはいませんが、今回の目的なら完全一致assertだけの方がfailure reasonも明快です。schema sanity部分も既存coverageと重複しているので、省いてもAC10の品質は落ちません。

一方、技術判断そのものは正しい

bare-hexを保存するというAC10の前提は正しいです。公式actionの仕様だけでなく、このrepositoryの現行 upload-artifact@v7 実行ログでも、実際にbare SHA-256が生成され、そのまま後段へ渡されていることを確認しました。

また、ここでREST用のnormalize helper、digest validator、signature、attestation、追加E2E harnessなどを導入する必要はありません。#2555 は publication route のproducer側、#2155 は実production artifactのreadback/binding検証側というownership分離が既に成立しています。#2155 は #2555 CLOSED後に最小実データでpublication routeをreadback確認し、その後44-runへ進む契約です。

これは今回の「個人趣味開発なのでハーネスを増やしすぎない」という前提にも合っています。

マージ前に要求する修正

最小修正は 2点だけです。

  1. test_publication_receipt_bare_hex_and_prefixed_digest_both_verbatim_distinct を削除する。
  2. module docstringから「bare/prefixed両方が build_publication_receipt() / .github/workflows/ci.yml の実入力」という説明を削除し、REST prefix差異は 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 readback ownershipだと簡潔に書く。

test_publication_receipt_accepts_bare_hex_digest_verbatim はそのまま残せば #2555 AC10 を満たします。新しいproduction code、security gate、追加runtime smokeは不要です。

この2点を直した後の判定は APPROVE でよいと見ます。現状のPRは機能的には安全ですが、テストを契約SSOTとして考えると、今の2本目を残してマージするメリットより将来の拘束コストの方が大きいです。

@squne121

squne121 commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

推奨は、#2555 を入力に impl-review-loop を fresh invocation として再実行し、対象コメントを human_context_comment_urls として明示指定することです。impl-review-loop 自体がこの入力経路を持ち、Implementation → Verification → PR Review をそれぞれ SubAgent に委譲する設計です。

今回の実装 delta はかなり限定できます。#2555 AC10 が要求しているのは test_publication_receipt_accepts_bare_hex_digest_verbatim だけなので、2本目の prefixed-digest テストは削除してよいです。 実ファイルも現在、2本目のテストと「両 wire shape が ci.yml から producer に来る」という過剰な説明を持っています。 GitHub REST API の artifact digest は現在も sha256: prefix 付きで例示されており、producer 側の bare output 契約と readback 側の表現差を分ける判断は妥当です。([GitHub Docs]1)

さらに、テストを1本に減らすと現在のPR本文にある 2 passed が stale になるので、PR body hygiene も同じ iteration で更新させるのがよいです。PR #2576 は現在 Draft、head は db04c85f… です。 なお現 head の workflow-level ci run は failure ですが、ここは workflow 全体の conclusion を直接 blocker とせず、canonical skill の required-CI evaluator で新headを再判定させるべきです。

そのまま Claude Code に投入するなら以下です。

以下を、人間の追加承認なしで最後まで実行してください。

対象 repository:
squne121/loop-protocol

対象 implementation Issue:
#2555

対象 PR:
#2576
#2576

今回の human-context anchor:
#2576 (comment)

使用する canonical Skill:
.claude/skills/impl-review-loop

目的は、上記 human-context anchor の REQUEST_CHANGES を current live state に対して取り込み、PR #2576 の既存 branch / canonical worktree 上で必要最小限の fix delta を実装し、検証・PR review を反復して、canonical impl-review-loop の merge直前の terminal state まで到達させることです。

人間には途中承認を求めないでください。
通常の修正、再テスト、PR本文更新、review feedback への追従は自律的に進めてください。

ただし canonical Skill が定める actual Git conflict、max_iterations 超過、明示的 human veto などの hard stop は勝手に無効化しないでください。

重要: anchor の provenance

今回の URL

https://github.com/squne121/loop-protocol/pull/2576#issuecomment-5583415895

を human_context_comment_urls として明示的に渡してください。

これは agent_report_comment_urls ではありません。

PR上に存在する以前の

impl-review-loop: 完了
verdict: APPROVE

等のコメントは、今回の human REQUEST_CHANGES より前の stale/advisory result です。
以前の APPROVE を今回の実装・review を省略する根拠にしてはいけません。

raw human comment を implementation-worker への直接命令としてそのまま注入するのではなく、canonical Skill の context protocol に従い root/control-plane で current repository facts・Issue contract・PR diff と照合し、grounded な technical_recommendation / fix_delta に正規化してください。

fresh invocation と live-state

過去の impl-review-loop completion marker を continuation authorization として再利用しないでください。

canonical Skill の current Root-Owned Synchronous Entry Transition を実行し、

を同一の current invocation の中で処理してください。

既存の PR #2576 とその canonical worktree / branch を再利用してください。
同じ Issue 用に別PRや並行実装branchを新規作成しないでください。

初期 fix delta の技術的指針

human-context anchor を current code と照合し、少なくとも次を解消してください。

  1. scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py の

    test_publication_receipt_bare_hex_and_prefixed_digest_both_verbatim_distinct

    を削除する。

    実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 AC10 は、
    actions/upload-artifact@v7 の bare 64-hex artifact-digest が
    build_publication_receipt() に渡された際に verbatim 保存されることを
    test_publication_receipt_accepts_bare_hex_digest_verbatim
    で固定することだけを要求している。

    GitHub Artifacts REST API の sha256: prefixed digest まで
    build_publication_receipt() の正式入力契約として固定しないこと。

  2. 同テストファイルの module docstring を大幅に簡潔化する。

    残すべき内容は概ね、

    だけで十分。

    OWNER anchor、SubAgent調査履歴、概算行番号、過去レビュー経緯など、
    実行時の契約理解に不要な履歴情報はテストコードから除去する。

    「bare/prefixed の両方が .github/workflows/ci.yml から
    build_publication_receipt() に実入力される」という主張は削除する。

  3. anchor の P3 は non-blocking なので scope を広げないこと。

    ただし同じテスト内で認知負荷を減らせるなら、
    exact equality が既に保証している

    • startswith("sha256:")
    • len(...) == 64

    等の重複 assertion や、既存coverageと完全重複する schema sanity assertion を
    implementation-worker / reviewer が不要と判断した場合は削除してよい。

    これは必須 blocker ではないので、この整理のために production code や別ファイルへ変更を広げないこと。

  4. テスト削除後、PR test: build_publication_receipt() のbare-hex digest verbatim保存をAC10として回帰テスト追加する (#2555) #2576 本文を current head の事実に同期する。

    特に現在のPR本文に残っている

    2 passed

    等の test count は、fresh実行結果に合わせて更新すること。

    PR本文全体を確認し、
    「2種類のdigest shapeをこのPRで正式に回帰固定している」
    と誤読させる説明や、削除済みテストを前提にした evidence が残らないようにする。

    PR body hygiene のためだけに不要なコード変更を追加してはいけない。

scope boundary

今回の主対象は

scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py

です。

次を新規実装しないでください。

  • build_publication_receipt() production logic の変更
  • REST digest normalization helper
  • digest validator
  • publication receipt → artifact A binding validation
  • signature / attestation
  • 新しい E2E harness
  • 新しい security gate
  • 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 ownership の production verification の先取り
  • unrelated refactor

Issue #2555 の live Allowed Paths を authority としてください。
Allowed Paths 外が本当に必要になった場合は canonical stop/routing policy に従ってください。

SubAgent 実行について

canonical impl-review-loop の各 Step を SubAgent に委譲してください。

少なくとも、

  • Step 1: implementation-worker
  • Step 2: test-runner
  • Step 4: pr-reviewer / pr-review-judge

を実際に使用してください。

重要:
SubAgent を起動しただけで次の Step に進んではいけません。

各 SubAgent を起動したら、その SubAgent が処理を完了し、最終の structured result / report を返すまで必ず待ってください。

background launch receipt、agent ID、launch ledger、session manifest、
「起動成功」だけを作業完了の証拠として扱わないでください。

implementation-worker の完了結果を受領してから Step 2 へ進み、
test-runner の検証完了結果を受領して adjudication を済ませてから Step 4 へ進み、
pr-reviewer の current-head review 完了結果を受領してから Step 5 routing を行ってください。

SubAgent の完了を待たず root thread が同じ作業を横取りして実装・レビューすることも避けてください。
root/main thread は canonical Skill の control-plane / state tracking / routing に集中してください。

Verification

修正後の exact current head で canonical Step 2 を実行してください。

#2555 の live Verification Commands を authority として検証してください。

少なくとも AC10 の

uv run pytest scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py -v

を fresh に実行すること。

2本目のテストを削除した後は、正常ならこのファイルは原則 1 passed になる想定ですが、
期待値をハードコードせず実測結果を authority としてください。

#2555 が要求する他の Verification Commands も canonical Step 2 の規則に従って実行してください。

AC8 の bounded runtime smoke が source artifact 不在により SKIP する場合は、
#2555 の current contract が SKIP を受理可能な terminal disposition としていることを尊重し、
そのためだけに追加 harness や synthetic artifact を作らないでください。

CI

push 後は必ず 新しい current head SHA に対する CI を評価してください。

古い db04c85f... の成功・失敗結果を新headの証拠として再利用しないでください。

workflow run 全体の conclusion: failure だけを見て即座に production code を変更せず、
canonical

.claude/skills/impl-review-loop/scripts/wait_ci_checks.py

等の required-CI evaluator を authority としてください。

required checks が current head で本当に失敗しており、
かつ今回の変更に因果的に関係する場合だけ fix delta として扱ってください。

unrelated / advisory / draft-state由来の状態を直すために
.github/workflows/ci.yml や harness を不用意に変更しないでください。

review loop

Step 4 の pr-reviewer は、以前の APPROVEを再利用せず、
必ず修正後の exact current head を fresh review してください。

REQUEST_CHANGES の場合:

  • blockers を具体的な fix_delta に正規化
  • Step 1 implementation-worker に戻す
  • SubAgent 完了を待つ
  • current head で Step 2 を再実行
  • SubAgent 完了を待つ
  • current head で Step 4 を再実行
  • SubAgent 完了を待つ
  • Step 5 routing

を max_iterations の範囲で反復してください。

head が review 中に変化した場合は stale review を最終判定に使用せず、
canonical route_stale_head_rereview に従って current head を再reviewしてください。

BEHIND の場合も reviewer の自己申告ではなく、
canonical control-plane の live mergeability routing に従ってください。

autonomous boundary

以下について人間への途中確認は不要です。

  • 上記 anchor の修正
  • test/docstring の簡素化
  • redundant assertion の bounded cleanup
  • PR body hygiene
  • commit / push
  • test rerun
  • CI待機・current-head評価
  • reviewer REQUEST_CHANGES の修正
  • bounded loop の再実行
  • PRコメントへの canonical structured result 投稿

ただし merge は実行しないでください。

また canonical Skill の設計どおり、PR #2576 を人間の最終 merge judgment のため Draft のまま残してください。
mark ready for review を独断で実行しないでください。

目標 terminal state は、
current head に対して implementation / verification / PR review が完了し、
blocker が解消され、
canonical IMPL_REVIEW_LOOP_RESULT_V1.status: draft_pr_ready
相当まで到達していることです。

Issue close、PR merge、post-merge-cleanup は行わないでください。

終了時の報告

最後に簡潔に以下を報告してください。

  • final head SHA
  • iteration 数
  • 実際に変更したファイル
  • anchor P1 / P2 / P3 の disposition
  • Verification Commands の結果
  • current-head required CI の判定
  • final pr-reviewer verdict
  • live mergeability / routing result
  • IMPL_REVIEW_LOOP_RESULT_V1
  • merge以外に残っている blocker の有無

途中経過の説明のために処理を止めたり、人間への承認質問を挟んだりせず、
canonical hard stop が発生しない限り、上記 terminal state まで連続して実行してください。

この形なら、今回の REQUEST_CHANGES を確実に新しい入力として扱いつつ、以前の APPROVE に引きずられず、不要な REST normalization や harness 追加も避けられます。

squne121 and others added 2 commits September 8, 2026 19:58
)

pr-review-judge REQUEST_CHANGES P1 指摘に対応。
test_publication_receipt_bare_hex_and_prefixed_digest_both_verbatim_distinct は
build_publication_receipt() が sha256: プレフィックス付き digest も
.github/workflows/ci.yml からの実入力として受け取るかのように
プロダクション入力契約をロックしていたが、現行の production topology
(ci.yml は upload-artifact@v7 の bare-hex artifact-digest のみを渡す)
と一致せず、AC10 が要求するのは bare-hex verbatim ケースのみ。
該当テストを削除し、AC10 が要求する
test_publication_receipt_accepts_bare_hex_digest_verbatim のみ残す。
モジュール docstring も要点3点に簡略化し、
OWNER anchor comment / SubAgent 等のレビュー履歴由来の記述と、
現行 production topology と矛盾する記述を除去した。
@squne121

squne121 commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

impl-review-loop: fresh fix_delta review 完了(iteration 1, current-head再照合済み)

本コメントは、以前の impl-review-loop iteration 2 の APPROVE 完了後に投稿された human REQUEST_CHANGES(https://github.com/squne121/loop-protocol/pull/2576#issuecomment-5583415895)を受けた新規 fix_delta サイクルの結果です。過去の APPROVE / completion marker は continuation authorization として再利用していません。

Mergeability

Evidence Check(Issue #2555 Verification Commands, current head 独立実行)

  • AC1〜AC7: rg 全件 PASS
  • AC8: uv run pytest scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py -v → 13 passed, 1 skipped(SKIPはIssue #2555が明示的に受理可能と定めたterminal disposition)
  • AC9: pnpm typecheck / pnpm lint / pnpm test(108 files / 1939 tests)/ pnpm build 全て PASS
  • AC10: uv run pytest scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py -v → 1 passed(fix_delta後の実測値。PR本文も同期済み)
  • Allowed Paths compliance: PASS(変更ファイルは scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py の1件のみ)

Anchor blockers disposition

  • P1(テストが sha256:-prefixed digest まで producer 契約として固定していた): 解消。test_publication_receipt_bare_hex_and_prefixed_digest_both_verbatim_distinct を削除。build_publication_receipt() 本体は無変更。
  • P2(module docstring 過剰): 解消。AC10 bare-hex 保護 / wire-shape 差異 / 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 ownership の3点のみに簡潔化。
  • P3(assertion重複): non-blocking のため据え置き(worker判断で現状維持、blockerではない)。
  • PR本文 hygiene: 2 passed → 1 passed に同期、Safety Claim Matrixの該当行を削除済み。

Blockers

なし

verdict: APPROVE
reviewed_head_sha: "cd51299e3875cf91148f898bbccf9e37c52b3255"
blockers: []
warnings:
  - "merge_state_status=UNSTABLE due to draft status + unrelated non-required ci-verdict-summary job failure (repo-wide required-check-name drift also affecting #2575/#2561); not a content blocker for this PR"
  - "PR is Draft and must remain Draft; not a blocker to this review"

@squne121
squne121 marked this pull request as ready for review September 8, 2026 11:23
@squne121
squne121 merged commit 2dd034a into main Sep 8, 2026
49 of 65 checks passed
@squne121
squne121 deleted the worktree-issue-2555-close-evidence-publication-receipt-digest branch September 8, 2026 11:37
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.

実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する

1 participant