Repository navigation
Closed as not planned
5 / 55 of 5 issues completedClosed as not planned
5 / 55 of 5 issues completed
Copy link
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Description
Machine-Readable Contract
contract_schema_version: v1
issue_kind: parent
goal_ref: "current-head TEST_VERDICT_MACHINE/v2 の実行証跡・専用公開・consumer 判定を分離し、手書き入力では current-head PASS を公開できない trust chain を delivery-rollup として完結する"
change_kind: workflow
parent_mode: delivery-rollup
closure_mode: child-completeSummary
#1640 の current-head verification を fail-closed のまま再開できる TEST_VERDICT trust chain の親トラッカー。
Goal
保護された GitHub Actions producer、HEAD-bound 専用 publisher、materializer/adjudicator consumer を順序付き child Issue に分割し、自己申告 JSON や generic comment publisher だけでは PASS を公開できない状態にする。
Desired Destination
3 child Issue が順に完了し、current PR HEAD・Issue contract SHA・per-AC execution record・GitHub Actions artifact digest・publisher receipt が同一 transaction chain で照合される。#1640 など既存 PR は、その chain のマージ後に fresh evidence を再生成して review を再実行できる。
Current Validated Scope
- generic
issue_comment.publishは作成済みcomment_bodyと marker の投稿だけを担い、TEST_VERDICT の trust boundary を提供しない。 adjudicate_vc_result.pyは self-attested TEST_VERDICT fields を検証するが、producer receipt と実 artifact bytes の authority chain を要求しない。- test-runner は read-only であり、Issue 固有 VC の per-AC execution record を GitHub Actions artifact として生成する protected producer がない。
- 修正: impl-review-loop の独立VCを Step 4 起動前の current-head gate に接続し TEST_VERDICT 旧経路を非規範化する #88 は Step 2/4 の docs-only 投稿責務を所有するが、read-only test-runner の実行可能な投稿経路を提供しない。
Outcome
Child A〜C の GitHub Issue、native sub-issue、dependency readback を含む delivery-rollup が作成され、current-head TEST_VERDICT trust chain を 3 本の独立した 1 Issue = 1 PR 契約として追跡できる。
Decisions Fixed
- 2026-07-19:
TEST_VERDICT_MACHINE/v2の workflow/check/artifact binding を維持するため、execution record の authority は protected GitHub Actions producer とする。 - 2026-07-19: generic
issue_comment.publishの意味を広げず、test_verdict.publish専用 transaction で pre/post HEAD barrier と receipt binding を実装する。 - 2026-07-19: materializer/adjudicator/Step 2 integration は producer と publisher のマージ後に扱い、修正: impl-review-loop の独立VCを Step 4 起動前の current-head gate に接続し TEST_VERDICT 旧経路を非規範化する #88 の docs-only 契約はこの child に統合して supersede 条件を記録する。
Quality Decision Record
- Status: N/A
- Decision Date: 2026-07-19
- Does this prove the parent goal complete?: N/A
- Reason: delivery-rollup parent のため child complete を closure 条件とする。
- Evidence: anchor comment #issuecomment-5015519243 と live executor/adjudicator readback。
- Next Action: Child A の protected execution artifact producer を起票する。
Parent Closure Rule
- delivery-rollup: Child A、Child B、Child C が closed で、各 child の linked PR が merged かつ parent checklist の readback が完了したとき close する。
- quality-gate: N/A
- routing-map: N/A
- decision-log: N/A
Child Issues
- 実装: protected TEST_VERDICT execution artifact producer を追加する #1646 — protected GitHub Actions execution artifact producer
- 実装: HEAD-bound TEST_VERDICT publisher transaction を追加する #1647 — HEAD-bound
test_verdict.publishtransaction(実装: protected TEST_VERDICT execution artifact producer を追加する #1646 完了後) - 実装: TEST_VERDICT consumer integration を追加する #1648 — materializer/adjudicator/Step 2 integration と 修正: impl-review-loop の独立VCを Step 4 起動前の current-head gate に接続し TEST_VERDICT 旧経路を非規範化する #88 supersede(実装: protected TEST_VERDICT execution artifact producer を追加する #1646・実装: HEAD-bound TEST_VERDICT publisher transaction を追加する #1647 完了後)
Remaining Parent Gaps
- Child A の workflow artifact schema と retention の実装
- Child B の publisher receipt、pre/post HEAD barrier、idempotency の実装
- Child C の receipt consumer、E2E regression、Step 2 / test-runner 文書整合
- fix: contract snapshot の base SHA freshness を強制する (#1635) #1640 の fresh evidence 再生成と review rerun(child 完了後の運用)
Phase Handoff Contract
- Desired Destination: current-head verification evidence を protected producer から dedicated publisher 経由で consumer へ渡す。
- Current Validated Scope: 各 child の本文に記した単一 trust-chain layer に限定する。
- Remaining Parent Gaps: 後続 child と fix: contract snapshot の base SHA freshness を強制する (#1635) #1640 rerun を parent が追跡する。
- Current Objective: Child A から順に 1 Issue = 1 PR で実装する。
- Bounded Current Context: 実装: current-head TEST_VERDICT artifact の sanctioned producer を追加する #1645 anchor comment、修正: impl-review-loop の独立VCを Step 4 起動前の current-head gate に接続し TEST_VERDICT 旧経路を非規範化する #88、実装: contract snapshot の base SHA freshness を強制する #1635 / PR fix: contract snapshot の base SHA freshness を強制する (#1635) #1640 の evidence blocker。
- Normative References:
docs/dev/agent-skill-boundaries.md、docs/dev/workflow.md。 - Allowed Paths: child Issue ごとに固定する。
- Required Skills: child Issue ごとに固定する。
- Validation Commands: child Issue ごとに AC 単位で固定する。
- Stop Conditions: cross-layer write、workflow authority の縮小、receipt/HEAD barrier の fail-open を検知した場合。
- Open Questions: artifact retention の具体値は Child A で current GitHub Actions policy を readback して決める。
- Next Action: Child A を作成し、Child B/C を依存関係付きで作成する。
- Artifact Refs: 実装: current-head TEST_VERDICT artifact の sanctioned producer を追加する #1645 (comment)
- Handoff Prompt Draft: child contract の Allowed Paths と AC/VC を越えない。
- Linked PR: N/A
Acceptance Criteria
- AC1: Child A、Child B、Child C が native sub-issue として 実装: current-head TEST_VERDICT artifact の sanctioned producer を追加する #1645 に登録され、A → B → C の依存順が本文と GitHub readback で一致する。
- AC2: Child A は Issue VC の per-AC execution record を protected GitHub Actions artifact として生成する責務だけを持つ。
- AC3: Child B は producer receipt と pre/post publish HEAD barrier を検証する dedicated publisher だけを持つ。
- AC4: Child C は receipt consumer、materializer/adjudicator E2E、Step 2/test-runner documentation を持ち、修正: impl-review-loop の独立VCを Step 4 起動前の current-head gate に接続し TEST_VERDICT 旧経路を非規範化する #88 の supersede 条件を記録する。
- AC5: parent は generic publisher、raw comment、test-runner write 権限を正規経路に含めない。
Verification Commands
# AC1
$ uv run --locked python3 .claude/skills/create-issue/scripts/plan_child_materialization.py --repo squne121/loop-protocol --issue 1645
# AC2
$ rtk gh issue view 1645 --repo squne121/loop-protocol --json body
# AC3
$ rtk gh issue view 1645 --repo squne121/loop-protocol --json body
# AC4
$ rtk gh issue view 1645 --repo squne121/loop-protocol --json body
# AC5
$ rtk gh issue view 1645 --repo squne121/loop-protocol --json bodyAllowed Paths
- GitHub Issue 実装: current-head TEST_VERDICT artifact の sanctioned producer を追加する #1645 の parent body と native sub-issue / dependency relationships
Notes
- anchor comment の「コメント 0 件」は投稿時点の状態であり、現在は anchor 自身が存在するため live state の根拠には使わない。
Sub-issues
Collapse Sub-issuesSub-issues
Loading 5 sub-issues
Metadata
Metadata
Assignees
Labels
agent/implementerAI implementer agentenhancementNew feature or requestphase/implementationImplementation phase
Activity
squne121 commentedon Jul 19, 2026
結論
判定は
STOP / NEEDS_FIXです。現契約のまま実装しても、AC1〜AC3の中核である「手書きJSONを信用せず、実行済み結果だけを sanctioned producer として公開する」は成立しません。2026年7月19日時点で #1645 は open、コメントは0件です。対象PRもまだ見当たらず、先行する PR #1640 は fresh な current-head
TEST_VERDICT_MACHINE/v2と VC adjudication を生成できないことが直近のブロッカーになっています。P0 — 実装開始を止めるべき問題
1. 「手書きJSON拒否」を保証する trust boundary が存在しない
新規 materializer を用意しても、呼び出し側がそれを使わず、同じ形式のJSONを直接作成する経路を遮断できません。
既存の
issue_comment.publishは、入力について実質的に以下しか検査していません。ISSUE_COMMENT_PUBLISH_INPUT_V1issue_numberがCLI引数と一致comment_bodyとmarkerが文字列materializerの実行証明、materializer自身のコードID、入力元のtest-runner、GitHub Actions artifactとの関係は認証しません。
consumer側も同様です。
adjudicate_vc_result.pyはproducer_kind == test-runnerなどの自己申告値、artifact digestの書式、payloadの自己ハッシュを検査しますが、materializerのreceiptや実際にdownloadしたartifact bytesとの結合は要求しません。repositoryも期待値との一致ではなく「非空」でしか確認していません。さらに既存テストは
_manual_test_verdict()で手書きした辞書を正規入力として使用しています。つまり、#1645が拒否しようとしている入力形式を、現在のconsumer regression testが成功例として固定しています。しかし #1645 は、generic publisherとadjudicatorの変更を明示的にOut of Scopeにしています。したがってAC3は現Allowed Pathsでは実現不能です。
必要な修正
issue_comment.publishの汎用入力を流用せず、専用のtest_verdict.publishtransactionを追加すべきです。専用executorは少なくとも次を独立検証する必要があります。
materializerが生成したreceiptを専用publisherとadjudicatorの双方が要求し、汎用コメント入力だけではPASSにならない構造が必要です。
2. test-runnerの実行結果に対応するGitHub Actions artifact producerがない
test-runnerはread-only SubAgentで、Edit・Writeが禁止されています。実行可能な処理はローカルコマンドの実行と構造化報告です。一方で #1645 は、そのローカル実行結果を次のGitHub Actions資産へ束縛するよう要求しています。
しかし現在確認できるCIのtest laneがuploadしているのは
ci_runtime_baseline_v1であり、test-runnerが実行したIssue固有VCのper-AC recordではありません。既存の
ci_verdict_summary_v2.pyも「consumer canonical ownerはpr-review-judge」「impl-review-loopは直接parseしてはならない」と明記されています。過去のIssue #1540では、current-head artifact provenanceを成立させるため、
.github/workflows/ci.ymlとartifact producer自体をIn Scopeに含めていました。#1645は同等の保証を求めながら、workflow/check変更をOut of Scopeに戻しており、契約が後退しています。materializerは、存在しないprovenanceを後付けできません。 ローカル実行結果と無関係なCI artifactを照合しても、それは「同じHEADで別のテストが動いた」ことしか証明しません。
設計はどちらかに統一すべきです。
GitHub Actions authority方式
保護されたproducerがIssue VCを実行し、per-AC execution recordをartifactとしてuploadする。
controlled local execution authority方式
GitHub Actions bindingを削除し、trusted executorがコマンドを直接実行して署名相当のreceiptを返す。
現行
TEST_VERDICT_MACHINE/v2を維持するなら、前者が必要です。3. materializerがレビュー対象PR自身に含まれるため、自己証明になる
materializerをPRのHEADから実行すると、レビュー対象自身がproducerの検証ロジックを書き換えられます。
例えば将来のPRが次を変更できるなら、そのPRは自分自身にPASSを発行できます。
materialize_test_verdict_artifact.py既存controlled executorは一部publisherについてmodule realpath chainを検証していますが、#1645の新規materializerはそのtrust chainに入りません。
realpath確認だけでも不十分です。PR HEAD上の「正しいパスにある改変済みコード」は通過するからです。
必要なauthority条件
producer_source_commit/producer_tree_sha/producer_blob_sha256をreceiptに要求するこのため #1645自身は、完成後のmaterializerで自分自身を正当化できません。まず既存のtrusted review経路で #1645 をmergeし、その後に #1640などへ適用するbootstrap順序を明記すべきです。
4. materialize時にHEADが一致しても、コメント投稿時にはstaleになり得る
generic
issue_comment.publishはmarkerとbodyをreadbackしますが、PR current HEADを投稿直前・投稿直後に確認しません。成立する競合は次のとおりです。
これでは「current-head TEST_VERDICT」ではありません。
同じリポジトリの
pr_review.publishは、既にexpected_head_sha_must_match_remote_pr_headとcommit-bound postconditionを持っています。TEST_VERDICT publisherも同等以上のpreconditionが必要です。専用publisherで次を行うべきです。
expected_head_shaと比較GitHub issue comment自体をcommitへ原子的に結合するAPIではないため、postcondition barrierは省略できません。
P1 — 契約を修正しないと回帰する問題
5.
issue_numberが「投稿先PR」と「linked Issue」で衝突しているgeneric executorではinputの
issue_numberがCLIの--issue-numberと一致し、その番号を/issues/{number}/commentsの投稿先に使います。GitHubではPRコメントもIssue comments APIを使うため、投稿時の番号はPR番号でなければなりません。一方、
TEST_VERDICT内のissue_numberはlinked implementation Issueです。したがって外側のschemaを曖昧な
issue_numberにしてはいけません。に分離する必要があります。
また、
<!-- TEST_VERDICT_MACHINE v2 -->をidempotency markerに流用してはいけません。generic publisherはliteral markerが複数コメントに存在すると競合扱いにするため、verdictの再実行やHEAD更新後の新規コメントが不可能になります。parser markerとは別に、次のような一意markerが必要です。
6. Issue #88との競合はC1ではなくC2以上
#88は、test-runner自身が
TEST_VERDICT_MACHINEをPRへ投稿する責務を文書化するIssueです。現行Step 2も「test-runnerがmarker付きコメントをPRに投稿する」と記載し、test-runner文書もmarkerはtest-runner投稿コメント専用だと規定しています。
#1645はこれを、
へ変更します。これは単なるdocs追記ではなく、投稿責務の正本変更です。
しかし #1645 のAllowed Pathsには
.claude/agents/test-runner.mdがなく、「#88のtest-runner文書は変更しない」としています。結果として、Step 2とtest-runner定義が相互矛盾します。必要な処理
.claude/agents/test-runner.mdをAllowed Pathsへ追加7. AC4のVerification Commandは実装前から成功する
AC4は既存の
test_adjudicate_vc_result_non_regression_gate.pyを実行するだけですが、そのファイルはAllowed Pathsに含まれていません。さらにテストは手書きの_manual_test_verdict()を使用しています。したがって現在のAC4は、
にもかかわらずPASSします。
必要なE2Eテスト
加えて以下をnegative testにします。
8. GitHub readbackの同一性条件が不足している
GitHubのworkflow runは
id、check_suite_id、head_sha、run_attempt、event、repository、head repositoryを持ちます。artifactは一意なartifact_id、digest、expired状態、workflow run ID、repository ID、head repository ID、head SHAを返します。check runにもhead_sha、check suite ID、App identity、status、conclusionがあります。([GitHub Docs]1)materializerは少なくとも次をexact matchすべきです。
名前だけでartifactを選ぶのは不十分です。artifact IDをauthorityにし、名前は補助検査に留めるべきです。
actions/upload-artifactはartifact ID、URL、SHA-256 digestをoutputとして返すため、producer側でこれらを明示的にreceiptへ保存できます。([GitHub]2)さらに、次の2種類のdigestを混同してはいけません。
現在のadjudicatorはpayloadの自己ハッシュは確認しますが、downloadしたarchive bytesがAPI digestと一致したかまでは確認していません。
9. artifact ZIPの安全な読取り契約がない
GitHub artifact downloadはZIP archiveです。Pythonの公式ドキュメントも、信頼できないZIPを事前検査なしに展開すると、絶対パスや
..を使って展開先外へファイルを作られる可能性があると警告しています。([GitHub Docs]3)materializerは
extractall()せず、以下を検査してZipFile.read()で対象JSONだけを読むべきです。..component拒否10.
runtime_verification.required: falseは契約内容と一致しないこのIssueの中核はlive GitHub readbackです。
これらをfixture unit testだけで検証しても、実際のAPI field、pagination、権限、artifact expiry、redirect、run attemptの挙動は確認できません。
少なくともruntime verificationを次のように変更すべきです。
publisherのmutation testは別に分離できますが、read-only live verificationまで
not_applicableにするのは不適切です。推奨するIssue分割
現在のStop ConditionsとAllowed Pathsでは必要変更を取り込めないため、1 PRへ押し込まず3段階に分割するのが妥当です。
A. Trusted execution artifact producer
対象:
TEST_EXECUTION_RECORD_V1PRの未信頼コードを特権的な
pull_request_target/workflow_runcontextでcheckoutして実行するとrepository compromiseにつながり得るため、producerはread-only権限・secretなしで設計し、特権workflowから未信頼PRコードを直接実行しない構成が必要です。([GitHub Docs]4)B. Head-bound controlled publisher
対象:
controlled_skill_mutation_policy.pycontrolled_skill_mutation_exec.pytest_verdict.publishC. Materializer / adjudicator / Step 2 integration
対象:
materialize_test_verdict_artifact.pyadjudicate_vc_result.py依存順序は A → B → C です。#1645はこの3件を束ねるparent/rollupへ変更するか、少なくとも現契約をCだけへ縮小すべきです。
最低限必要なAllowed Paths追加
単一Issueのまま進めるなら、少なくとも次が必要です。
現状は「整合性を検査するmaterializer」を追加するIssueに見えますが、実際に必要なのは実行authority、producer code authority、publish authority、consumer authorityを一続きにしたprovenance chainです。そこまで契約を拡張しない限り、生成される
TEST_VERDICT_MACHINE/v2は精巧な自己申告JSONに留まります。squne121 commentedon Jul 29, 2026
you asked
message time: 2026-07-29 22:14:40
#1645
目的に到達したか検索および検討してください。
chatgpt response
Issue #1645 の目的・完了条件を起点に、関連PR、コメント、実装差分、現在のリポジトリ状態を照合します。単なる「close済み」ではなく、目的が実質的に達成されたかで判定します。
現時点では Child A(#1646)は完了しています。一方、親Issue本文のチェックリストは更新されておらず、Child B/C は追加レビューで受入条件が拡張されています。次に、各子Issueの最終状態と実際にマージされたPRを突き合わせます。
主要3子Issueの実装・マージに加え、後続の回帰修正 #1711/#1843 は実 canary まで成功していました。ただし、親Issueが要求する「実運用対象での再生成・再レビュー」と親チェックリストの完了証跡は別途確認が必要です。
結論
判定:部分達成です。
中核となる trust chain の実装はほぼ完成し、producer 層については実環境 canary まで成功しています。しかし、Issue #1645 が定義した delivery-rollup 全体の完了条件、特にライブ環境での producer→publisher→materializer/adjudicator の一気通貫確認と親チェックリストの readback が完了していません。
したがって、現時点での扱いは次のとおりです。
達成している部分
1. Child A~C はすべて実装・マージ済み
test_verdict.publish、pre/post HEAD barrier、artifact のライブreadback、digest再計算、idempotency が実装され、マージ済みです。これは #1645 の主要な3レイヤーである「protected producer」「専用publisher」「consumer integration」がコード上そろったことを意味します。
2. 初期producerの重大な欠陥も修正済み
初期実装後、#1711で以下の問題が発見されました。
command_manifest_sha256がreceiptまで正しく伝播されないPR #1843では workflow が
trusted-preflight → untrusted-execution → produceに再設計され、exact PR head、repository/commit/tree provenance、manifest digest、consumerまでのbindingが追加されました。PRはマージ済みです。現在のmain上のworkflowでも、実行前のHEAD・Issue body検証、PRコードを実行しないtrusted job、read-onlyのuntrusted jobが明確に分離されています。
execution recordのアップロード後にも再readbackし、producer receiptの生成、artifact ID検証、
pass_eligible=Trueのfail-closed gateまで実装されています。3. producerの実環境canaryは成功している
2026年7月29日のworkflow run
30454354185では、次の3ジョブがすべて成功しています。trusted-preflightuntrusted-executionproduceexecution-record生成、REST readback、archive検証、producer-receipt生成、最終
pass_eligiblegateもすべて成功しています。また、execution recordとproducer receiptの両artifactが存在し、digestが付与され、
expired: falseであることもGitHub Actions APIから確認できます。未達成または未証明の部分
1. 親Issueのclosure ruleを満たしていない
#1645は現在もopenで、最終更新は2026年7月19日のままです。Child A/B/C、Remaining Parent Gaps、AC1~AC5のチェックボックスもすべて未更新です。
さらに本文自身が、次の場合にのみcloseすると規定しています。
最初の2条件は満たしていますが、最後の親readbackがありません。
2. 実canaryはproducer層まで
確認できた実環境canaryのジョブは producer側の3ジョブだけです。そこには以下の実行は含まれていません。
test_verdict.publishによる実PRコメント投稿Child B/Cではライブreadbackロジックとfixture/E2Eテストは実装されていますが、同一のライブPRを対象として全レイヤーを通過させた証跡は確認できませんでした。したがって、#1645の「同一transaction chainで照合される」というDesired Destinationは、コード上は成立していても運用上の証明が不足しています。
3. #1640は新しいsanctioned chainの実績ではない
#1640には最終的に
TEST_VERDICT_MACHINE/v2とadjudicationが投稿されていますが、その証跡は旧来のproducer_kind: test-runner経路で、execution artifactについてもartifact_present: falseでした。つまり、#1645で実装されたprotected producer/receipt/専用publisherを通した証跡ではありません。また、#1640は2026年7月19日に既にマージされており、Child A~Cや#1843の完成より前です。
親本文に残っている「#1640のfresh evidence再生成とreview rerun」は、文字どおりには完了していません。既にマージ済みなので、別のライブPRを受入canary対象に置き換える方が合理的です。
4. #88のsupersede処理も未完了
Child Cは#88のdocs-only責務をsupersedeする設計ですが、#88自体は現在もopenです。これはtrust chainの技術的blockerではありませんが、親rollupの管理上は未処理です。
close前に必要な作業
test_verdict.publishでコメントを投稿する。最終判定
#1645は、実装完了に近い「最終統合検証待ち」の状態です。現状のままcloseするのではなく、1回のライブfull-chain acceptance runと親rollup更新を行ってからcloseするのが妥当です。
Powered by AI Exporter
squne121 commentedon Jul 30, 2026
クローズ理由(owner決定)
#1856(通常レビューの evidence authority を TEST_VERDICT 非依存の CI/merge_state_status 正本へ切替える)の実装過程で、PR #1870 レビュー(issuecomment-5136523354)にて関連Issueのロールアウト方針を確認した。
本Issue(protected TEST_VERDICT trust chain の拡張)は、#1860(AIエージェント運用を minimal harness へ縮退し、過剰な control-plane を廃止する)の方針と正面から逆行する。#1856 により通常レビューの判定は TEST_VERDICT に依存しない方向へ確定するため、TEST_VERDICT の権威をこれ以上拡張する本Issueの目的は解消しない。
決定内容は issuecomment-5136559104 に記録済み。