Skip to content

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

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "#2155"
goal_ref: "close-evidence bundle(#2486 producer/validator実装済み)を実productionデータからbuild→validate→GitHub Actions artifact upload→publication receiptまで通す手動opt-in workflow routeを配線する"
change_kind: workflow

Parent Issue

#2155

Parent Goal Ref

Current Validated Scope

  • .github/workflows/ci.yml に workflow_dispatch トリガーの手動 opt-in job close-evidence-publication を追加する(新規 workflow file は使用しない。workflow_dispatch は workflow file が default branch 上に存在する必要があるため、既に default branch にある ci.yml への追加が実際に smoke 可能な唯一のルート)。PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559(2026-09-08時点でmain mergedcommit 864e9fb7の祖先)でこのjobは既にmainへ実装済みであり、本Issueの残作業はcontract整合性の修正とdeterministic regressionの追加のみである
  • operator-facing input は close_evidence_source_artifact_id(Reliability close-grade artifact ID)1個のみとし、experiment manifest / Performance result / Reliability result の runner-local path を直接指定する入力は持たない
  • 既存の scripts/ci/build_close_evidence_bundle_v1.py(producer)と scripts/ci/validate_close_evidence_bundle_v1.py(validator)をそのまま呼び出す(producer/validatorの中核ロジックである digest計算・cross-binding検証は変更しない。実装: #2423/#2424 の close-grade result を close_evidence.json bundle に束ねる producer/validator を実装する #2486/PR#2528 の ownership を維持する)
  • close-evidence/ ディレクトリ全体を actions/upload-artifact@v7 で upload する(artifact A)
  • upload 後の action outputs(artifact-id/artifact-url/artifact-digest)を verbatim で build_publication_receipt() に渡し、close-evidence-publication-receipt-v1.json を生成して artifact A とは別の artifact(artifact B)として upload し、CI_CLOSE_EVIDENCE_PUBLICATION_RECEIPT_V1 を永続化する
  • job-level permissions に contents: read に加え actions: read を明示的に許可する(別 workflow run の Reliability artifact readback のため。既存 trusted_ci_verdict_summary_artifact_id pattern と同種の precedent が ci.yml に既に存在する)
  • job-level if: 条件(github.event.inputs.close_evidence_source_artifact_id != '')を持ち、close_evidence_source_artifact_id が指定された workflow_dispatch 以外(push/pull_request イベント、他 operator input のみを指定した workflow_dispatch)では実行されない(ci.yml 内の既存の全 job が benchmark_layout/python_test_bench 等で同様の job-level if: gate を持つ既存 precedent と同じパターン)
  • close_evidence_source_artifact_id の workflow_dispatch.inputs 定義は、ci.yml 内の既存の他の全 input(trusted_ci_verdict_summary_artifact_id 等)と同様に type: string / default: "" とする。GitHub の schema レベルの required: true は使用しない(ci.yml の workflow_dispatch.inputs は全 job 共有の単一 namespace であり、required: true にすると本 job と無関係な他の workflow_dispatch 呼び出し全てに値指定を強制してしまうため)。空値の実行時ガードは AC1 の job-level if: gate のみを唯一の防御とする(job 内 step での重複チェックは行わない)
  • (2026-09-08 追加) AC8 の live runtime smoke が SKIP(exit 77、pytest側は pytest.skip())した場合、それは 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 にとって受理可能な terminal disposition であり、close-blocking条件ではない。close-grade(22 samples/arm)の実 Reliability artifact を用いた最初の end-to-end 実行、および publication receipt → artifact A の binding 検証(receipt.github_artifact_id == artifact A.id 等)は、本Issueではなく親 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の integration verification(AC6(b)、「## 44-run Start Conditions」step 5)が所有する(詳細は「## Runtime Verification Ownership Disposition」参照)

Remaining Parent Gaps

  • 実際の 44-run 本番実験データを用いた end-to-end 実行・記録は本 Issue の scope 外(検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 が所有)
  • 自動トリガー(push/PR 時の自動実行)化は行わない。手動 opt-in route の追加に限定する
  • publication receipt が artifact A を正しく指しているかの binding 検証(receipt.github_artifact_id == artifact A.id / receipt.bundle_payload_digest == artifact A の bundle_payload_digest / receipt.experiment_identity == artifact A の experiment_identity)は、close-grade artifactを用いた実運用時にのみ意味を持つ検証であるため、本Issueの smoke 実装ではなく 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の production verification に属する
  • GitHub Actions Artifacts REST API の digest フィールド(sha256: prefix付き)と actions/upload-artifact の artifact-digest output(bare 64-hex、prefixなし)の表現差異を踏まえた readback 時の prefix 正規化ルールの明文化は、REST readback を実際に行う 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の production verification に属する

Outcome

.github/workflows/ci.yml に workflow_dispatch トリガーの手動 opt-in job close-evidence-publication が追加され、その job が

  1. operator input close_evidence_source_artifact_id(Reliability close-grade artifact ID 1個)を受け取り、
  2. 既存の artifact-ID based download pattern(gh api repos/${{ github.repository }}/actions/artifacts/{id} 系、job-level actions: read を伴う)で当該 artifact を download し、reliability-assessment-input/manifest.json / reliability-assessment-input/receipt.json / reliability-assessment-output/ci_reliability_close_grade_result_v1.json を固定パスから読み込み、
  3. build_close_evidence_bundle_v1.py(producer)→ validate_close_evidence_bundle_v1.py(validator)を実行し、
  4. validator PASS 後に close-evidence/ ディレクトリ全体を actions/upload-artifact@v7(if-no-files-found: error)で artifact A として upload し、
  5. upload outputs(artifact-id/artifact-url/artifact-digest)を verbatim で build_publication_receipt() に渡して close-evidence-publication-receipt-v1.json を生成し、artifact A とは別の artifact B として upload する、

までを1 job 内で通す。rg -n "close_evidence_source_artifact_id" .github/workflows/ci.yml がヒットを返す状態になっていること(PR #2559 で main に実装済み、確認済み)。

本Issueの残りの close 条件は、(a) 上記 workflow 実装(実装済み)、(b) digest verbatim 保存契約の bare-hex regression test 追加(AC10)、(c) 既存 valid fixture または実 Reliability artifact を使った bounded smoke の実行可能性確認(SKIPも受理可能な disposition、AC8)である。

Runtime Verification Applicability

decision: immediate
applicable_acs: [AC8]
execution_environment: github_actions_workflow_dispatch
skip_conditions: >
  GH_TOKEN/GITHUB_TOKEN に actions: read scope が無い場合、または smoke に使用可能な既存
  Reliability artifact ID をリポジトリ内から解決できない場合(SKIP exit 77)
fallback_policy: >
  SKIP は #2555 にとって受理可能な terminal disposition であり、close-blocking条件ではない
  (2026-09-08 更新)。SKIP した場合、smoke run 自体は followup ではなく #2155 の
  「## 44-run Start Conditions」step 5(publication route の最小実データでの
  executable/readback可能性確認)および AC6(b) が所有する。#2555 は route の実装と
  deterministic regression の完成をもって disposition 完了とする
artifact_requirements: >
  PASS した場合のみ、smoke run の gh run ID、artifact A(close-evidence-bundle-v1)と
  artifact B(close-evidence-publication-receipt-v1)の artifact ID を記録する。SKIP の
  場合はSKIP理由(利用可能なReliability artifactの不在)をPRコメントに記録すれば足りる
  • reason: 本 Issue は GitHub Actions workflow_dispatch job の実配線自体が成果物であり、実装: #2423/#2424 の close-grade result を close_evidence.json bundle に束ねる producer/validator を実装する #2486 の producer/validator(fixture で決定論的にテスト可能な純粋 filesystem contract)とは異なり、artifact download permission・upload outputs 取得・publication receipt 生成という実際の GitHub Actions 実行環境上の挙動を伴う。44-run 本番実験は本 Issue の scope 外だが、既存の valid fixture または実在する小規模 Reliability artifact を使った bounded smoke run 1回であれば本 Issue の実装範囲内で動作検証が完結する。(2026-09-08 更新) close-grade(22 samples/arm)artifactはリポジトリ履歴上まだ一度も生成されたことがなく、それは 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の 44-run 本番実験でのみ生成される。したがって close-grade artifactを要求する厳密な PASS は 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 の scope では構造的に到達不能であり、SKIPを本Issueの受理可能な終端disposition として扱う
  • 対応 AC: AC8(<!-- runtime-verification: true --> タグ付与)
  • 対応 VC: scripts/ci/dispatch_close_evidence_publication_smoke_v1.py(新規追加のsmoke実行本体)を scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py(新規追加のpytest wrapper。VC preflight allowlist が任意の uv run python3 <script> 形式を許可しないため、uv run pytest 経由で起動する)から呼び出す。GH_TOKEN/GITHUB_TOKEN に actions: read scope が無い場合、または smoke に使用可能な既存 Reliability artifact ID をリポジトリ内から解決できない場合は SKIP exit 77(pytest 側は pytest.skip()、pytest suite全体の exit code は 0)を返す。それ以外は実際に close-evidence-publication job を workflow_dispatch で起動し、run 完了を poll し、conclusion が success であること、および artifact A/B の両方が生成されたことを確認して PASS/FAIL を返す。SKIP/PASS いずれも VC の exit code は 0 であり、AC8 は本 Issue において deterministic に closable である
  • 証跡: PASSした場合はsmoke runのgh run IDとartifact A(close-evidence-bundle-v1)/artifact B(close-evidence-publication-receipt-v1)のartifact IDをPRに記録する。SKIPした場合はSKIP理由をPRに記録する

Runtime Verification Ownership Disposition

2026-09-07 issue-refinement-loop trusted human-context anchor(issuecomment-5575520681, OWNER, REQUEST_CHANGES)が指摘した5件の finding を、current main(HEAD 864e9fb)・PR #2559 merged実装・#2155 本文・GitHub公式仕様(web-researcher SubAgentが一次資料で fact-check、全claim PASS)に対して独立検証した上で、以下のように disposition した。

# Finding (anchor) Severity 検証結果 Disposition
1 AC8とparent #2155の44-run開始条件が循環依存 P0 妥当。close-grade artifactは#2155の44-run本番実験でのみ生成されるため、#2555 scopeでの厳密PASSは構造的に到達不能 契約修正: 採用。AC8のclose-blocking条件をSKIP許容disposition化。live close-grade smoke E2Eの所有権は#2155(44-run Start Conditions step5, AC6(b))へ transfer(既に#2155本文に当該記述が存在するため#2155側の追加編集は不要と判断)
2 runtime smokeがartifact B存在のみ検証しreceipt→artifact A bindingを検証しない P1 妥当。dispatch_close_evidence_publication_smoke_v1.pyのPASS判定はjob success + artifact A/B存在確認のみで、receiptの中身は未検証 transfer。binding検証(receipt.github_artifact_id == artifact A.id等)はclose-grade artifactでの実運用時にのみ意味を持つため、#2155のAC6(b) production verificationへ transfer。本Issueのsmoke実装は変更しない(過剰なharness追加を避ける)
3 artifact-digest(bare hex)とREST digest(sha256:prefix)の表現差異 P1 妥当。web-researcher SubAgentがactions/upload-artifact公式README・GitHub REST API公式docsで両表現を確認済み(PASS) 一部採用: wire format(action output verbatim保存)は変更しない。bare-hexのdeterministic regression testをAC10として本Issueに追加。REST digestのprefix正規化はreadback比較を行う#2155側の責務として明記(本Issueはreadbackを実装しない)
4 source artifact自動探索が最新500件固定 P2 妥当だが non-blocking。ARTIFACT_SEARCH_PAGES=5 * ARTIFACT_SEARCH_PER_PAGE=100で固定 見送り(non-blocking改善として記録)。--source-artifact-id optional引数の追加は任意のfollow-up候補として本Issueのclose条件にしない
5 workflow本体・権限・upload topologyは現状維持でよい — 妥当。PR #2559の実装は再検証済みで妥当 維持。再実装しない

anchor findingはすべて investigated 済みであり、上記の通り accepted(1,2,3の一部,3の一部,5)/ transferred(1,2,3の一部)/ deferred-non-blocking(4)のいずれかに明示的に disposition された。

In Scope

Out of Scope

  • scripts/ci/build_close_evidence_bundle_v1.py / scripts/ci/validate_close_evidence_bundle_v1.py のproducer/validatorロジック自体(digest計算、cross-binding検証等)の変更
  • Performance close-grade materializerのtopology修正(別issueで扱う)
  • 44-run本番実験の実行そのもの(#2155が所有)
  • 自動トリガー(push/PR時の自動実行)化。あくまで手動workflow_dispatchのopt-inルートに限定する
  • 新規 broker / daemon / service / SLSA / OIDC / signing infrastructure の追加
  • write permission・attestation・外部 credential 等への permission 拡張
  • publication receipt → artifact A の binding 検証(receipt.github_artifact_id == artifact A.id 等)の実装。close-grade artifactでの実運用時にのみ意味を持つため 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 が所有する
  • REST Artifacts API readback時のdigest sha256: prefix正規化ロジックの実装。REST readbackを実際に行う#2155が所有する
  • source artifact自動探索を--source-artifact-id optional引数付きに拡張すること(non-blocking、任意のfollow-up候補であり本Issueのcloseを妨げない)

Acceptance Criteria

  • AC1: .github/workflows/ci.yml に新規 workflow_dispatch opt-in job close-evidence-publication が追加され、job-level permissions に contents: read に加え actions: read が、理由コメント(close-evidence-publication: cross-run Reliability artifact readback)付きで明示的に許可されている。加えて job-level if: 条件 github.event.inputs.close_evidence_source_artifact_id != '' を持ち、push/pull_request イベントおよび他 operator input のみを指定した workflow_dispatch では実行されない
  • AC2: 上記 job の workflow_dispatch.inputs は close_evidence_source_artifact_id(Reliability close-grade artifact の GitHub Actions artifact ID、type: string / default: "")1個のみを operator-facing source input として持ち、experiment manifest / Performance close-grade result / Reliability close-grade result の runner-local path を直接指定する入力を持たない。この input 定義には single Reliability close-grade artifact ID という説明コメントを付与する。GitHub schema レベルの required: true は使用しない(ci.yml の workflow_dispatch.inputs は全 job 共有の単一 namespace であり、required: true は本 job と無関係な他の workflow_dispatch 呼び出しにも値指定を強制するため)ことを、default: "" の宣言行に付与する固有コメント(not required: true -- shared workflow_dispatch namespace)で明示する。空値の実行時ガードは AC1 の job-level if: gate(close_evidence_source_artifact_id != '')のみを唯一の防御とし、この input 自体には追加の fail-closed step を設けない(if: gate が false の場合 job の steps 自体が起動しないため、job 内 step での重複チェックは unreachable になり無意味)
  • AC3: job は close_evidence_source_artifact_id で指定された artifact を既存の artifact-ID based download pattern で download し、reliability-assessment-input/manifest.json・reliability-assessment-input/receipt.json・reliability-assessment-output/ci_reliability_close_grade_result_v1.json を固定パスから読み込んで build_close_evidence_bundle_v1.py(producer)へ渡す step を含む
  • AC4: producer 実行後、validate_close_evidence_bundle_v1.py(standalone validator)を実行し、PASS した場合のみ後続の upload step へ進む step 順序になっている
  • AC5: validator PASS 後、close-evidence/ ディレクトリ全体を artifact名 close-evidence-bundle-v1 として actions/upload-artifact@v7(if-no-files-found: error を明示)で upload する step(artifact A)を含む
  • AC6: artifact A の upload step の action outputs(artifact-id/artifact-url/artifact-digest)を、値を加工(sha256: prefix の付加・削除等)せず verbatim で build_publication_receipt() の github_artifact_id/artifact_url/github_artifact_digest 引数へ渡す呼び出しが実装されている
  • AC7: 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)を含む
  • AC8: close_evidence_source_artifact_id の workflow_dispatch → source artifact download → producer → validator → close-evidence upload → upload outputs → publication receipt生成 → receipt upload の経路に対し、既存の valid fixture または実在する小規模 Reliability artifact を使った bounded smoke run 1回が scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py 経由で実行される。利用可能な source artifactが無い場合の SKIP(exit 77 相当、pytest suite exit code 0)は本Issueにとって受理可能な terminal disposition であり close-blocking ではない(close-grade artifactを用いた最初のPASS実行とそのbinding検証は#2155が所有する。「## Runtime Verification Ownership Disposition」参照)。実行された場合、job の成功と artifact A/B 両方の生成が証跡として記録される
  • AC9: pnpm typecheck / pnpm lint / pnpm test / pnpm build が全てPASSする
  • AC10: 新規テストファイル scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py が追加され、build_publication_receipt() が actions/upload-artifact@v7 の実 output 形式(sha256: prefixのない bare 64-hex文字列)の github_artifact_digest を受け取った場合に、値を加工(prefixの付加等)せず verbatim で publication receipt に保存することを検証する deterministic regression test(test_publication_receipt_accepts_bare_hex_digest_verbatim)を含む

Verification Commands

# AC1
# baseline-expect: pass
$ rg -n "close_evidence_source_artifact_id" .github/workflows/ci.yml
# AC1
# baseline-expect: pass
$ rg -n "close-evidence-publication: cross-run Reliability artifact readback" .github/workflows/ci.yml
# AC1
# baseline-expect: pass
$ rg -n "github.event.inputs.close_evidence_source_artifact_id != ''" .github/workflows/ci.yml
# AC2
# baseline-expect: pass
$ rg -n "single Reliability close-grade artifact ID" .github/workflows/ci.yml
# AC2
# baseline-expect: pass
$ rg -n "not required: true -- shared workflow_dispatch namespace" .github/workflows/ci.yml
# AC3
# baseline-expect: pass
$ rg -n "build_close_evidence_bundle_v1" .github/workflows/ci.yml
# AC4
# baseline-expect: pass
$ rg -n "validate_close_evidence_bundle_v1" .github/workflows/ci.yml
# AC5
# baseline-expect: pass
$ rg -n "close-evidence-bundle-v1" .github/workflows/ci.yml
# AC6
# baseline-expect: pass
$ rg -n "build_publication_receipt" .github/workflows/ci.yml
# AC7
# baseline-expect: pass
$ rg -n "close-evidence-publication-receipt-v1" .github/workflows/ci.yml
# AC8
$ uv run pytest scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py -v
# AC9
$ pnpm typecheck
# AC9
$ pnpm lint
# AC9
$ pnpm test
# AC9
$ pnpm build
# AC10
$ uv run pytest scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py -v

Allowed Paths

  • .github/workflows/ci.yml
  • scripts/ci/build_close_evidence_bundle_v1.py(呼び出し元からreceipt値を受け取るための軽微な配線追加のみ。producer/validatorの中核ロジックは変更しない)
  • scripts/ci/dispatch_close_evidence_publication_smoke_v1.py(新規作成。AC8 の runtime verification smoke script本体)
  • scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py(新規作成。AC8 を uv run pytest 経由で起動する pytest wrapper)
  • scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py(新規作成。AC10 の bare-hex digest verbatim regression testを含む)
  • docs/dev/ci-close-evidence-bundle.md(配線内容のdocs反映が必要な場合)

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合(本 Issue で明示的に許可された contents: read / actions: read は
    この Stop Condition の対象外とする。write 権限・OIDC・attestation・署名・外部credential等への拡張は Stop Condition の対象)

Required Skills

なし

Required Design References

  • docs/dev/ci-close-evidence-bundle.md
  • docs/dev/agent-skill-boundaries.md
  • docs/dev/runtime-verification-policy.md

Scope Delta(該当時のみ記載)

2026-09-07 issue-refinement-loop trusted human-context anchor(issuecomment-5569085563, OWNER, REQUEST_CHANGES)反映により、初版から以下の contract delta を適用した:

  1. operator input を「experiment manifest / Performance result / Reliability result の runner-local path 3個」から「close_evidence_source_artifact_id(Reliability close-grade artifact ID)1個 + 既存 artifact download pattern」へ変更
  2. job-level actions: read permission を明示的に許可し、Stop Conditions の「権限昇格」定義からこの pre-approved permission を除外する形に修正
  3. publication receipt を stdout print で満たせる曖昧な AC から、artifact B(close-evidence-publication-receipt-v1)への永続化を要求する AC へ変更
  4. artifact-digest を verbatim(加工なし)で保存する AC を明示的に追加
  5. Runtime Verification Applicability を not_applicable から immediate へ変更し、bounded smoke run 1回を AC8 として追加(新規 scripts/ci/dispatch_close_evidence_publication_smoke_v1.py と、その uv run pytest wrapper scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py を Allowed Paths に追加。VC preflight allowlist が任意の uv run python3 <script> 形式を許可しないため pytest wrapper 経由に統一)
  6. if-no-files-found: error を artifact A/B 双方の upload step に明示する AC を追加
  7. 新規 workflow file の選択肢を廃止し、ci.yml への opt-in job 追加のみに確定(workflow_dispatch の default branch 制約のため)

2026-09-07 issue-refinement-loop Step 2.5(semantic design review, issue-design-reviewer SubAgent)が検出した2件の blocker finding を反映した:

  1. AC2 の close_evidence_source_artifact_id を GitHub schema レベルの required: true にすると、ci.yml の workflow_dispatch.inputs が全 job 共有の単一 namespace であるため、本 job と無関係な既存の全 workflow_dispatch 呼び出し(python_test_bench、benchmark_layout、trusted_ci_verdict_summary_artifact_id 等)にも値指定を強制してしまうと判明したため、type: string / default: "" へ変更した(ci.yml 内の既存の他の全 input と同じ規約)
  2. close-evidence-publication job に job-level if: gate(github.event.inputs.close_evidence_source_artifact_id != '')が指定されていなかったため、push/pull_request イベントおよび他 operator input のみの workflow_dispatch でも本 job が無条件に実行され失敗する(ci.yml 内の既存の全 job が持つ benchmark_layout/python_test_bench 系の gate パターンと不整合)という blocker を修正した。gate の対象は close_evidence_source_artifact_id 単体とし、既存の benchmark_layout enum への統合は行わない(scope を本 job 追加のみに限定するため)

2026-09-07 issue-refinement-loop Step 2.5 iteration 3 の re-review が検出した2件の finding(severity: high 1件、medium 1件)を反映した:

10.(high, rewrite必須)AC2 の中核主張(required: true を使わず type: string/default: "" を採用したこと)を検証する VC が存在しなかったため、default: "" の宣言行に固有コメント(not required: true -- shared workflow_dispatch namespace)を付与し、それを検証する VC を追加した
11.(medium, 任意改善として反映)AC1 の job-level if: gate と、旧AC2 が要求していた「job冒頭の fail-closed step」が同じ空値ケースを対象にした到達不能な二重防御になっていたため、旧AC2 の fail-closed step 要求を削除し、空値ガードは AC1 の job-level if: gate のみを唯一の防御とする形に一本化した

2026-09-08 issue-refinement-loop trusted human-context anchor(issuecomment-5575520681, OWNER, REQUEST_CHANGES)反映により、以下の contract delta を適用した(PR #2559 は既にmain merge済みであり、workflow実装自体の再設計は行わない):

12.(P0 close-deadlock 解消)AC8 の live runtime smoke を close-blocking条件から変更し、SKIP(利用可能な close-grade Reliability artifactが存在しない場合の exit 77 相当、pytest exit code 0)を#2555にとって受理可能な terminal disposition と明記した。close-grade(22 samples/arm)artifactは#2155の44-run本番実験でのみ生成され、#2155は「#2555 CLOSED+COMPLETED」を44-run開始のprerequisiteとしているため、#2555 scope内でのclose-grade smoke PASSは構造的に到達不能であることを codebase-investigator SubAgent が current main で独立確認した。close-grade artifactを用いた最初のlive E2E実行とそのbinding検証は #2155 の「## 44-run Start Conditions」step5 / AC6(b)(既存の記述)が所有するとし、#2155本文の当該記述は既に転送先の受け皿として十分であることを確認したため#2155への追加編集は行わなかった
13.(P1 digest regression 追加)actions/upload-artifact@v7 の実 output 形式(bare 64-hex、sha256: prefixなし)を検証する既存テストが sha256: prefix付きの値のみを使用していたことを codebase-investigator SubAgent が scripts/ci/tests/test_build_close_evidence_bundle_v1.py:206 で確認したため、bare-hex verbatim保存を検証する deterministic regression test を、新規テストファイル scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py として AC10 に追加した(wire format自体は変更しない)
14.(P1 binding検証・digest正規化の ownership 明確化)publication receiptがartifact Aを正しく指しているかのbinding検証、およびREST digestのsha256:prefix正規化ロジックは、close-grade artifactでの実運用時にのみ意味を持つ検証であるため、#2555のOut of Scopeに明記し、#2155のAC6(b) production verificationが所有することを明記した(新規frameworkは追加しない)
15.(P2 non-blocking記録)source artifact自動探索の最新500件固定は non-blocking な改善候補として記録し、本Issueのclose条件にしないことを明記した

Notes for Reviewer

Activity

  1. added
    enhancement
    phase/implementation
    triage-required
    agent/implementer
    on Sep 7, 2026
  2. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES です。

    #2555 の目的自体は正しいです。#2486 / PR #2528 で producer/validator と publication receipt schema は十分に固まり、#2543 でも「実 production route は #2555 が持ち、#2155 がそれを消費する」と ownership が確定しています。 PR #2528 も実装ロジックについては独立レビューを通過しており、当時の REQUEST_CHANGES は PR 本文フォーマットだけでした。

    ただし、現在の #2555 は「production route を作る Issue」なのに、production data が workflow runner へ到達する経路が抜けています。 このまま実装へ進むと、静的 AC は全部通っても本番では使えない workflow を作れる契約です。

    1. P0 — production データのパス は runner にデータを運ばない

    Issue は workflow_dispatch input として、

    • experiment manifest のパス

    • performance close-grade result のパス

    • reliability close-grade result のパス

    を指定する契約です。

    しかし workflow_dispatch input は string / boolean / choice / number / environment の scalar 値であって、ファイルを runner に upload する機構ではありません。(GitHub Docs)

    つまり例えば、

    /foo/production/performance.json

    を入力しても、そのファイルが GitHub-hosted runner 上に突然存在するわけではありません。

    しかも #2155 の OWNER anchor が元々推奨していた sequence は明示的に、

    download inputs
    → producer
    → validator
    → upload close-evidence/
    → publication receipt

    でした。

    refinement の途中で download inputs が消え、単なる「path input」に退行しています。

    もっと単純な解が既存資産にある

    新しい input transport を設計する必要すらありません。

    現在の reliability-assessment は artifact に、

    reliability-assessment-input/
    reliability-assessment-output/

    をまとめて upload しています。

    さらに input directory には既に、

    manifest.json
    receipt.json

    が存在し、これはそれぞれ experiment manifest と Performance receipt です。

    したがって publication job は production path を3個受け取るのではなく、Reliability close-grade artifact 1個を受け取れば足ります。

    推奨 contract は、

    workflow_dispatch:
      close_evidence_source_artifact_id: <artifact ID>

    だけを operator-facing source input として、

    artifact download
      ├ reliability-assessment-input/manifest.json
      ├ reliability-assessment-input/receipt.json
      └ reliability-assessment-output/ci_reliability_close_grade_result_v1.json
            ↓
    producer
            ↓
    validator
            ↓
    upload close-evidence/

    にすることです。

    リポジトリ内には既に trusted_ci_verdict_summary_artifact_id を受け、Actions REST API から artifact metadata/ZIP を取得する同種の production pattern があります。

    公式 actions/download-artifact も現在は別 workflow run の artifact を github-token + run-id で取得できます。独自 broker は不要です。(github.com)

    個人的には、このリポジトリなら artifact ID + 既存 gh api .../actions/artifacts/{id}/zip pattern の再利用を第一候補にします。 新しい action topology を増やさず済みます。


    2. P1 — 必要な actions: read と Stop Condition が衝突する

    現在 ci.yml の top-level permission は、

    permissions:
      contents: read

    です。

    別 run の production artifact を取得するなら、新 publication job には少なくとも、

    permissions:
      contents: read
      actions: read

    が必要です。

    これはリポジトリ内でも既存 precedent があり、trusted artifact consumer が同じ理由で actions: read を付与しています。

    ところが #2555 の Stop Conditions は「権限昇格が必要なら停止」です。

    エージェントが文字通り解釈すると、

    production artifact を download したい
    → actions: read が必要
    → 権限昇格なので Stop

    になり得ます。

    actions: read は本 Issue で明示的に許可してください。 write permission、OIDC、attestation 等は不要です。


    3. P1 — publication receipt の「記録」が永続化されていない

    現在の AC は、

    CI_CLOSE_EVIDENCE_PUBLICATION_RECEIPT_V1 相当の値を記録する

    までしか要求していません。

    一方、現在の build_publication_receipt() は Python dict を返すだけです。さらに producer CLI の main() には publication receipt を出力する CLI interface がありません。

    したがって最小実装者は、

    Python heredocで関数を呼ぶ
    → stdoutにJSONをprint

    だけで AC を満たせます。

    しかし #2155 の目的は後から readback して close evidence として使うことです。ログだけにある JSON は production artifact として扱いにくい。

    推奨

    upload 後に、

    close-evidence-publication-receipt-v1.json

    を生成し、別 artifact として upload してください。

    これは過剰なハーネスではありません。upload-artifact@v4+ の artifact は immutable なので、一度 upload 済みの close-evidence/ artifact に後から receipt を追加できません。(GitHub)

    したがって自然な形は、

    artifact A:
      close-evidence/
          close_evidence.json
          inputs/...
    

    artifact B:
    close-evidence-publication-receipt-v1.json
    ├ bundle_payload_digest
    ├ github_artifact_id → artifact A
    ├ github_artifact_digest → artifact A
    └ artifact_url → artifact A

    です。

    これなら #2155 が機械的に readback できます。


    4. P1 — Runtime Verification: not_applicable は integration Issue として弱すぎる

    #2486 で runtime verification が不要だったのは妥当です。producer/validator は fixture で決定論的にテストできる純粋な filesystem contract でした。

    しかし #2555 は違います。検証対象そのものが、

    workflow_dispatch
    → artifact download
    → producer
    → validator
    → upload-artifact
    → action outputs
    → publication receipt

    という GitHub Actions integration です。

    現行 AC の、

    rg ...
    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build

    だけでは、

    • artifact download の permission

    • source artifact の directory layout

    • upload-artifact outputs の取得

    • publication receipt の生成

    • receipt readback

    を一つも実証できません。

    44-run production 実験を #2555 で行う必要はありません。既存の valid fixture または既存 Reliability artifact を使った workflow_dispatch smoke を1回通すだけで十分です。

    これは harness 増築ではなく、今回実装した配線そのものを1回動かす verification です。

    なお GitHub は workflow_dispatch workflow file が default branch 上に存在することを要求します。(GitHub Docs) そのため新規 close-evidence-publication.yml より、既に default branch に存在する ci.yml に opt-in job を追加する方を推奨します。


    5. P2 — artifact digest は加工せず action output を verbatim 保存する

    公式 upload-artifact@v7 は現在、

    • artifact-id

    • artifact-url

    • artifact-digest

    を output として持ち、artifact-digest の例は bare 64-hex SHA-256 です。(GitHub)

    一方、既存 unit test の publication receipt fixture は、

    github_artifact_digest="sha256:" + "a" * 64

    を使用しています。

    build_publication_receipt() 自体は検証せず値をそのまま格納するので、現時点では壊れてはいません。

    ただし #2555 では明示的に、

    steps.upload.outputs.artifact-digest を verbatim で github_artifact_digest に保存する。sha256: の付加等を行わない。

    としておいた方がよいです。

    bundle 内部の bundle_payload_digest 等の sha256:<hex> convention とは別物です。


    修正後の推奨フロー

    #2555 は次まで絞れば十分です。

    1. ci.yml に close-evidence publication 用 workflow_dispatch opt-in job を追加。

    2. operator input は原則 Reliability close-grade source artifact ID 1個。

    3. job-level actions: read を許可。

    4. 既存の artifact download pattern で source artifact を取得。

    5. artifact 内の manifest / Performance receipt / Reliability receipt を固定パスから producer に渡す。

    6. standalone validator を実行し、PASS した場合のみ close-evidence/ 全体を actions/upload-artifact@v7 で upload。

    7. upload step の artifact-id / artifact-url / artifact-digest を verbatim build_publication_receipt() に渡す。公式 v7 はこの3 output を提供しています。(GitHub)

    8. receipt JSON を別 artifact として uploadし、必要なら $GITHUB_STEP_SUMMARY に artifact URL だけ併記。

    9. existing fixture または実在する小規模 artifact で dispatch smoke 1回を AC にする。

    if-no-files-found: error だけは設定してよいです。これはセキュリティ強化ではなく「空 artifact upload が成功扱いになる」事故を防ぐ基本的な機能保証で、公式にも用意されています。(GitHub)

    優先度

    Severity 指摘 対応
    P0 production path input に transport がなく、fresh runner で実データを読めない 実装前に修正必須
    P1 artifact download に必要な actions: read と Stop Condition が衝突 contract 修正
    P1 publication receipt が stdout だけでも AC を満たせてしまう receipt artifact を要求
    P1 integration Issue なのに runtime smoke が N/A 1回の dispatch smoke を追加
    P2 GitHub artifact digest の表現が既存 test fixture と異なる action output verbatim を明記

    結論

    #2555 は新しい仕組みを増やす必要はありません。むしろ 既に Reliability assessment が作っている1個の artifact を、そのまま close-evidence publication の入力境界にするのが最小で最も運用しやすい設計です。

    特に修正すべきなのは、

    input は実 production データのパスを指定

    を、

    input は production Reliability close-grade artifact ID を指定し、その artifact 内の既存 manifest / Performance / Reliability evidence を download して使用する

    へ変更する点です。

    これを直してから impl-review-loop に渡すのがよいです。現時点では #2555 にコメントも実装 PR もありません。

    # 判定

    REQUEST_CHANGES です。

    #2555 の目的自体は正しいです。#2486 / PR #2528 で producer/validator と publication receipt schema は十分に固まり、#2543 でも「実 production route は #2555 が持ち、#2155 がそれを消費する」と ownership が確定しています。 PR #2528 も実装ロジックについては独立レビューを通過しており、当時の REQUEST_CHANGES は PR 本文フォーマットだけでした。

    ただし、現在の #2555 は「production route を作る Issue」なのに、production data が workflow runner へ到達する経路が抜けています。 このまま実装へ進むと、静的 AC は全部通っても本番では使えない workflow を作れる契約です。

    1. P0 — production データのパス は runner にデータを運ばない

    Issue は workflow_dispatch input として、

    • experiment manifest のパス
    • performance close-grade result のパス
    • reliability close-grade result のパス

    を指定する契約です。

    しかし workflow_dispatch input は string / boolean / choice / number / environment の scalar 値であって、ファイルを runner に upload する機構ではありません。([GitHub Docs]1)

    つまり例えば、

    /foo/production/performance.json
    

    を入力しても、そのファイルが GitHub-hosted runner 上に突然存在するわけではありません。

    しかも #2155 の OWNER anchor が元々推奨していた sequence は明示的に、

    download inputs
    → producer
    → validator
    → upload close-evidence/
    → publication receipt
    

    でした。

    refinement の途中で download inputs が消え、単なる「path input」に退行しています。

    もっと単純な解が既存資産にある

    新しい input transport を設計する必要すらありません。

    現在の reliability-assessment は artifact に、

    reliability-assessment-input/
    reliability-assessment-output/
    

    をまとめて upload しています。

    さらに input directory には既に、

    manifest.json
    receipt.json
    

    が存在し、これはそれぞれ experiment manifest と Performance receipt です。

    したがって publication job は production path を3個受け取るのではなく、Reliability close-grade artifact 1個を受け取れば足ります。

    推奨 contract は、

    workflow_dispatch:
      close_evidence_source_artifact_id: <artifact ID>
    

    だけを operator-facing source input として、

    artifact download
      ├ reliability-assessment-input/manifest.json
      ├ reliability-assessment-input/receipt.json
      └ reliability-assessment-output/ci_reliability_close_grade_result_v1.json
            ↓
    producer
            ↓
    validator
            ↓
    upload close-evidence/
    

    にすることです。

    リポジトリ内には既に trusted_ci_verdict_summary_artifact_id を受け、Actions REST API から artifact metadata/ZIP を取得する同種の production pattern があります。

    公式 actions/download-artifact も現在は別 workflow run の artifact を github-token + run-id で取得できます。独自 broker は不要です。([github.com]2)

    個人的には、このリポジトリなら artifact ID + 既存 gh api .../actions/artifacts/{id}/zip pattern の再利用を第一候補にします。 新しい action topology を増やさず済みます。


    2. P1 — 必要な actions: read と Stop Condition が衝突する

    現在 ci.yml の top-level permission は、

    permissions:
      contents: read

    です。

    別 run の production artifact を取得するなら、新 publication job には少なくとも、

    permissions:
      contents: read
      actions: read

    が必要です。

    これはリポジトリ内でも既存 precedent があり、trusted artifact consumer が同じ理由で actions: read を付与しています。

    ところが #2555 の Stop Conditions は「権限昇格が必要なら停止」です。

    エージェントが文字通り解釈すると、

    production artifact を download したい
    → actions: read が必要
    → 権限昇格なので Stop

    になり得ます。

    actions: read は本 Issue で明示的に許可してください。 write permission、OIDC、attestation 等は不要です。


    3. P1 — publication receipt の「記録」が永続化されていない

    現在の AC は、

    CI_CLOSE_EVIDENCE_PUBLICATION_RECEIPT_V1 相当の値を記録する

    までしか要求していません。

    一方、現在の build_publication_receipt() は Python dict を返すだけです。さらに producer CLI の main() には publication receipt を出力する CLI interface がありません。

    したがって最小実装者は、

    Python heredocで関数を呼ぶ
    → stdoutにJSONをprint
    

    だけで AC を満たせます。

    しかし #2155 の目的は後から readback して close evidence として使うことです。ログだけにある JSON は production artifact として扱いにくい。

    推奨

    upload 後に、

    close-evidence-publication-receipt-v1.json
    

    を生成し、別 artifact として upload してください。

    これは過剰なハーネスではありません。upload-artifact@v4+ の artifact は immutable なので、一度 upload 済みの close-evidence/ artifact に後から receipt を追加できません。([GitHub]3)

    したがって自然な形は、

    artifact A:
      close-evidence/
          close_evidence.json
          inputs/...
    
    artifact B:
      close-evidence-publication-receipt-v1.json
          ├ bundle_payload_digest
          ├ github_artifact_id      → artifact A
          ├ github_artifact_digest  → artifact A
          └ artifact_url            → artifact A
    

    です。

    これなら #2155 が機械的に readback できます。


    4. P1 — Runtime Verification: not_applicable は integration Issue として弱すぎる

    #2486 で runtime verification が不要だったのは妥当です。producer/validator は fixture で決定論的にテストできる純粋な filesystem contract でした。

    しかし #2555 は違います。検証対象そのものが、

    workflow_dispatch
    → artifact download
    → producer
    → validator
    → upload-artifact
    → action outputs
    → publication receipt
    

    という GitHub Actions integration です。

    現行 AC の、

    rg ...
    pnpm typecheck
    pnpm lint
    pnpm test
    pnpm build

    だけでは、

    • artifact download の permission
    • source artifact の directory layout
    • upload-artifact outputs の取得
    • publication receipt の生成
    • receipt readback

    を一つも実証できません。

    44-run production 実験を #2555 で行う必要はありません。既存の valid fixture または既存 Reliability artifact を使った workflow_dispatch smoke を1回通すだけで十分です。

    これは harness 増築ではなく、今回実装した配線そのものを1回動かす verification です。

    なお GitHub は workflow_dispatch workflow file が default branch 上に存在することを要求します。([GitHub Docs]1) そのため新規 close-evidence-publication.yml より、既に default branch に存在する ci.yml に opt-in job を追加する方を推奨します。


    5. P2 — artifact digest は加工せず action output を verbatim 保存する

    公式 upload-artifact@v7 は現在、

    • artifact-id
    • artifact-url
    • artifact-digest

    を output として持ち、artifact-digest の例は bare 64-hex SHA-256 です。([GitHub]3)

    一方、既存 unit test の publication receipt fixture は、

    github_artifact_digest="sha256:" + "a" * 64

    を使用しています。

    build_publication_receipt() 自体は検証せず値をそのまま格納するので、現時点では壊れてはいません。

    ただし #2555 では明示的に、

    steps.upload.outputs.artifact-digest を verbatim で github_artifact_digest に保存する。sha256: の付加等を行わない。

    としておいた方がよいです。

    bundle 内部の bundle_payload_digest 等の sha256:<hex> convention とは別物です。


    修正後の推奨フロー

    #2555 は次まで絞れば十分です。

    1. ci.yml に close-evidence publication 用 workflow_dispatch opt-in job を追加。
    2. operator input は原則 Reliability close-grade source artifact ID 1個。
    3. job-level actions: read を許可。
    4. 既存の artifact download pattern で source artifact を取得。
    5. artifact 内の manifest / Performance receipt / Reliability receipt を固定パスから producer に渡す。
    6. standalone validator を実行し、PASS した場合のみ close-evidence/ 全体を actions/upload-artifact@v7 で upload。
    7. upload step の artifact-id / artifact-url / artifact-digest を verbatim build_publication_receipt() に渡す。公式 v7 はこの3 output を提供しています。([GitHub]3)
    8. receipt JSON を別 artifact として uploadし、必要なら $GITHUB_STEP_SUMMARY に artifact URL だけ併記。
    9. existing fixture または実在する小規模 artifact で dispatch smoke 1回を AC にする。

    if-no-files-found: error だけは設定してよいです。これはセキュリティ強化ではなく「空 artifact upload が成功扱いになる」事故を防ぐ基本的な機能保証で、公式にも用意されています。([GitHub]3)

    優先度

    Severity 指摘 対応
    P0 production path input に transport がなく、fresh runner で実データを読めない 実装前に修正必須
    P1 artifact download に必要な actions: read と Stop Condition が衝突 contract 修正
    P1 publication receipt が stdout だけでも AC を満たせてしまう receipt artifact を要求
    P1 integration Issue なのに runtime smoke が N/A 1回の dispatch smoke を追加
    P2 GitHub artifact digest の表現が既存 test fixture と異なる action output verbatim を明記

    結論

    #2555 は新しい仕組みを増やす必要はありません。むしろ 既に Reliability assessment が作っている1個の artifact を、そのまま close-evidence publication の入力境界にするのが最小で最も運用しやすい設計です。

    特に修正すべきなのは、

    input は実 production データのパスを指定

    を、

    input は production Reliability close-grade artifact ID を指定し、その artifact 内の既存 manifest / Performance / Reliability evidence を download して使用する

    へ変更する点です。

    これを直してから impl-review-loop に渡すのがよいです。現時点では #2555 にコメントも実装 PR もありません。

  3. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    推奨アクションは、#2555 の実装にはまだ進まず、対象コメント #5569085563 を trusted human context の anchor として issue-refinement-loop を完走させることです。対象コメントの P0/P1 は妥当で、#2543 でも「production route は #2555、#2155 はその成果物を consume」という ownership が確定しています。

    特に、現行 #2555 の「3つの production path を workflow_dispatch input で渡す」契約は修正対象です。リポジトリには既に artifact REST download と job-level actions: read の precedent があり、Reliability artifact には manifest / Performance receipt / Reliability output をまとめる既存構造があります。 GitHub 側も workflow_dispatch は default branch 上に workflow file が存在する必要があり、upload-artifact@v7 は artifact-id / artifact-url / artifact-digest を出力します。 ([GitHub Docs]1) また v4+ artifact は immutable なので、publication receipt を bundle upload 後に別 artifact とする設計も整合しています。 ([GitHub]2)

    既に auto mode の Claude Code には、以下をそのまま渡すのがよいです。

    squne121/loop-protocol の Issue #2555 を対象に、リポジトリのエージェントスキル .claude/skills/issue-refinement-loop を canonical procedure のまま実行してください。

    対象:

    目的:
    対象 anchor comment の REQUEST_CHANGES を起点として #2555 の Issue contract を refinement し、implementation-ready な品質まで review/rewrite loop を完走すること。

    この Claude Code セッションは既に auto mode で起動済みです。
    repo loop iteration の途中で人間承認を要求せず、.claude/skills/issue-refinement-loop が自動継続を許可している範囲は最後まで自律的に進めてください。
    Claude Code 自身の permission mode を変更したり、別の permission bypass 設定を追加したりする必要はありません。

    Anchor の扱い

    この URL は、この対話で人間が明示的に選択した refinement 指示です。

    したがって anchor URL だけの unlabeled lane ではなく、canonical な human-context lane を使用してください。

    canonical root/default branch から、スキルが現在定義している
    preflight.run.with_human_context
    → 必要なら
    contract_update.run.with_human_context
    の経路を使用してください。

    run_refinement_preflight.py 等の内部 wrapper を直接呼んで canonical executor / command registry を迂回しないでください。

    anchor snapshot は固定し、Issue #2555 への所属・repo/issue binding・現在の Issue body を readback してから開始してください。

    最初に読むもの

    最低限、current origin/main の以下を確認してください。

    関連 Issue / PR / current main のコードが anchor の前提を supersede していないかも確認してください。

    SubAgent

    調査は main thread だけで済ませないでください。

    REFINEMENT_LOOP_PLAN_V1 の policy に従い、Step 1 が required なら codebase-investigator SubAgent を使って、少なくとも以下を独立 fact-check させてください。

    Step 1b が required なら web-researcher SubAgent も使用し、GitHub 公式一次資料を優先して以下を確認してください。

    • workflow_dispatch inputs の semantics
    • workflow_dispatch workflow file と default branch の制約
    • GitHub Actions artifact の REST download semantics
    • artifact download に必要な Actions read permission
    • actions/upload-artifact@v7 の outputs
    • v4+ artifact immutability
    • if-no-files-found: error

    Step 1 と Step 1b を並列起動しても構いませんが、起動した全 SubAgent の完了を必ず待ってください。
    SubAgent を fire-and-forget にしないでください。
    全結果を main thread で join してから Step 2 review に進んでください。

    SubAgent に GitHub mutation を行わせないでください。
    canonical root-owned preflight / review / trusted contract mutation を isolation SubAgent に移譲しないでください。
    nested SubAgent delegation も行わないでください。

    Refinement で重点的に解消する内容

    anchor comment を blind に転載するのではなく、current main と一次資料で fact-check したうえで、少なくとも次の contract delta を #2555 に正しく反映してください。

    1. production input transport

    現行の
    「experiment manifest / Performance result / Reliability result の runner-local path を workflow_dispatch input で指定する」
    という設計を廃止する方向で refinement してください。

    第一候補は operator-facing input を
    close_evidence_source_artifact_id
    相当の Reliability close-grade source artifact ID 1個に絞ることです。

    source artifact を download し、その既存 layout から、

    • reliability-assessment-input/manifest.json
    • reliability-assessment-input/receipt.json
    • reliability-assessment-output/ci_reliability_close_grade_result_v1.json

    を producer input として使用する contract を検討してください。

    新規 broker / daemon / service / SLSA / OIDC / signing infrastructure は追加しないでください。

    repo に既に存在する artifact-ID + GitHub Actions Artifacts REST API / gh api pattern が現在も妥当なら、それを第一候補として再利用してください。
    より単純な既存 canonical pattern が current main に存在するならそちらを優先してください。

    1. permission contract

    別 workflow run の artifact readback に必要な job-level

    contents: read
    actions: read

    を本 Issue で明示的に許可してください。

    現在の「権限昇格が必要なら Stop」という Stop Condition と衝突しないように contract を修正してください。

    ただし write permission、OIDC、attestation、外部 credential 等への拡張は認めないでください。

    1. publication receipt durability

    build_publication_receipt() の結果を stdout に print するだけでも AC を満たす曖昧な契約にしないでください。

    close-evidence bundle の upload 後、その upload step の

    • artifact-id
    • artifact-url
    • artifact-digest

    を build_publication_receipt() に渡し、
    close-evidence-publication-receipt-v1.json
    相当を永続化する contract にしてください。

    upload-artifact の immutability と current repo conventions を踏まえ、
    原則として

    • artifact A: close-evidence/ bundle
    • artifact B: publication receipt JSON

    の2 artifact topology を検討してください。

    receipt が artifact A を機械的に指せることを AC / Verification に反映してください。

    1. digest semantics

    GitHub Actions upload step の artifact-digest は action output を verbatim で
    github_artifact_digest
    へ渡すことを明示してください。

    bundle 内部の sha256:<hex> convention と混同して prefix の付加・削除を行わないでください。

    既存 unit fixture が実 action output の表現と異なる場合でも、本 Issue で producer/validator の中核 schema logic を不必要に変更しないでください。
    必要な contract clarification / minimal wiring の範囲に留めてください。

    1. runtime verification

    #2555 は GitHub Actions integration wiring 自体が成果物なので、
    Runtime Verification Applicability: not_applicable
    をそのまま維持してよいか再評価してください。

    44-run production experiment 自体を #2555 に持ち込む必要はありません。

    ただし、今回追加する経路そのもの、

    workflow_dispatch
    → source artifact download
    → producer
    → validator
    → close-evidence upload
    → upload outputs
    → publication receipt generation
    → receipt upload/readback

    について、既存の valid fixture または利用可能な既存 Reliability artifact を使った bounded smoke run 1回を、implementation後の runtime verification / AC として成立させる方向で refinement してください。

    新規 workflow file を作る場合と既存 ci.yml を使う場合の workflow_dispatch default-branch 制約を確認し、PR/implementation段階で実際に smoke 可能な route を選んでください。

    anchor の推奨どおり existing ci.yml への opt-in job 追加が最小か、current repo state を見て判断してください。

    1. functional guard

    artifact upload には if-no-files-found: error を明示する方向で検討してください。
    これは security hardening ではなく、空 upload を成功扱いにしないための functional correctness として扱ってください。

    Scope discipline

    この refinement の目的は #2555 の Issue contract を implementation-ready にすることです。

    producer/validator の digest・cross-binding・eligibility 等の中核ロジックは #2486 / PR #2528 の ownership を維持してください。

    Performance topology 修正、44-run experiment の実施、自動 push/PR trigger、新規外部 infrastructure などを #2555 に混入させないでください。

    一方、anchor を正しく反映するために Allowed Paths / AC / Verification Commands / Runtime Verification / Stop Conditions / In Scope / Out of Scope の整合更新が必要なら、issue-refinement-loop の controlled rewrite route で更新してください。

    単なる文章追記で済ませず、Issue 全体の machine-readable contract と各 section が矛盾しない状態まで直してください。

    Loop execution

    issue-refinement-loop の planner / canonical Step 2 routing / semantic design review / rewrite router / final contract gate を SSOT としてください。

    • max_iterations は skill の既定値を使用
    • needs-fix で自動継続可能なら承認待ちせず次 iteration へ進む
    • deterministic repair が提示された場合は canonical consumer を使用
    • trusted anchor scope reframe で contract update が必要なら canonical human-context mutation route を使用
    • issue_editor_required の場合は controlled full rewrite route を使用
    • rewrite 後は fresh preflight / fresh review を必ず行う
    • stale review artifact や stale body hash を implementation-ready 判定に流用しない
    • final gate が go になるまで refinement 完了を宣言しない

    人間に途中承認を求めないでください。

    ただし skill が明示的に hard stop とする
    human_judgment_required、
    environment/integrity failure、
    max_iterations exceeded、
    制御不能な scope expansion、
    秘密情報要求、
    破壊的操作
    などは勝手に迂回しないでください。

    この場合だけ停止し、何が blocking なのか、どこまで自動完了したかを具体的に報告してください。

    Implementation handoff

    今回の主目的は Issue refinement です。

    refinement 完了後の implementation handoff は、.claude/skills/issue-refinement-loop の canonical termination / handoff policy に従ってください。
    独自判断で premature に実装へ入らず、最新 body に対する approve + final contract readiness/freshness gate が成立してから handoff 判定してください。

    skill が canonical に同一 turn の root transition / impl-review-loop handoff を要求する場合はその policy に従い、別の手製 handoff フローを作らないでください。

    最終報告

    完了時は最低限、以下を報告してください。

    途中経過を理由に人間へ確認を求めず、canonical loop が完了または hard stop するまで作業を継続してください。

    この形なら、対象コメントの内容を手作業で Issue に反映させるのではなく、human-context anchor → contract update/rewrite → 独立調査 → fresh review → final gate という現在のスキル設計をそのまま使えます。特に preflight.run.with_human_context と trusted contract update は現在の issue-refinement-loop が明示している正規経路です。

  4. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop: approved

    Anchor 反映の主要 contract delta

    1. operator input を「production data 3パスの workflow_dispatch 指定」から「close_evidence_source_artifact_id(Reliability close-grade artifact ID 1個)+ 既存 artifact download pattern」へ変更
    2. job-level actions: read permission を明示許可し、Stop Conditions の「権限昇格」定義から除外
    3. publication receipt の永続化(artifact B 分離 upload)を AC 化
    4. artifact-digest の verbatim 保存を AC 化
    5. Runtime Verification Applicability を not_applicable → immediate へ変更し、bounded smoke run(AC8、scripts/ci/dispatch_close_evidence_publication_smoke_v1.py + pytest wrapper)を追加
    6. if-no-files-found: error を artifact A/B 双方の upload step に明示
    7. 新規 workflow file の選択肢を廃止し ci.yml opt-in job 追加のみに確定
      8-9. semantic design review iteration 2 の blocker 反映: required: true 不使用(type: string/default: "")、job-level if: gate 追加
      10-11. semantic design review iteration 3 の finding 反映: AC2 の VC 欠落を解消、AC1/AC2 の到達不能な二重防御を解消
    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: null
        generated_at: "2026-09-07T11:12:00Z"
        body_sha256: "sha256:85e792483de59058eeced9169235ed6cf831bf930194a408c84ca07f97605ed2"
      metadata:
        title_prefix_ready: true
      label_sync_observation:
        kind: presentation_sync
        result: noop
        detail: "title/labels unchanged this cycle; no presentation sync required"
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: "2026-09-07T11:15:00Z"
      checked_body_sha256: "sha256:85e792483de59058eeced9169235ed6cf831bf930194a408c84ca07f97605ed2"
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: issue-refinement-loop
      follow_up_issues: []
      note_only_observations: []
  5. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  6. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-09-07T11:35:17Z)

  7. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-09-07T11:55:00Z)

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      pr_url: "https://github.com/squne121/loop-protocol/pull/2559"
      head_sha: "1a2e3ca3344f15c192fb62db74c3256d592af351"
      issue_number: 2555
      termination_reason: approved
      merge_ready: false
      iteration: 1
    
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations:
        - "branch protection の required_status_checks context list に 'python-test' が含まれるが、GitHub が isRequired:true として計算する実際の required checks は typecheck/lint/test/build/validate-generated-artifact の5件のみで全てPASS。mergeStateStatus: BLOCKED はこの pre-existing な branch-protection/job-naming drift(本PRのscope外)が原因の可能性が高い。人間による branch protection 設定の見直しを推奨(本Issueのfollow-upとしては起票しない、repo全体の設定課題のため)"
        - "visual-impact-policy / visual-impact-policy-trusted / ci-verdict-summary は non-required checksでFAILUREだが、branch protectionのrequired contextsには含まれずmerge-blockingではない。visual-impact-policy resolverがcombat-hud-critical/combat-hud-running をmeta_policy_change fallbackで affected_surfaces と判定しているが、本PRはUIサーフェスを変更しないworkflow配線のみのため、PRのprose-only Visual Impact宣言(該当なし)の妥当性は人間判断が望ましい"
  8. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    #2555 を current main、関連 Issue/PR、コメント、GitHub Actions / GitHub CLI の現行仕様まで突き合わせて再レビューしました。

    判定は REQUEST_CHANGES 相当です。 ただし、PR #2559 で merge 済みの production workflow 本体はかなり妥当です。問題の中心は実装品質ではなく、#2555 AC8 と #2155 の開始条件が循環依存になっており、現状の契約では #2555 を正規に close しにくいことです。

    Severity | Finding | 判定 -- | -- | -- P0 | #2555 AC8 と #2155 の prerequisite が循環している | 契約修正必須 P1 | runtime smoke が artifact B の「存在」しか検証せず、receipt→artifact A の binding を検証していない | 修正推奨 P1 | artifact-digest の action output と REST digest の表現が異なる | #2155 readback 前に明文化必須 P2 | smoke の source artifact 自動探索が最新500件固定 | 任意改善 — | workflow 本体、権限、artifact upload topology | 現状維持でよい

    P0 — #2555 は現在、実質的な close deadlock を持っています

    #2555 は現在 open のままで、AC8 の実 runtime smoke は、利用可能な Reliability close-grade artifact がなかったため SKIP されています。実装完了コメント自身も「SKIP は PASS ではない」と明記しています。

    問題は、その source artifact の生成条件です。Reliability V1 は REQUIRED_SAMPLE_COUNT_PER_ARM = 22 を固定契約としており、close-grade bundle producer も sample_satisfied == true などを要求します。つまり、1 arm 1 run 程度の「小さい実データ」では publication route の成功入力を作れません。

    一方、親 #2155 は 44-run 開始条件として、先に #2555 が CLOSED + COMPLETED であることを要求しています。その後 blocks=1 smoke と publication route の最小実データ確認を行い、それらが PASS して初めて blocks=22 を実行する契約です。

    したがって現状は、

    #2555 を close
      ↓ 必要
    AC8 publication smoke PASS
      ↓ 必要
    close-grade Reliability artifact
      ↓ 実質必要
    22 samples / arm の production evidence
      ↓ しかし
    #2155 は #2555 CLOSED になるまで blocks=22 を開始禁止

    となっています。

    さらに #2555 AC8 は「既存 valid fixture または実 Reliability artifact」を許可していますが、実装された workflow の入力境界は GitHub Actions artifact ID 1個だけです。current smoke も repository artifacts の実 ID しか探索しません。fixture を runner 上の source artifact に変換する staging route は存在しません。

    ここが今回の最大の finding です。

    推奨する解消方法

    fixture uploader や新しいテスト workflow は作らない方がよいです。 個人趣味開発としてはハーネスが増えるだけです。

    契約を次のように変更する方が単純です。

    #2555 は「publication route の実装と deterministic regression が完成し、#2559 が main に merge 済み」で CLOSED + COMPLETED にする。
    実 production artifact を用いた最初の end-to-end runtime verification は #2155 が所有する。

    つまり #2555 AC8 の「実 production smoke PASS」を close-blocking AC から外し、#2155 の integration verification へ移管します。

    これは品質を下げる変更ではありません。むしろ producer / workflow implementation と、22-per-arm の実験結果が必要な integration verification の ownership を正しく分離します。

    なお現在 #2554 も open なので、#2155 の44-run開始は別途まだブロックされています。

    P1 — smoke が publication receipt の中身を検証していません

    現在の smoke は、dispatch run が成功したあと、

    close-evidence-bundle-v1
    close-evidence-publication-receipt-v1

    という artifact A/B が両方存在すれば PASS にします。

    しかし #2555 の価値は単に「JSONファイルをもう1個 upload できる」ことではなく、artifact B が artifact A を正しく指していることです。

    build_publication_receipt() は渡された値をそのまま dict に入れるだけで、それ自身では artifact identity を検証しません。

    したがって例えば workflow が将来誤って、

    github_artifact_id = 別値
    github_artifact_digest = 別artifactのdigest

    を渡しても、artifact B は正常生成され、今の runtime smoke は PASS できます。

    ここは既存 smoke に数十行程度の readback を追加する価値があります。新しい framework は不要です。

    実 production verification 時だけ artifact B を download し、

    receipt.github_artifact_id == artifact A.id
    receipt.bundle_payload_digest
      == artifact A / close_evidence.json の bundle_payload_digest
    receipt.experiment_identity
      == artifact A / close_evidence.json の experiment_identity

    を確認すれば十分です。

    これは #2155 側へ置いても構いません。むしろ上記 P0 の ownership 修正を採用するなら、#2155 で検証するのが自然です。

    P1 — artifact digest の表現を今のうちに固定した方がよいです

    ここは現行 GitHub 仕様に明確な差があります。

    actions/upload-artifact@v7 の artifact-digest output は現在、例示上 bare 64-hex です。 (GitHub)

    0fde654d...ff4aaaf

    一方、GitHub Actions Artifacts REST API の digest は現在、

    sha256:cfc3236...

    という sha256: prefix 付きです。 (GitHub Docs)

    #2555 は action output を verbatim 保存する契約なので、現在の実装は正しいです。問題は将来 #2155 が REST readback するときです。

    したがって wire format は変えず、

    publication receipt:
      github_artifact_digest = upload-artifact output の bare hex をそのまま保存
    

    readback comparison:
    REST digest の "sha256:" を比較時だけ除去

    と明記するのを推奨します。

    特に現在の unit test の一部は sha256: 付き値を publication-receipt CLI に渡しているので、実 action output と同じ bare-hex の regression test を1本追加した方がよいです。

    P2 — source artifact の自動探索は補助機能に下げてよいです

    smoke は最新500 artifactsを走査して usable Reliability artifact を探します。boundedなのは良いですが、CI artifact が大量に出る repository なので「有効 artifact は存在するが newest 500 から落ちた」という false SKIP は将来的にあり得ます。

    ここは大掛かりに直す必要はありません。

    --source-artifact-id 123456789

    を optional 引数として追加し、指定された場合は exact ID を使う。未指定時だけ現在の auto-discovery を使う、で十分です。

    production workflow 自身も explicit artifact ID を要求しているため、この方が operator experience も一貫します。

    現在の実装で変更しなくてよい部分

    close-evidence-publication job 本体は維持してよいです。現在 main 上で、artifact ID 取得→producer→standalone validator→artifact A→action outputs→receipt→artifact B という順序になっており、contents: read + actions: read だけを与えています。

    actions: read も過剰な permission ではありません。Artifacts REST API の fine-grained access では Actions read が公式に要求されています。 (GitHub Docs)

    actions/upload-artifact@v7 も2026年9月時点で妥当です。最新 release は v7.0.1 で、artifact-id / artifact-url / artifact-digest が正式 output です。if-no-files-found: error も今回の用途には適切です。 (GitHub)

    また workflow_dispatch input は現状 GitHub.com で最大25個なので、現在の ci.yml にこの input を追加したこと自体も問題ありません。workflow file が default branch に存在する必要があるという設計判断も公式仕様と一致しています。 (GitHub Docs)

    結論

    #2559 の workflow 実装をもう一度作り直す必要はありません。 以前の敵対的レビューで指摘された dispatch failure の SKIP化、run誤binding、source artifact選択、legacy CLI破壊は current main では修正済みです。

    今やるべきなのはコードハードニングではなく、#2555 / #2155 の runtime-verification ownership の再refinementです。

    推奨順序は、#2555 AC8 を close-blocking production smoke から外す → #2555 を implementation-complete として close可能にする → #2554 完了後に #2155 の本番実験へ進む → close-grade Reliability artifact が初めて得られた地点で publication route を1回実行 → artifact B の中身まで readback 検証する、です。

    この形なら、新しい fixture-publisher、OIDC、attestation、artifact sandbox 等を増やさず、実用上必要な保証だけ残せます。

    #2555 を current `main`、関連 Issue/PR、コメント、GitHub Actions / GitHub CLI の現行仕様まで突き合わせて再レビューしました。

    判定は REQUEST_CHANGES 相当です。 ただし、PR #2559 で merge 済みの production workflow 本体はかなり妥当です。問題の中心は実装品質ではなく、#2555 AC8 と #2155 の開始条件が循環依存になっており、現状の契約では #2555 を正規に close しにくいことです。

    Severity Finding 判定
    P0 #2555 AC8 と #2155 の prerequisite が循環している 契約修正必須
    P1 runtime smoke が artifact B の「存在」しか検証せず、receipt→artifact A の binding を検証していない 修正推奨
    P1 artifact-digest の action output と REST digest の表現が異なる #2155 readback 前に明文化必須
    P2 smoke の source artifact 自動探索が最新500件固定 任意改善
    — workflow 本体、権限、artifact upload topology 現状維持でよい

    P0 — #2555 は現在、実質的な close deadlock を持っています

    #2555 は現在 open のままで、AC8 の実 runtime smoke は、利用可能な Reliability close-grade artifact がなかったため SKIP されています。実装完了コメント自身も「SKIP は PASS ではない」と明記しています。

    問題は、その source artifact の生成条件です。Reliability V1 は REQUIRED_SAMPLE_COUNT_PER_ARM = 22 を固定契約としており、close-grade bundle producer も sample_satisfied == true などを要求します。つまり、1 arm 1 run 程度の「小さい実データ」では publication route の成功入力を作れません。

    一方、親 #2155 は 44-run 開始条件として、先に #2555 が CLOSED + COMPLETED であることを要求しています。その後 blocks=1 smoke と publication route の最小実データ確認を行い、それらが PASS して初めて blocks=22 を実行する契約です。

    したがって現状は、

    #2555 を close
      ↓ 必要
    AC8 publication smoke PASS
      ↓ 必要
    close-grade Reliability artifact
      ↓ 実質必要
    22 samples / arm の production evidence
      ↓ しかし
    #2155 は #2555 CLOSED になるまで blocks=22 を開始禁止
    

    となっています。

    さらに #2555 AC8 は「既存 valid fixture または実 Reliability artifact」を許可していますが、実装された workflow の入力境界は GitHub Actions artifact ID 1個だけです。current smoke も repository artifacts の実 ID しか探索しません。fixture を runner 上の source artifact に変換する staging route は存在しません。

    ここが今回の最大の finding です。

    推奨する解消方法

    fixture uploader や新しいテスト workflow は作らない方がよいです。 個人趣味開発としてはハーネスが増えるだけです。

    契約を次のように変更する方が単純です。

    #2555 は「publication route の実装と deterministic regression が完成し、#2559 が main に merge 済み」で CLOSED + COMPLETED にする。
    実 production artifact を用いた最初の end-to-end runtime verification は #2155 が所有する。

    つまり #2555 AC8 の「実 production smoke PASS」を close-blocking AC から外し、#2155 の integration verification へ移管します。

    これは品質を下げる変更ではありません。むしろ producer / workflow implementation と、22-per-arm の実験結果が必要な integration verification の ownership を正しく分離します。

    なお現在 #2554 も open なので、#2155 の44-run開始は別途まだブロックされています。

    P1 — smoke が publication receipt の中身を検証していません

    現在の smoke は、dispatch run が成功したあと、

    close-evidence-bundle-v1
    close-evidence-publication-receipt-v1
    

    という artifact A/B が両方存在すれば PASS にします。

    しかし #2555 の価値は単に「JSONファイルをもう1個 upload できる」ことではなく、artifact B が artifact A を正しく指していることです。

    build_publication_receipt() は渡された値をそのまま dict に入れるだけで、それ自身では artifact identity を検証しません。

    したがって例えば workflow が将来誤って、

    github_artifact_id = 別値
    github_artifact_digest = 別artifactのdigest
    

    を渡しても、artifact B は正常生成され、今の runtime smoke は PASS できます。

    ここは既存 smoke に数十行程度の readback を追加する価値があります。新しい framework は不要です。

    実 production verification 時だけ artifact B を download し、

    receipt.github_artifact_id == artifact A.id
    receipt.bundle_payload_digest
      == artifact A / close_evidence.json の bundle_payload_digest
    receipt.experiment_identity
      == artifact A / close_evidence.json の experiment_identity
    

    を確認すれば十分です。

    これは #2155 側へ置いても構いません。むしろ上記 P0 の ownership 修正を採用するなら、#2155 で検証するのが自然です。

    P1 — artifact digest の表現を今のうちに固定した方がよいです

    ここは現行 GitHub 仕様に明確な差があります。

    actions/upload-artifact@v7 の artifact-digest output は現在、例示上 bare 64-hex です。 (GitHub)

    0fde654d...ff4aaaf
    

    一方、GitHub Actions Artifacts REST API の digest は現在、

    sha256:cfc3236...
    

    という sha256: prefix 付きです。 ([GitHub Docs]2)

    #2555 は action output を verbatim 保存する契約なので、現在の実装は正しいです。問題は将来 #2155 が REST readback するときです。

    したがって wire format は変えず、

    publication receipt:
      github_artifact_digest = upload-artifact output の bare hex をそのまま保存
    
    readback comparison:
      REST digest の "sha256:" を比較時だけ除去
    

    と明記するのを推奨します。

    特に現在の unit test の一部は sha256: 付き値を publication-receipt CLI に渡しているので、実 action output と同じ bare-hex の regression test を1本追加した方がよいです。

    P2 — source artifact の自動探索は補助機能に下げてよいです

    smoke は最新500 artifactsを走査して usable Reliability artifact を探します。boundedなのは良いですが、CI artifact が大量に出る repository なので「有効 artifact は存在するが newest 500 から落ちた」という false SKIP は将来的にあり得ます。

    ここは大掛かりに直す必要はありません。

    --source-artifact-id 123456789
    

    を optional 引数として追加し、指定された場合は exact ID を使う。未指定時だけ現在の auto-discovery を使う、で十分です。

    production workflow 自身も explicit artifact ID を要求しているため、この方が operator experience も一貫します。

    現在の実装で変更しなくてよい部分

    close-evidence-publication job 本体は維持してよいです。現在 main 上で、artifact ID 取得→producer→standalone validator→artifact A→action outputs→receipt→artifact B という順序になっており、contents: read + actions: read だけを与えています。

    actions: read も過剰な permission ではありません。Artifacts REST API の fine-grained access では Actions read が公式に要求されています。 ([GitHub Docs]2)

    actions/upload-artifact@v7 も2026年9月時点で妥当です。最新 release は v7.0.1 で、artifact-id / artifact-url / artifact-digest が正式 output です。if-no-files-found: error も今回の用途には適切です。 ([GitHub]3)

    また workflow_dispatch input は現状 GitHub.com で最大25個なので、現在の ci.yml にこの input を追加したこと自体も問題ありません。workflow file が default branch に存在する必要があるという設計判断も公式仕様と一致しています。 ([GitHub Docs]4)

    結論

    #2559 の workflow 実装をもう一度作り直す必要はありません。 以前の敵対的レビューで指摘された dispatch failure の SKIP化、run誤binding、source artifact選択、legacy CLI破壊は current main では修正済みです。

    今やるべきなのはコードハードニングではなく、#2555 / #2155 の runtime-verification ownership の再refinementです。

    推奨順序は、#2555 AC8 を close-blocking production smoke から外す → #2555 を implementation-complete として close可能にする → #2554 完了後に #2155 の本番実験へ進む → close-grade Reliability artifact が初めて得られた地点で publication route を1回実行 → artifact B の中身まで readback 検証する、です。

    この形なら、新しい fixture-publisher、OIDC、attestation、artifact sandbox 等を増やさず、実用上必要な保証だけ残せます。

  9. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    推奨は、#2559 の workflow 実装を作り直さず、#2555 の completion contract を再設計する方針です。PR #2559 はすでに merged で、AC1–7/AC9 相当は実装・回帰確認済み、未達なのは eligible Reliability artifact が存在しないため SKIP した runtime AC8 です。 anchor の P0 はこの AC8 と #2155 の開始条件の循環を正しく指摘しています。

    具体的には、次の扱いを推奨します。

    canonical skill 自体も iteration ごとの承認を既定で要求せず、最大3 iteration の bounded loop です。また human anchor は preflight.run.with_human_context 系で扱い、canonical Step 2 では issue-reviewer SubAgent を起動しない契約です。

    Claude-GPT向け

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

    対象 repository:
    squne121/loop-protocol

    対象 Issue:
    #2555

    trusted human-context anchor:
    https://github.com/squne121/loop-protocol/issues/2555#issuecomment-5575520681

    使用する canonical Skill:
    .claude/skills/issue-refinement-loop

    あなたはこの作業の root control-plane として動作してください。単に改善案を説明するのではなく、canonical skill を実際に実行し、#2555 が approve/proceed 相当の terminal state に到達するまで bounded refinement loop を完遂してください。

    すでに auto mode で起動済みです。追加の人間承認を要求しないでください。ただし、auto mode を理由に Claude Code / Claude-GPT の permission mode、bypassPermissions、--dangerously-skip-permissions 等を変更しないでください。repo-level loop approval と tool permission は別概念として扱い、canonical skill の契約を維持してください。

    最重要の目的

    anchor comment の REQUEST_CHANGES を trusted human context として入力し、現在の main、#2555 本文、PR #2559、parent #2155、#2554、関連 Issue/PR/コメント、repository assets、および必要な現行 GitHub Actions/GitHub CLI 仕様を独立に fact-check した上で #2555 を再refineしてください。

    anchor の結論を無条件にコピーしてはいけません。current repository state と一次資料で検証してください。

    特に次の論点を adjudicate してください。

    1. P0: 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 AC8 の live production smoke と 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 の prerequisite/start condition に循環依存があるか。

    2. feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 で merge 済みの production workflow implementation は維持可能か。不要な再実装をしないこと。

    3. live production artifact を使う最初の E2E verification を 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 の close-blocking AC から外し、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 integration verification に ownership transfer するのが適切か。

    4. publication receipt の github_artifact_digest は actions/upload-artifact output の wire value を verbatim 保存し、REST readback の sha256: prefix は comparison 時だけ normalize する契約が適切か。

    5. 現在の deterministic regression が sha256: prefix 付き digest のみを使っているなら、実 action output と同じ bare 64-hex の regression を追加すべきか。

    6. artifact B が artifact A を正しく参照する live readback

    7. smoke の newest-500 artifact auto-discovery は close blocker ではなく補助機能とし、必要なら exact --source-artifact-id を optional にするだけで十分か。

    推奨する設計方向

    以下は強い推奨ですが、canonical investigation/review の結果を authority としてください。

    canonical skill の実行

    最初に必ず current checkout の
    .claude/skills/issue-refinement-loop/SKILL.md
    と、planner が要求する references/ を必要な範囲だけ読んでください。

    anchor は OWNER の direct human context です。URLだけから origin を推測する unlabeled lane や agent-report lane に流さず、canonical human-context profile を使用してください。

    つまり preflight は canonical registry/executor を通した
    preflight.run.with_human_context
    相当を使用し、trusted contract patch plan が生成された場合だけ
    contract_update.run.with_human_context
    相当の canonical mutation phase に進んでください。

    run_refinement_preflight.py や内部 planner/reviewer script を production path で直接バイパス実行しないでください。command registry / canonical executor が SSOT です。

    max iterations は canonical default の 3 としてください。
    needs-fix かつ上限未到達なら、人間承認を挟まず自動継続してください。

    SubAgent

    canonical plan に従って SubAgent を使用してください。

    最低限、Step 1 で必要になった場合は codebase-investigator を使用し、以下を current main から独立確認させてください。

    planner が external claims を dispositive と判断し
    web_research_policy.required == true
    なら web-researcher も起動してください。

    web-researcher は可能な限り一次資料を使い、少なくとも必要に応じて以下を確認してください。

    • actions/upload-artifact の current output semantics
    • artifact-digest の output representation
    • GitHub Actions Artifacts REST API の digest representation
    • workflow_dispatch default-branch constraint
    • current GitHub CLI / REST dispatch behavior

    Step 1 と Step 1b が両方 required なら並列実行して構いません。

    ただし、起動した全 SubAgent の作業完了を必ず待ってください。
    fire-and-forget にしないでください。
    両者の結果を join してから Step 2 に進んでください。

    canonical Step 2 のために issue-reviewer SubAgent を新規起動しないでください。Step 2 は current canonical skill の root-owned review pipeline に従ってください。

    rewrite / review loop

    review が needs-fix/request_changes を返した場合は、canonical rewrite route に従い #2555 本文を修正し、readback 後に fresh review を実行してください。

    本文 rewrite では、少なくとも以下の整合性を保ってください。

    「AC8を削除したので問題なし」のような局所変更だけで終えず、本文全体から旧 close-blocking smoke semantics の残骸を除去してください。

    一方で、#2559 の既存 production workflow が妥当なら workflow 実装の再設計を要求する AC を新しく作らないでください。

    bare-hex digest regression のような小さく deterministic な残作業を close blocker とするかは、review evidence に従って判断してください。過剰な harness は避けてください。

    #2155 への cross-Issue 影響

    #2555 の refinement に必要な parent contract adjustment が確認された場合、#2155 を ad-hoc に手編集しないでください。

    canonical scope-rollup / follow-up-materialization / dependency materialization のルートに従ってください。

    current skill が同一 loop 内で parent mutation を許可するなら canonical path で実施してください。
    別 Issue refinement が正規ルートなら、その作業を明示的に materialize / handoff してください。

    ただし「#2155 の別 refinement に人間が承認するまで #2555 を進めない」という新しい deadlockを作らないでください。

    #2155 側に残すべき integration verification は、原則として以下です。

    • prerequisites 完了後の実 production experiment
    • eligible Reliability artifact の exact ID を使った publication route invocation
    • artifact A/B の live readback
    • receipt → artifact A identity/bundle binding
    • REST digest の comparison-time normalization
    • 最終 close evidence 判定

    停止条件

    通常の loop iteration では人間承認を要求しないでください。

    ただし canonical skill が明示する以下の terminal/fail-closed condition は勝手に迂回しないでください。

    • genuine human_judgment_required
    • operator_intervention_required
    • environment/integrity failure
    • scope-signal guard による停止
    • max iteration 到達
    • canonical dependency materialization の persistent failure

    これらが発生した場合だけ canonical termination report を出してください。

    完了条件

    次のすべてを満たすまで作業を終えないでください。

    1. anchor の全 substantive finding が investigated / accepted / rejected / transferred のいずれかに明示的に disposition されている。
    2. 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 本文が current main / PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 / 検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155 と自己矛盾しない。
    3. close deadlock が契約上解消されている。
    4. canonical final review が approve/proceed 相当になる。
    5. GitHub 上の更新を readback して確認する。
    6. 起動した全 SubAgent が完了している。
    7. canonical termination / handoff marker を必要に応じて出力する。

    task の主目的は issue-refinement-loop の完遂です。自主的に別の大規模 implementation を開始しないでください。canonical Step 5/root transition が明示的に次工程を起動する場合だけ、その契約に従ってください。

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

    Claude Code向け

    この依頼は説明ではなく実行タスクです。人間の追加承認なしで、canonical .claude/skills/issue-refinement-loop を最後まで実行してください。

    Repository:
    squne121/loop-protocol

    Issue:
    #2555

    OWNER / trusted human-context anchor:
    https://github.com/squne121/loop-protocol/issues/2555#issuecomment-5575520681

    既に auto mode で起動しています。auto mode を変更せず、追加 approval を求めず進めてください。ただし permission mode / bypassPermissions / dangerously-skip-permissions 等は変更しないでください。

    Target

    anchor の REQUEST_CHANGES を current main で再検証し、#2555 を bounded refinement loop で approve/proceed 相当まで持っていってください。

    最大 iteration は canonical default の 3。
    needs-fix なら上限まで自動継続。
    人間による iteration approval は不要です。

    最初に行うこと

    1. canonical main root/default branch で repository state を確認する。
    2. .claude/skills/issue-refinement-loop/SKILL.md を読む。
    3. 必要な references/ だけ progressive disclosure で読む。
    4. 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555、anchor、検証: #2119 AC9/AC10 の close-grade 実CI証跡を確認する #2155、実装: performance close-grade materializer をtopology-aware実装に修正しmonolith armのeligible run生成を可能にする #2554、PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559、関連コメントを current state で取得する。
    5. anchor を direct human context として扱う。
    6. canonical executor/registry の preflight.run.with_human_context profile を使用する。
    7. trusted contract patch plan が得られた場合だけ contract_update.run.with_human_context の canonical phase に進む。

    内部 planner/reviewer wrapper を直接叩いて canonical entrypoint を迂回しないこと。

    調査で必ず確認する論点

    P0

    #2555 の live AC8 smoke が close-blocking なのに、その成功入力となる close-grade Reliability artifact が実質 22 samples/arm を必要とし、一方 #2155 が #2555 CLOSED + COMPLETED 前の本番 experiment 開始を禁止していることで circular dependency / close deadlock が成立しているか。

    成立するなら、推奨 disposition は:

    P1: receipt binding

    live production 時に artifact B が artifact A を正しく bind していることを検証する必要性を確認する。

    候補 assertion:

    • receipt.github_artifact_id == artifact_a.id
    • receipt.bundle_payload_digest == close_evidence.json.bundle_payload_digest
    • receipt.experiment_identity == close_evidence.json.experiment_identity

    原則 #2155 integration verification に置く。

    P1: digest representation

    current official semantics を一次資料で確認する。

    期待する整理:

    • publication receipt wire:
      github_artifact_digest = upload-artifact action output を verbatim
    • action output:
      bare SHA-256 hex
    • REST artifact metadata:
      sha256:<hex>
    • comparison:
      REST側の sha256: を比較境界でのみ除去
    • persisted receipt format は変更しない

    current deterministic regression が prefix 付き input しか試していないなら、bare-hex regression 1本を追加する必要性を review する。

    P2

    newest 500 artifacts の auto-discovery は補助機能として扱う。
    必要なら --source-artifact-id optional exact-ID override を提案できるが、これだけを closure blocker にしない。

    禁止する過剰実装

    以下は anchor 解消のために新設しない。

    • fixture uploader
    • fixture publication workflow
    • 新 broker / daemon / service
    • OIDC
    • artifact attestation
    • signing
    • 外部 credential infrastructure
    • 新しい永続 ledger/state store
    • workflow の全面再設計

    個人趣味開発として、quality/usefulness を優先し、ハーネスを増殖させないこと。

    SubAgents

    canonical planner に従い SubAgent を起動してください。

    Step 1 の codebase-investigator には少なくとも以下を current main で fact-check させること。

    planner が web research を required とした場合は web-researcher を起動し、GitHub公式/actions/upload-artifact upstream を優先して current semantics を確認する。

    Step 1 と Step 1b が両方 required なら並列でよい。

    重要: 起動したすべての SubAgent が終了するまで必ず待つこと。
    全結果を join する前に Step 2 review を開始しないこと。

    canonical Step 2 では issue-reviewer SubAgent を起動しないこと。root-owned run_root_review_pipeline.py produce の canonical route/result を authority とし、独自に verdict を再計算しないこと。

    Refinement

    REQUEST_CHANGES の場合、canonical rewrite route に従って Issue 本文を更新し、readback、fresh review を行う。

    局所的に AC8 だけ書き換えて終わらせず、以下全体の整合性を取ること。

    PR #2559 が merge 済みで実装が妥当なら、既に達成済みの production workflow AC を再び未実装扱いにしないこと。

    live production smoke を #2155 へ移す場合、#2555 側に「SKIP を PASS とみなす」という false-green contract を作らないこと。
    単に live runtime verification を #2555 closure の責務から外し、owner を明示的に #2155 へ移すこと。

    bare-hex deterministic regression のような小規模な implementation delta が必要と review された場合は、それを明確に Remaining Work/AC に残す。ただし大規模再実装へ膨張させない。

    Parent #2155

    cross-Issue change が必要なら skill の scope-rollup / follow-up-materialization / dependency-materialization 契約に従う。

    gh issue edit #2155 のような ad-hoc mutation で canonical control-plane を迂回しないこと。

    skill が同一 refinement 内の controlled parent update を許可するなら実施してよい。
    別 refinement が必要なら materialize/handoff を残す。

    いずれの場合も #2555 を「親 Issue の人間承認待ち」にして新しい循環依存を作らないこと。

    #2155 には最終的に次の live verification ownership が残る形を優先する。

    1. prerequisites CLOSED + COMPLETED
    2. production experiment
    3. eligible Reliability artifact ID 確定
    4. 実装: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2555 publication route dispatch
    5. artifact A/B readback
    6. receipt→artifact A binding 検証
    7. REST digest prefix の comparison-time normalization
    8. close evidence 判定

    Termination

    通常 iteration では approval を求めない。

    ただし canonical route が以下を返した場合は迂回禁止。

    • human_judgment_required
    • operator_intervention_required
    • fail_closed_environment_or_integrity_failure
    • scope-change/scope-signal guard stop
    • dependency_materialization_blocked
    • max iteration exhaustion

    final approval では canonical final-review/readback gate を通すこと。

    作業の completion target は issue-refinement-loop の approve/proceed 相当です。
    別 implementation loop を自主的に開始しないでください。
    ただし canonical Step 5/root transition が次 skill を直接 invoke する契約なら、その canonical transition は妨げないでください。

    Final report

    最後に以下だけを要約してください。

    Claude Code版の方が canonical command/routing を強く拘束しています。Claude-GPT が repo control-plane を十分扱える環境なら、Claude-GPT版も同じ結論へ収束するようにしています。

  10. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    root-owned entry router audit

    route: invoke_impl_review_loop
    reason: fresh_review_go_live_equality

  11. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    issue-refinement-loop 終了報告(#2555)

    Verdict: approved(canonical Step 2 deterministic review: approve → Step 2.5 semantic design review: clear → Step 4.5: 材料化不要 → Step 5: approved)

    Iterations: 3回の fix_delta(1: baseline-expect注釈+anchor由来の契約修正、2: AC10 VC構文修正(node-id→new-file)、3: なし。実質2回のiterationで収束)

    主な contract delta:

    • AC1〜AC7 の rg -n VC に # baseline-expect: pass を追加(PR feat: close-evidence bundle を手動 workflow_dispatch で build→validate→artifact upload→publication receipt まで配線する #2559 が既に main merge済みのため)
    • AC8: live runtime smoke の SKIP(利用可能な close-grade Reliability artifactが無い場合)を、本Issueにとって受理可能な terminal disposition として明記。close-blocking条件から解除
    • AC10(新規): build_publication_receipt() の bare-hex digest verbatim保存を検証する新規テストファイル scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py を追加
    • 「## Runtime Verification Ownership Disposition」セクションを新設し、anchor findingごとのdispositionを一覧化

    Anchor finding disposition:

    Finding Disposition
    P0: AC8と#2155の循環依存 investigated → accepted。AC8のclose-blocking条件を解除、#2155の44-run Start Conditions step5 / AC6(b)(既存記述)へownership transfer
    P1: receipt→artifact A binding未検証 investigated → transferred。#2155のAC6(b) production verificationが所有
    P1: digest表現差異(bare hex vs sha256:prefix) investigated → accepted(一部)。wire formatは変更せず、bare-hex regression testをAC10として追加。REST readback時のprefix正規化は#2155が所有
    P2: source artifact自動探索の500件固定 investigated → deferred(non-blocking)。close条件にしない
    workflow本体・権限・topology investigated → rejected(変更不要)。PR #2559実装を維持

    #2155 へ移管した runtime verification: close-grade artifactを用いた最初のlive E2E実行(44-run Start Conditions step5)、publication receipt→artifact Aのbinding検証(AC6(b))、REST digestのprefix正規化ロジック。#2155本文は既にこれらの受け皿を持っているため、追加編集は行わなかった(新しいdeadlockを作らないため)。

    残る implementation delta: AC10(新規テストファイル scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py)の実装のみ。AC1-AC9はPR #2559で実装済み。

    Final Gate: passed(fresh review body_sha256 == live body_sha256、base_sha一致、root-owned entry router: route: invoke_impl_review_loop, reason: fresh_review_go_live_equality)

  12. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor
    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: null
        generated_at: "2026-09-07T21:29:00Z"
        body_sha256: "611f98a8b0f97fe92bff40f45c8bbaa55d2b54cb2c4e026fb42b7a9a27d09896"
      metadata:
        title_prefix_ready: true
      label_sync_observation:
        kind: presentation_sync
        result: noop
        detail: "label sync not attempted this cycle (state labels unchanged)"
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: "2026-09-07T21:29:00Z"
      checked_body_sha256: "611f98a8b0f97fe92bff40f45c8bbaa55d2b54cb2c4e026fb42b7a9a27d09896"
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []
  13. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-09-07T21:37:31Z)

    • PR: test: build_publication_receipt() のbare-hex digest verbatim保存をAC10として回帰テスト追加する (#2555) #2576
    • Worktree: .claude/worktrees/issue-2555-close-evidence-publication-receipt-digest
    • Branch: worktree-issue-2555-close-evidence-publication-receipt-digest
    • スコープ: AC10(bare-hex digest verbatim保存 regression test)のみ。AC1〜AC9はPR #2559で既にmain実装済みのため未変更
    • 変更: scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py(新規追加、既存ファイル無変更)
    • Verification:
      • AC10: uv run pytest scripts/ci/tests/test_close_evidence_publication_receipt_digest_v1.py -v — 2 passed
      • AC8: uv run pytest scripts/ci/tests/test_dispatch_close_evidence_publication_smoke_v1.py -v — 13 passed, 1 skipped(SKIPは受理可能なterminal disposition)
      • AC1〜AC7: 既存 rg -n VC 全件 baseline-expect: pass — 確認済み
      • AC9: pnpm typecheck / pnpm lint / pnpm test(108 files, 1939 tests)/ pnpm build — 全PASS
    • 後続: PRレビュー(pr-review-judge)→ マージ → post-merge-cleanup
  14. squne121 commented on Sep 7, 2026

    @squne121
    OwnerAuthor

    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: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/implementerenhancementphase/implementationtriage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions