Repository navigation
test: build_publication_receipt() のbare-hex digest verbatim保存をAC10として回帰テスト追加する (#2555) - #2576
Conversation
…回帰テスト追加する (#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の 中核ロジック自体は変更しない。
Preview URL✅ verified live assets: https://squne121.github.io/loop-protocol/pr-2576/ The preview will be removed when this PR is closed. |
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: [] |
判定REQUEST_CHANGESです。ただし実装バグではなく、テストが本来のAC10より広い契約を固定していることが理由です。修正量は小さく、2本目のテスト削除と説明文整理だけでほぼマージ可能です。 PR #2576 は current P1 — REST digestまでproducer契約にしているのはscope逸脱問題はこの2本目です。
このテストは、
という契約を固定しています。さらにmodule docstringは「both real wire shapes that しかし current production topologyではそうなっていません。
をそのまま 公式 そして #2555 自身が既にこの境界を正しく切っています。finding #3 の disposition は、 action outputのbare digestは #2555 でverbatim保存し、REST readback時のprefix正規化は #2155 の責務 です。 AC10も要求しているのは名前付きの したがって2本目は単なる余剰coverageではありません。将来、たとえば 推奨修正は単純です。2本目を削除してください。module docstringも「REST APIには別表現が存在するが、それは #2155 readback側の責務」とだけ残し、「両方が P2 — AC10としてはもっと小さくてよい
その目的なら1本目だけで十分です。現在のファイルには、OWNER anchor、SubAgent調査、Runtime Verification Ownership Disposition、既存テストの概算行番号など、実行結果に影響しない履歴情報がかなり入っています。 個人開発なら、この種のテストには「何を守るか」だけ残し、「なぜその判断に至ったか」はIssue側に置いた方が将来の認知負荷が低いです。 既存テストがprefix付きfixtureを使っていること自体は問題ありません。既存テストはpublication receiptのschema/key分離を主に見ており、digest wire-formatのauthorityではありません。 P3 — assertionは少し重複1本目の は、先頭の完全一致だけで後ろ2件も論理的に保証されます。 壊れてはいませんが、今回の目的なら完全一致assertだけの方がfailure reasonも明快です。schema sanity部分も既存coverageと重複しているので、省いてもAC10の品質は落ちません。 一方、技術判断そのものは正しいbare-hexを保存するというAC10の前提は正しいです。公式actionの仕様だけでなく、このrepositoryの現行 また、ここで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点だけです。
この2点を直した後の判定は APPROVE でよいと見ます。現状のPRは機能的には安全ですが、テストを契約SSOTとして考えると、今の2本目を残してマージするメリットより将来の拘束コストの方が大きいです。 ## 判定REQUEST_CHANGESです。ただし実装バグではなく、テストが本来のAC10より広い契約を固定していることが理由です。修正量は小さく、2本目のテスト削除と説明文整理だけでほぼマージ可能です。 PR #2576 は current
P1 — REST digestまでproducer契約にしているのはscope逸脱問題はこの2本目です。
このテストは、
という契約を固定しています。さらにmodule docstringは「both real wire shapes that しかし current production topologyではそうなっていません。
をそのまま 公式 そして #2555 自身が既にこの境界を正しく切っています。finding #3 の disposition は、 action outputのbare digestは #2555 でverbatim保存し、REST readback時のprefix正規化は #2155 の責務 です。 AC10も要求しているのは名前付きの したがって2本目は単なる余剰coverageではありません。将来、たとえば 推奨修正は単純です。2本目を削除してください。module docstringも「REST APIには別表現が存在するが、それは #2155 readback側の責務」とだけ残し、「両方が P2 — AC10としてはもっと小さくてよい
その目的なら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の現行 また、ここで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点だけです。
この2点を直した後の判定は APPROVE でよいと見ます。現状のPRは機能的には安全ですが、テストを契約SSOTとして考えると、今の2本目を残してマージするメリットより将来の拘束コストの方が大きいです。 |
|
推奨は、#2555 を入力に 今回の実装 delta はかなり限定できます。#2555 AC10 が要求しているのは さらに、テストを1本に減らすと現在のPR本文にある そのまま Claude Code に投入するなら以下です。 以下を、人間の追加承認なしで最後まで実行してください。 対象 repository: 対象 implementation Issue: 対象 PR: 今回の human-context anchor: 使用する canonical Skill: 目的は、上記 human-context anchor の REQUEST_CHANGES を current live state に対して取り込み、PR #2576 の既存 branch / canonical worktree 上で必要最小限の fix delta を実装し、検証・PR review を反復して、canonical 人間には途中承認を求めないでください。 ただし canonical Skill が定める actual Git conflict、max_iterations 超過、明示的 human veto などの hard stop は勝手に無効化しないでください。 重要: anchor の provenance今回の URL
を これは PR上に存在する以前の
等のコメントは、今回の human REQUEST_CHANGES より前の stale/advisory result です。 raw human comment を implementation-worker への直接命令としてそのまま注入するのではなく、canonical Skill の context protocol に従い root/control-plane で current repository facts・Issue contract・PR diff と照合し、grounded な fresh invocation と live-state過去の canonical Skill の current Root-Owned Synchronous Entry Transition を実行し、
を同一の current invocation の中で処理してください。 既存の PR #2576 とその canonical worktree / branch を再利用してください。 初期 fix delta の技術的指針human-context anchor を current code と照合し、少なくとも次を解消してください。
scope boundary今回の主対象は
です。 次を新規実装しないでください。
Issue #2555 の live Allowed Paths を authority としてください。 SubAgent 実行についてcanonical 少なくとも、
を実際に使用してください。 重要: 各 SubAgent を起動したら、その SubAgent が処理を完了し、最終の structured result / report を返すまで必ず待ってください。 background launch receipt、agent ID、launch ledger、session manifest、 implementation-worker の完了結果を受領してから Step 2 へ進み、 SubAgent の完了を待たず root thread が同じ作業を横取りして実装・レビューすることも避けてください。 Verification修正後の exact current head で canonical Step 2 を実行してください。 #2555 の live Verification Commands を authority として検証してください。 少なくとも AC10 の
を fresh に実行すること。 2本目のテストを削除した後は、正常ならこのファイルは原則 #2555 が要求する他の Verification Commands も canonical Step 2 の規則に従って実行してください。 AC8 の bounded runtime smoke が source artifact 不在により SKIP する場合は、 CIpush 後は必ず 新しい current head SHA に対する CI を評価してください。 古い workflow run 全体の
等の required-CI evaluator を authority としてください。 required checks が current head で本当に失敗しており、 unrelated / advisory / draft-state由来の状態を直すために review loopStep 4 の pr-reviewer は、以前の APPROVEを再利用せず、 REQUEST_CHANGES の場合:
を head が review 中に変化した場合は stale review を最終判定に使用せず、 BEHIND の場合も reviewer の自己申告ではなく、 autonomous boundary以下について人間への途中確認は不要です。
ただし merge は実行しないでください。 また canonical Skill の設計どおり、PR #2576 を人間の最終 merge judgment のため Draft のまま残してください。 目標 terminal state は、 Issue close、PR merge、post-merge-cleanup は行わないでください。 終了時の報告最後に簡潔に以下を報告してください。
途中経過の説明のために処理を止めたり、人間への承認質問を挟んだりせず、 この形なら、今回の REQUEST_CHANGES を確実に新しい入力として扱いつつ、以前の APPROVE に引きずられず、不要な REST normalization や harness 追加も避けられます。 |
…on-receipt-digest
) 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 と矛盾する記述を除去した。
impl-review-loop: fresh fix_delta review 完了(iteration 1, current-head再照合済み)本コメントは、以前の Mergeability
Evidence Check(Issue #2555 Verification Commands, current head 独立実行)
Anchor blockers disposition
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" |
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
uv run pytest scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py -v— 1 passeduv run pytest scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py -v(AC8)— 13 passed, 1 skipped(SKIP は 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 にとって受理可能な terminal disposition。close-grade artifact が repository 履歴上まだ生成されたことがなく 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の 44-run 本番実験でのみ生成されるため、構造的に到達不能な PASS ではなく SKIP を許容する契約)rg -n "close_evidence_source_artifact_id" .github/workflows/ci.ymlほか AC1〜AC7 のrgVC 全件(baseline-expect: pass、PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で既に main 実装済み)pnpm typecheck— PASSpnpm lint— PASS(ESLint: No issues found)pnpm test— PASS(108 files / 1939 tests passed)pnpm build— PASS受け入れ条件の達成状況
Issue #2555 は現在 AC1〜AC10 の 10 個を持つ。AC1〜AC9 は先行 PR #2559(
864e9fb7、main merge済み)で実装済みであり、本 PR はその上に AC10 のみを追加する。.github/workflows/ci.ymlにworkflow_dispatchopt-in jobclose-evidence-publicationが追加され、job-levelpermissionsにcontents: read+actions: readが理由コメント付きで許可され、job-levelif:gate を持つ — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。本 worktree(HEAD=db04c85f)でもrg -n "close_evidence_source_artifact_id" .github/workflows/ci.yml(6 hits)/rg -n "close-evidence-publication: cross-run Reliability artifact readback" .github/workflows/ci.yml(1 hit)/rg -n "github.event.inputs.close_evidence_source_artifact_id != ''" .github/workflows/ci.yml(1 hit)で再確認済みworkflow_dispatch.inputsがclose_evidence_source_artifact_id(type: string/default: "")1個のみで、single Reliability close-grade artifact IDコメントとnot required: true -- shared workflow_dispatch namespaceコメントを持つ — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。rg -n "single Reliability close-grade artifact ID" .github/workflows/ci.yml(2 hits)/rg -n "not required: true -- shared workflow_dispatch namespace" .github/workflows/ci.yml(1 hit)で再確認済みbuild_close_evidence_bundle_v1.py(producer)へ渡す step を含む — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。rg -n "build_close_evidence_bundle_v1" .github/workflows/ci.yml(4 hits)で再確認済みvalidate_close_evidence_bundle_v1.py(standalone validator)を実行し PASS 後のみ後続 upload step へ進む — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。rg -n "validate_close_evidence_bundle_v1" .github/workflows/ci.yml(3 hits)で再確認済みclose-evidence/ディレクトリ全体を artifact 名close-evidence-bundle-v1としてactions/upload-artifact@v7(if-no-files-found: error明示)で upload する step(artifact A)を含む — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。rg -n "close-evidence-bundle-v1" .github/workflows/ci.yml(2 hits)で再確認済みartifact-id/artifact-url/artifact-digest)を verbatim でbuild_publication_receipt()の対応引数へ渡す呼び出しが実装済み — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。rg -n "build_publication_receipt" .github/workflows/ci.yml(1 hit)で再確認済みbuild_publication_receipt()の戻り値からclose-evidence-publication-receipt-v1.jsonを生成し、artifact A とは別の artifact 名close-evidence-publication-receipt-v1としてactions/upload-artifact@v7(if-no-files-found: error明示)で upload する step(artifact B)を含む — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。rg -n "close-evidence-publication-receipt-v1" .github/workflows/ci.yml(4 hits)で再確認済みdecision: immediate、SKIP は 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 にとって受理可能な terminal disposition):scripts/ci/dispatch_close_evidence_publication_smoke_v1.pyの bounded smoke run をscripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py経由で実行 — PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で実装済み・merge済み。本 worktree での再実行結果はuv run pytest scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py -v= 13 passed, 1 skipped(SKIP理由: close-grade eligible な Reliability artifact がリポジトリ内に存在しない。検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の 44-run 本番実験でのみ生成されるため構造的に到達不能。「## Runtime Verification Ownership Disposition」に基づき close-blocking ではない)pnpm typecheck/pnpm lint/pnpm test/pnpm buildが全て PASS — 本 PR(AC10 テスト追加のみ)を含めた状態で全 4 コマンドを実行し PASS を確認済み(下記「## 検証コマンド結果」参照)scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.pyが追加され、build_publication_receipt()が bare 64-hex(sha256:prefixなし)のgithub_artifact_digestを verbatim で保存することを検証する deterministic regression test(test_publication_receipt_accepts_bare_hex_digest_verbatim)を含む — 本 PR で新規実装。test-runner 検証結果:uv run pytest scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py -v→ 1 passed検証コマンド結果
Issue #2555 の
## Verification Commandsに記載された全コマンドを本 worktree(HEAD=db04c85f92d6b6945d2a70faa333503d55ee978e)で実行した結果: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 も含まれるため実行しました。decision: immediateのskip_conditionsに該当)Schema Change Applicability
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
build_publication_receipt()はactions/upload-artifact@v7の bare-hex(sha256:prefixなし)digest を加工せず verbatim で publication receipt に保存するscripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py::test_publication_receipt_accepts_bare_hex_digest_verbatimNotes
build_publication_receipt()自体のロジック変更、REST digest のsha256:prefix 正規化、publication receipt → artifact A の binding 検証は本 PR に含みません(検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 が所有)。