Repository navigation
Conversation
Preview URLPreview removed (PR #1630 closed). |
squne121
left a comment
There was a problem hiding this comment.
PR 本文の検証証跡を補完してください
実装、current HEAD の CI、契約 snapshot、Allowed Paths は確認できました。一方、PR 本文に required evidence sections がありません。次を contract と current HEAD に合わせて追加してください。
## 受け入れ条件の達成状況: AC1〜AC5 を各[x]と具体的根拠で列挙する。## 検証コマンド結果: Issue #1629 の各 Verification Command と PASS 結果(AC5 は 100 tests、補助 suite を含む total 104 tests)を列挙する。## Allowed Paths 遵守: 8 changed files が contract の Allowed Paths 内であり、renames/violations がないことを記載する。
修正後は current HEAD に対して evidence と review を再照合します。
LOOP_VERDICT_V2:
verdict: REQUEST_CHANGES
reviewed_head_sha: "1e2a5e9193641d2919024d11a51786cd4ab041de"
merge_ready: false
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers:
- "PR body に AC1〜AC5 の受け入れ条件達成状況、各 VC 結果、Allowed Paths 遵守の必須 evidence sections がない"
required_auto_actions:
- kind: update_pr_body_hygiene
executor: implementation-worker
skill: open-pr.update_pr
blocking_merge_ready: true
mechanical: true
auto_fix_applied: []
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
changed_files_source: git_diff_name_status_find_renames_z
changed_files:
- docs/dev/agent-runtime-ops.md
- docs/dev/hook-boundaries.md
- scripts/agent-guards/controlled_git_change_exec.py
- scripts/agent-guards/controlled_skill_mutation_exec.py
- scripts/agent-guards/controlled_skill_mutation_policy.py
- scripts/agent-guards/materialize_issue_scope_snapshot.py
- scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py
- scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py
allowed_paths_gate_source: review_subagent
squne121
left a comment
There was a problem hiding this comment.
レビュー結果
Issue #1629 の contract、fresh snapshot、current HEAD、検証証跡、CI、Allowed Paths を再照合しました。必須の AC 達成状況・Verification Commands・Allowed Paths 遵守が PR 本文に追加され、同一 HEAD の CI も all-pass です。schema consumer inventory と safety claim の境界・#1608 follow-up も整合しています。
LOOP_VERDICT_V2:
verdict: APPROVE
reviewed_head_sha: "1e2a5e9193641d2919024d11a51786cd4ab041de"
merge_ready: true
mergeability:
mergeable: "MERGEABLE"
merge_state_status: "CLEAN"
blockers: []
required_auto_actions: []
auto_fix_applied:
- "PR body hygiene: AC1〜AC5 の達成状況、各 Verification Command の PASS、Allowed Paths 遵守を live readback で確認"
follow_up_issue_requests: []
allowed_paths_gate:
status: ok
changed_files_source: git_diff_name_status_find_renames_z
changed_files:
- docs/dev/agent-runtime-ops.md
- docs/dev/hook-boundaries.md
- scripts/agent-guards/controlled_git_change_exec.py
- scripts/agent-guards/controlled_skill_mutation_exec.py
- scripts/agent-guards/controlled_skill_mutation_policy.py
- scripts/agent-guards/materialize_issue_scope_snapshot.py
- scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py
- scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py
allowed_paths_gate_source: review_subagent…scope-snapshot-materializer
|
判定は REQUEST_CHANGES です。以下はそのままPRレビューとして使用できる内容です。 敵対的レビュー結果結論Merge blocker 5件。現状はマージ不可です。 レビュー対象は、取得時点のPR HEAD ただし、既存の P0: provenance sidecarが自己申告であり、手書きsnapshotを排除できていないconsumerが確認しているのは、次の整合性だけです。
sidecarがsanctioned materializerによって生成されたことを証明する情報はありません。snapshotとsidecarの両方を書けるcallerは、両者を同時に手書きできます。これはproducer provenanceではなく、単なる自己整合性チェックです。 さらに回帰テスト自身が、この欠陥を実証しています。テストは手書きsnapshotを作り、その後に手書きprovenanceを追加し、最終的にvalidatorが したがって、PR本文の次の主張は成立していません。
Issue #1629のAC3も未達です。固定pathとhash-bound sidecarは「改変検出」にはなりますが、「producerの真正性証明」にはなりません。 必須修正sidecarを認可根拠にしてはいけません。 推奨設計は、controlled git executorがcommit直前にsanctioned materializerを同一トランザクション内で呼び出し、返されたin-memory snapshotを直接消費する形です。ファイル出力は監査証跡に限定してください。 最低限でもconsumerが独立してlive GitHub readbackを実施し、artifactの全bindingを再計算する必要があります。sidecarだけで成功経路へ進める設計は廃止してください。 P0: 古い成功artifactをIssue変更後も再利用できる
またmaterializerは、全readbackとvalidationが成功した後にsnapshotとsidecarを書きます。既存artifactがある状態でcontract driftなどにより再materializeが失敗した場合、失敗前から存在していた古いartifactは削除されません。 以下の経路が成立します。
現在のテストは空の一時ディレクトリで失敗後にartifactが存在しないことしか確認しておらず、「既存の成功artifactがある状態での失敗」を検証していません。 必須修正commit直前にconsumer側で次をlive再取得・再計算してください。
artifact更新は一時ファイルまたは世代別ディレクトリへ書き、検証完了後に切り替えてください。同一filesystem上の P1: contract snapshot commentの検証がsubstring検索へ退行している新しい
この方式では、例えば次のコメントも通過し得ます。 CONTRACT_REVIEW_RESULT_V1:
status: blocked本文後半に説明文として また、コメント投稿者のGitHub user ID、login、type、author associationを検証していないため、コード上は非信頼投稿者が作成したコメントも候補になります。 これは既存リポジトリ資産からの明確な退行です。既存のcanonical parserは既に以下を実装しています。
GitHub RESTのissue commentレスポンスには 必須修正
指定されたcomment IDについて、少なくとも以下をすべて要求してください。
P1: trusted
|
…scope-snapshot-materializer
…scope-snapshot-materializer
pr-review-judge の REQUEST_CHANGES を受けた再実装。snapshot/provenance sidecar は同一トラストドメインが書く自己申告であり認可根拠にならないため、 controlled_git_change_exec.py の commit 直前 in-process 呼び出しで materializer を再実行し、返された in-memory snapshot だけを認可入力にする 設計へ変更した(--snapshot-json は常時 deny、--materialize-request が唯一の 入力経路)。gh/git subprocess は trusted gh_bin と sanitized env を明示注入し、 contract source 検証は canonical contract_review_result_parser を再利用して trusted publisher / source-bound fingerprint を検証する。default branch は GitHub API から live に取得し、artifact 書き込みは atomic os.replace にした。 branch_ref の `/` を含む branch 名の truncation バグも修正した。
…scope-snapshot-materializer
CI python-test の Ruff gate が _load_live_issue の関数シグネチャ行(123文字)で 失敗していたため、パラメータリストを複数行に折り返した。ロジック変更なし。
Summary
live GitHub readback と contract snapshot comment に束縛した
ISSUE_SCOPE_SNAPSHOT_V1materializer を追加します。controlled stage/commit executor は、固定 artifact root と hash-bound provenance sidecar を満たす snapshot だけを受理します。この変更は、検証済みの artifact だけを認可入力にするための限定的な改善です。Closes #1629(この変更で Issue の producer 欠落を解消します)
変更内容
issue_scope_snapshot.materializecommand id と exact input binding を追加--snapshot-jsonと provenance のない手書き snapshot を拒否Checks
test_materialize_issue_scope_snapshot.pyの対象テスト各 1 件 PASStest_snapshot_json_flag_always_denied(test_controlled_git_change_exec.py)とtest_controlled_executor_provenance_check_is_audit_only_not_authoritative(test_materialize_issue_scope_snapshot.py)の 2 件 PASStest_controlled_git_change_exec.py+test_controlled_skill_mutation_policy.py+test_controlled_skill_mutation_exec.py)105 件 PASS受け入れ条件の達成状況
test_materializer_binds_live_github_contract_and_worktreeで確認。test_materializer_rejects_readback_drift_binding_and_unsafe_outputで確認。test_snapshot_json_flag_always_denied(--snapshot-jsonは無条件に拒否)と、内部監査ヘルパーが authority と同義でないことを示すtest_controlled_executor_provenance_check_is_audit_only_not_authoritativeの 2 テストで確認。旧設計(self-attestation snapshot 単体の provenance 検証)を前提にしたtest_controlled_executor_rejects_handwritten_snapshot_without_materializer_provenanceは fix_delta redesign(5d04ed5d)で上記 2 テストに置き換えられ、現行 HEAD には存在しない。test_controlled_materializer_command_rejects_argv_and_binding_mismatchで確認。検証コマンド結果
uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py::test_materializer_binds_live_github_contract_and_worktree— PASS(1 passed)。uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py::test_materializer_rejects_readback_drift_binding_and_unsafe_output— PASS(1 passed)。uv run --locked pytest scripts/agent-guards/tests/test_controlled_git_change_exec.py::test_snapshot_json_flag_always_denied scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py::test_controlled_executor_provenance_check_is_audit_only_not_authoritative— PASS(2 passed)。uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py::test_controlled_materializer_command_rejects_argv_and_binding_mismatch— PASS(1 passed)。uv run --locked pytest scripts/agent-guards/tests/test_controlled_git_change_exec.py scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py— PASS(105 passed)。uv run --locked pytest scripts/agent-guards/tests/test_materialize_issue_scope_snapshot.py scripts/agent-guards/tests/test_controlled_git_change_exec.py scripts/agent-guards/tests/test_controlled_skill_mutation_policy.py scripts/agent-guards/tests/test_controlled_skill_mutation_exec.py— PASS(123 passed)。この 4 ファイル一括実行に AC1〜AC5 の証跡テストがすべて含まれます(AC3 の2件はそれぞれ AC1/AC2/AC4 対象ファイルと AC5 対象ファイルに属するため、単純合計ではなく一括実行の unique 件数として 123 を報告します)。Allowed Paths 遵守
この PR の変更は次の 9 path のみで、Issue #1629 の Allowed Paths 内です。rename はなく、Allowed Paths 外の変更・違反はありません。
docs/dev/agent-runtime-ops.mddocs/dev/hook-boundaries.mdscripts/agent-guards/controlled_git_change_exec.pyscripts/agent-guards/controlled_skill_mutation_exec.pyscripts/agent-guards/controlled_skill_mutation_policy.pyscripts/agent-guards/materialize_issue_scope_snapshot.pyscripts/agent-guards/tests/test_controlled_git_change_exec.pyscripts/agent-guards/tests/test_controlled_skill_mutation_policy.pyscripts/agent-guards/tests/test_materialize_issue_scope_snapshot.pySchema Change Applicability
ISSUE_SCOPE_SNAPSHOT_MATERIALIZER_PROVENANCE_V1(sidecar)とISSUE_SCOPE_SNAPSHOT_MATERIALIZE_INPUT_V1ISSUE_SCOPE_SNAPSHOT_V1の key set は変更しないSchema Consumer Inventory
Before(変更前)
controlled_git_change_exec.pyは caller が渡す任意位置の--snapshot-jsonを、file safety だけ確認して読み込んでいました。live GitHub source と producer provenance は consumer input にありませんでした。After(変更後)
snapshot は
artifacts/<issue>/issue-metadata/issue_scope_snapshot.materialize/の固定位置に限定し、materializer provenance sidecar の schema、hash、Issue/repository/base/branch/worktree binding を consumer が検証します。scripts/agent-guards/controlled_git_change_exec.pyscripts/agent-guards/controlled_skill_mutation_exec.pySafety Claim Matrix
Notes
Overlap Preflight(重複確認)
proceed_with_collision_evidencesha256:0e6cdcceb65c34d55d066b224ca231bd38e4738b53a62b766ed77eb5c5b9caa6