Skip to content

実装: implementation-worker.toml と open_pr.py の legacy artifact hard gate を除去する #1851

Closed

Description

@squne121

Parent Issue

なし(単独改善。#1830 の post-merge follow-up)

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: null
goal_ref: "#1830"
change_kind: fix

Parent Goal Ref

#1830 は「Codex enforcing harness(artifact hard gate 等)を隔離し、snapshot/go artifact が無くても live Issue と worktree から通常実装に着手できるようにする」ことが目的だった。PR #1849 がこの Issue を Close した。

Current Validated Scope

PR #1849 の post-merge 監査により、以下 3 箇所で snapshot/go を実装着手・PR publication の必須条件として扱う実体(コードとしての hard gate)が変更されずに残っていることを、以下のファイル内容の直接確認で検証済み。

  • .codex/agents/implementation-worker.toml L10-11: INPUT_CONTRACT が issue_number と contract_snapshot_url を必須とし、「どちらかが欠ける、または issue-contract-review の go 判定が確認できない場合は fail closed で差し戻す」と明記。PR fix: Codex enforcing harnessをP0 quarantine #1849 の変更ファイル一覧に本ファイルは含まれておらず無修正。
  • .claude/skills/impl-review-loop/steps/preparation.md L1-17 に Issue 実装: Codex enforcing harness を quarantine し、advisory session recorder のみ維持して標準 sandbox / approval workflow に戻す #1830 由来の precedence(artifact を telemetry として扱い、legacy gate より優先する旨)が追加されているが、直後の L19(0-a. Intake capsule-first)・L76(0. Intake Gate — CONTRACT_REVIEW_RESULT_V1 status: go 必須検査)以降は無修正のまま残り、ensure_contract_snapshot への自動 routing・missing_contract_go 判定・status: go 必須検査のロジックがそのまま存在する。
  • .claude/skills/open-pr/scripts/open_pr.py(PR fix: Codex enforcing harnessをP0 quarantine #1849 の変更ファイル一覧に不在=無修正): L65 FORCE_OVERLAP_PREFLIGHT_LABEL = "phase/implementation" を起点に、L1637-1647 の forced_by_label 判定と overlap_gate_active 分岐により、phase/implementation label が付いた Issue に紐づく PR は overlap preflight artifact の取得・検証を強制され、失敗すると複数箇所(L1547, L1551, L1558, L1562, L1570, L1586, L1601, L1663, L1701, L1710, L1714 等)の return 2 で gh pr create に到達せず PR publication が停止する。

これに対し .claude/agents/implementation-worker.md L29-30 は既に contract_snapshot_url を任意 telemetry として扱う記述に緩和済みであり、Claude 側の記述と Codex 側 / 実行スクリプトの実体が乖離している。

Remaining Parent Gaps

本 Issue の完了後も、.claude/skills/implement-issue/SKILL.md 側で snapshot/go 確認記述が残っている場合の要否確認、および #1830 の目的達成を CI で保証する end-to-end テスト(artifact なしで custom agent → 実装 → PR publication まで進む経路の検証)は Out of Scope とし、別 Issue で扱う。

Scope Delta(PR #1854 レビュー起因、2026-07-30)

PR #1854 に対する REQUEST_CHANGES(comment)で、以下 2 点が独立に検証・確認された。

  1. 実際のルーティング producer が未変更: impl-review-loop の Step 1 到達可否を決めているのは preparation.md の説明文ではなく .claude/skills/impl-review-loop/scripts/build_intake_capsule.py の _next_action_route() であり、この関数は本 Issue の Allowed Paths 外のため無修正のまま残っていた。normalized_status == "missing_go" は現在も ensure_contract_snapshot / run_contract_blocker_triage へ route し、proceed_to_step_1 を返さない。これは本 Issue の Outcome(contract snapshot 欠落でも実装着手を止めない)が実際には達成されていないことを意味する。
  2. canonical repository 解決失敗が fail-open 化されている: PR fix: implementation-worker.toml と open_pr.py の legacy artifact hard gate を除去 #1854 の open_pr.py は resolve_canonical_repository() が None を返した場合に emit_warning 後 raw repo へフォールバックして処理を継続する。これは overlap preflight artifact(stored/fresh evidence)の advisory 化とは別種の変更であり、Issue 実装: open-pr の overlap_preflight evidence consumer に repository 一致検証を追加する #1470 が導入した「PR mutation target の canonical repository 解決失敗時は必ず停止する」という repository-identity 安全境界を弱体化させている。同様に、stored evidence の repository フィールドが解決済み target と一致しない cross-repo ケースのテスト(test_cross_repo_same_issue_number_is_rejected)も、名前・docstring が「reject(PR作成しない)」を主張したまま assertion だけ create_called is True に反転されている。

これを受け、以下のとおり Allowed Paths と Acceptance Criteria を拡張する(Stop Condition 「Allowed Paths 外の変更が必要と判明した場合」に該当するが、対象ファイルは本 Issue と同一 skill 内かつ Outcome 達成に不可欠なため、別 Issue 分割ではなく Scope Delta で対応する)。

Outcome

.codex/agents/implementation-worker.toml の INPUT_CONTRACT、.claude/skills/impl-review-loop/ の intake routing(preparation.md の説明文と build_intake_capsule.py の実 routing producer の両方)、.claude/skills/open-pr/scripts/open_pr.py の overlap gate の各箇所を、contract_snapshot_url / CONTRACT_REVIEW_RESULT_V1 status: go / overlap preflight evidence(stored/fresh の妥当性検証)のいずれも任意 telemetry として扱う(欠落・stale・invalid・runtime_error でも実装着手および PR publication を止めない)よう変更する。ただし、以下 2 点は本 Issue のスコープ外・意図的に fail-closed のまま維持する安全境界として明示的に除外する:

overlap preflight evidence が warning-only化される場合も、In Scope で規定した「stderr / PR コメントへの記録は残す」を実際に満たす(stdout の WARNING= KEY=VALUE だけでは不十分)。

git grep で旧 fail-closed 文言・return 2 gate 分岐・missing_go を stopping route として扱う分岐が対象箇所から検出されなくなり、かつ新規の behavioral test が該当箇所の実際の挙動(advisory 化された箇所は proceed、fail-closed のまま維持する箇所は block)を検証している状態を完了とする。

In Scope

  • .codex/agents/implementation-worker.toml の INPUT_CONTRACT を、必須項目を issue_number・live Issue 取得成功に限定し、contract_snapshot_url を任意 telemetry に降格する
  • .claude/skills/impl-review-loop/steps/preparation.md の 0-a. Intake capsule-first および 0. Intake Gate セクションを、precedence(L1-17)と整合するよう書き換える(status: go 未確認・contract_snapshot_url 欠落を理由にした停止ロジックを削除し、live Issue contract のみで次ステップへ進める)。見出し「0. Intake Gate — CONTRACT_REVIEW_RESULT_V1 status: go 必須検査」等、advisory 方針と矛盾する「必須」表現も整合させる
  • .claude/skills/impl-review-loop/scripts/build_intake_capsule.py の _next_action_route() を、issue_ready_status == "pass" かつ normalized_status が missing_go / stale / runtime_error のいずれかの場合に "proceed_to_step_1" を返すよう変更する(latest_blocked は既存どおり human veto 境界として維持し変更しない)
  • .claude/skills/impl-review-loop/SKILL.md の Guardrails 節にある missing_contract_go routing(ensure_contract_snapshot への無条件 route を規定する記述)を、ファイル冒頭の advisory artifact policy と整合するよう書き換える
  • .claude/skills/open-pr/scripts/open_pr.py の overlap preflight gate(forced_by_label / overlap_gate_active 判定と関連 return 2 分岐)を、evidence(stored/fresh の妥当性検証結果)が invalid/missing/stale/drift の場合に PR 作成を止めない warning-only 挙動へ変更する。ただし以下は変更後も fail-closed のまま維持する:
    • canonical repository 解決(resolve_canonical_repository() が None を返す場合は overlap_gate_active の値に関わらず EXIT_BLOCKED で停止し、raw repo へフォールバックしない)
    • stored evidence の repository フィールドが解決済み target_repo と不一致の cross-repo ケース
    • warning は stdout の WARNING=/WARNING_DETAIL= に加え、stderr にも出力し、gh pr create 成功後に固定 HTML marker(<!-- loop-protocol:overlap-preflight-warnings-v1 -->)付きの PR コメントとして最低 1 件永続化する
  • .claude/skills/open-pr/SKILL.md の 4.5. Overlap Preflight Hard Gate セクション見出しと本文を、evidence 検証は advisory・canonical repository 解決と cross-repo evidence 不一致は fail-closed のまま、という区分を反映するよう更新する
  • docs/dev/agent-skill-boundaries.md の open-pr consumer 行(既存 hard gate 全維持を要求する記述)を、上記の advisory/fail-closed 区分と整合するよう更新する

Out of Scope

  • .claude/skills/implement-issue/SKILL.md 側の記述整合確認(別 Issue)
  • artifact なしの end-to-end CI テスト追加(build_intake_capsule -> preparation routing -> implementation delegation の結合テストは本 Issue の新規 behavioral test で最小限カバーするが、フルスコープの E2E は別 Issue)
  • .codex/rules/default.rules の rtk push/branch ルール(runtime guard による実 enforcement を確認済みのため対象外)
  • .codex/hooks.json の hook command パス解決(既に git root 絶対パス解決済みのため対象外)
  • contract_blocker_triage.status == latest_blocked の human veto 境界の再設計
  • overlap preflight evidence 検証以外の canonical repository binding(Issue 実装: open-pr の overlap_preflight evidence consumer に repository 一致検証を追加する #1470 の repository-identity 安全境界)の変更

Acceptance Criteria

  • AC1: .codex/agents/implementation-worker.toml の INPUT_CONTRACT 節に「contract_snapshot_url を必須とする」「fail closed で差し戻す」の文言が存在しない
  • AC2: .claude/skills/impl-review-loop/steps/preparation.md に missing_contract_go を理由とした停止ロジックの記述が存在しない
  • AC3: .claude/skills/open-pr/scripts/open_pr.py に overlap preflight evidence 検証失敗を理由に gh pr create 前で return 2/EXIT_BLOCKED する分岐が存在しない(canonical repository 解決失敗・cross-repo evidence 不一致による EXIT_BLOCKED は維持する。AC6/AC7 参照)
  • AC4: 既存 pytest(.claude/skills/open-pr/ 配下および .claude/skills/impl-review-loop/ 配下)が変更後も pass する
  • AC5: build_intake_capsule.py の _next_action_route() が issue_ready_status == "pass" かつ normalized_status が missing_go / stale / runtime_error のいずれかのとき "proceed_to_step_1" を返すことを検証する新規テストファイル .claude/skills/impl-review-loop/tests/test_build_intake_capsule_advisory_routing.py が存在し pass する
  • AC6: open_pr.py の main() が resolve_canonical_repository() の戻り値 None を理由に EXIT_BLOCKED で停止し gh pr create を呼ばないことを検証する新規テストファイル .claude/skills/open-pr/scripts/tests/test_open_pr_canonical_repo_fail_closed.py が存在し pass する(overlap_gate_active の値に関わらず)
  • AC7: stored evidence の repository が解決済み target_repo と不一致の場合に gh pr create を呼ばないことを検証するテストが、名前・docstring・assertion のいずれも「reject(create されない)」の意味で一致した状態で pass する
  • AC8: overlap evidence 由来の warning が発生した場合、gh pr create 成功後に固定 HTML marker <!-- loop-protocol:overlap-preflight-warnings-v1 --> を含む PR コメントが投稿されることを検証する新規テストファイル .claude/skills/open-pr/scripts/tests/test_open_pr_overlap_warning_persistence.py が存在し pass する
  • AC9: .claude/skills/impl-review-loop/SKILL.md の Guardrails 節に、status: go 不在時の無条件 ensure_contract_snapshot route を規定する missing_contract_go routing 文言が存在しない

Verification Commands

# AC1
# baseline-expect: pass
$ grep -n "contract_snapshot_url.*必須" .codex/agents/implementation-worker.toml
# AC2
# baseline-expect: pass
$ grep -c "missing_contract_go" .claude/skills/impl-review-loop/steps/preparation.md
# AC3
# baseline-expect: pass
$ grep -c "return 2" .claude/skills/open-pr/scripts/open_pr.py
# AC4
$ uv run --locked pytest .claude/skills/open-pr/ .claude/skills/impl-review-loop/ -q
# AC5
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule_advisory_routing.py -q
# AC6
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_open_pr_canonical_repo_fail_closed.py -q
# AC7
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_open_pr_overlap_gate.py::test_cross_repo_same_issue_number_is_rejected -q
# AC8
$ uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_open_pr_overlap_warning_persistence.py -q
# AC9
# baseline-expect: pass
$ grep -c "missing_contract_go routing" .claude/skills/impl-review-loop/SKILL.md

Allowed Paths

  • .codex/agents/implementation-worker.toml
  • .claude/skills/impl-review-loop/steps/preparation.md
  • .claude/skills/impl-review-loop/scripts/build_intake_capsule.py
  • .claude/skills/impl-review-loop/SKILL.md
  • .claude/skills/open-pr/scripts/open_pr.py
  • .claude/skills/open-pr/SKILL.md
  • .claude/skills/open-pr/scripts/tests/(既存テストの期待値更新・新規テスト追加)
  • .claude/skills/impl-review-loop/tests/(既存テストの期待値更新・新規テスト追加)
  • docs/dev/agent-skill-boundaries.md(open-pr consumer 行の記述整合のみ)

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Required Design References

  • docs/dev/agent-skill-boundaries.md(orchestrator / control-plane 設計原則、Allowed Paths・停止条件の判断基準)
  • .claude/agents/implementation-worker.md(contract_snapshot_url を任意 telemetry として扱う緩和済み記述の参照先。本 Issue はこの記述と .codex/agents/implementation-worker.toml / open_pr.py の実体を整合させる)

Notes for Reviewer

  • 元の分析対象レポートには「.codex/rules/default.rules の rtk git push/rtk git branch allow ルールが runtime hook 撤去により無防備になった」という P0 Security 主張が含まれていたが、scripts/agent-guards/worktree_scope_guard.py(PreToolUse hook として .codex/hooks.json に現存)と scripts/agent-guards/git_mutation_command_policy.py(force/delete/mirror/tag push および branch force-delete を deny するロジックが現存)を実際に読み検証した結果、この主張は誤りと判明したため本 Issue には含めていない。
  • 同レポートの「hook command が cwd 相対パスで壊れる」という P1 主張も、.codex/hooks.json の全コマンドが $(git rev-parse --show-toplevel) 経由の絶対パス解決になっていることを確認し、誤りと判明したため対象外とした。

Activity

  1. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-29T21:59:50Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1851
      body_sha256: "sha256:53d78c929dfb7f7de3a338ae50e516cf6cee823c8ebbb9ca6774f615aad55edf"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:53d78c929dfb7f7de3a338ae50e516cf6cee823c8ebbb9ca6774f615aad55edf","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":3,"raw_command":"grep -n \"contract_snapshot_url.*必須\" .codex/agents/implementation-worker.toml","command_hash":"sha256:9cc85be1211f593392435064e427a3f479c41523534d9563689869e2066a3c9d","execution_key_hash":"sha256:cce37bd1ce587f2cdb39f8419df7367601c32bb81a8985a2ada25aeb27e43436","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["11:- `issue_number` と `contract_snapshot_url` を必須とする。"],"stdout_truncated":false,"stdout_original_line_count":2,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC2","line":3,"raw_command":"grep -c \"missing_contract_go\" .claude/skills/impl-review-loop/steps/preparation.md","command_hash":"sha256:e866fc861c270ab32fee4558ceea0d0744ca051159c38dd7d79f4f7976ffe168","execution_key_hash":"sha256:14bc5a6f93c0eaee914cf4517f7064bd0dd77cc3f51f53101ad05d36f7221118","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["10"],"stdout_truncated":false,"stdout_original_line_count":2,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC3","line":3,"raw_command":"grep -c \"return 2\" .claude/skills/open-pr/scripts/open_pr.py","command_hash":"sha256:761ee95a9d484420e0b7015974c365f67628620fa83432448a0ea01e1e836338","execution_key_hash":"sha256:baa3a98f72bf7914652b48f560a952ce153c93b09a3d6666f7e37d75cbfc0e8d","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["11"],"stdout_truncated":false,"stdout_original_line_count":2,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC4","line":2,"raw_command":"uv run --locked pytest .claude/skills/open-pr/ .claude/skills/impl-review-loop/ -q","command_hash":"sha256:0583f590140dca6f348959cc2397e672d80aa38fae9cd830c48441ca1552823e","execution_key_hash":"sha256:56786db2bb3c9ae6139345e03dc75c13246349d5b17d59770487bf4f946d772f","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["........................................................................ [  9%]","........................................................................ [ 18%]","........................................................................ [ 27%]","........................................................................ [ 36%]","........................................................................ [ 45%]","........................................................................ [ 54%]","........................................................................ [ 63%]","........................x........................x...................... [ 72%]","........................................................................ [ 81%]","........................................................................ [ 91%]",".......................................................................  [100%]","789 passed, 2 deselected, 2 xfailed in 6.57s"],"stdout_truncated":false,"stdout_original_line_count":13,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":6789,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null}]
        declared_path_overlap: {"schema":"declared_path_overlap/v1","advisory":true,"blocking":false,"decision":"advisory_only","disjoint":true,"overlapping_prs":[],"inventory":{"schema":"OPEN_PR_INVENTORY_V1","repo":"squne121/loop-protocol","state":"open","base_ref":"main","base_sha":"79de2b2dde1ee0c53e4747e8801f3ab52e5911d8","draft_policy":"include_drafts","prs":[{"number":1528,"title":"feat(cleanup): 同一実行内の branch-only fallback を追加","base_ref_name":"main","head_ref_name":"worktree-issue-1403-post-merge-cleanup-dedicated-branch-forc","head_ref_oid":"b29007580ae225eb9676c7f32c878ee2bb9ccaa9","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1528","changed_files_count_graphql":4},{"number":1832,"title":"fix(refinement): 全終端理由で follow-up materialization 結果を出力 (#1321)","base_ref_name":"main","head_ref_name":"worktree-issue-1321-follow-up-materialization-all-reasons","head_ref_oid":"31ac20913386ef2b0a91057fbf1de491a9286af2","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1832","changed_files_count_graphql":2},{"number":1847,"title":"docs: profile/provider contract capability ADR を追加 (#1821)","base_ref_name":"main","head_ref_name":"worktree-issue-1821-profile-provider-contract-capability-design","head_ref_oid":"c25b31afb59e1688ba42c9c16b078fa4f86bd3ca","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1847","changed_files_count_graphql":1},{"number":1850,"title":"実装: Codex Multi-Agent V2 runtime capability を artifact 化する","base_ref_name":"main","head_ref_name":"worktree-issue-1834-codex-v2-runtime-capability","head_ref_oid":"77d4dc42b058750e1515f162385a543b68f2bd9f","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1850","changed_files_count_graphql":5}],"fetched_count":4,"totalCount":4,"has_next_page":false,"complete":true,"saturated":false,"limit":200,"page_count":1,"inventory_digest":"sha256:955c43fde8be9366cf8a2f91cd56169ce6b1b7468ddf13310d6c4c4627531165","errors":[]},"inventory_digest_extended":"sha256:fd6401d420128dc48d03d360a6776c886b9d5bff8dd2f4438e1d490fe56322de","errors":[],"note":"changed-file 名の単純な重なりのみを証明する advisory check。3-way merge・hunk 競合・rename/delete 競合は評価しない(実 Git merge 競合の判定は Issue #1792 の PAIRWISE_MERGE_OBSERVATION_V1 producer の責務)。単独では blocking にしない。disjoint は tri-state(true/false/null)— 観測が不完全な場合は null。"}
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1851,"contract_source_kind":"issue_comment","contract_source_id":"5123799158","contract_body_sha256":"sha256:53d78c929dfb7f7de3a338ae50e516cf6cee823c8ebbb9ca6774f615aad55edf","allowed_paths_normalized_sha256":"dd021bb3502064eaa8bb2686185f72e3b78a8af6a14bd9fe7eae5d2973da04a5","base_ref":"main","base_sha_at_snapshot":"79de2b2dde1ee0c53e4747e8801f3ab52e5911d8"}
  2. squne121 commented on Jul 29, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-07-29T22:19:23Z)

  3. squne121 commented on Jul 30, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-30T11:20:40Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1851
      body_sha256: "sha256:2d68d63c96f4df539d52ba426a869699a8929e58de1cb8a93894e7bcb350fed3"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        product_spec_check: {"schema":"product_spec_check/v1","applicability":"applicable","decision":"pass","triggers":{"docs_product_allowed_paths":false,"tasks_md_mentioned":false,"specify_artifact_mentioned":false,"generated_task_mentioned":false,"product_spec_context_present":false,"machine_readable_contract_present":true},"conditions":{"docs_product_requires_spec_evidence":{"status":"pass","evidence":[]},"tasks_md_not_direct_source":{"status":"pass","evidence":[]},"specify_not_canonical":{"status":"pass","evidence":[]},"diff_first_rationale_present":{"status":"pass","evidence":[]},"generated_task_trace_present":{"status":"pass","evidence":[]},"task_dependencies_materialized":{"status":"pass","evidence":[]}},"blocked_reasons":[],"body_sha256":"sha256:2d68d63c96f4df539d52ba426a869699a8929e58de1cb8a93894e7bcb350fed3","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":3,"raw_command":"grep -n \"contract_snapshot_url.*必須\" .codex/agents/implementation-worker.toml","command_hash":"sha256:9cc85be1211f593392435064e427a3f479c41523534d9563689869e2066a3c9d","execution_key_hash":"sha256:cce37bd1ce587f2cdb39f8419df7367601c32bb81a8985a2ada25aeb27e43436","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["11:- `issue_number` と `contract_snapshot_url` を必須とする。"],"stdout_truncated":false,"stdout_original_line_count":2,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC2","line":3,"raw_command":"grep -c \"missing_contract_go\" .claude/skills/impl-review-loop/steps/preparation.md","command_hash":"sha256:e866fc861c270ab32fee4558ceea0d0744ca051159c38dd7d79f4f7976ffe168","execution_key_hash":"sha256:14bc5a6f93c0eaee914cf4517f7064bd0dd77cc3f51f53101ad05d36f7221118","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["10"],"stdout_truncated":false,"stdout_original_line_count":2,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC3","line":3,"raw_command":"grep -c \"return 2\" .claude/skills/open-pr/scripts/open_pr.py","command_hash":"sha256:761ee95a9d484420e0b7015974c365f67628620fa83432448a0ea01e1e836338","execution_key_hash":"sha256:baa3a98f72bf7914652b48f560a952ce153c93b09a3d6666f7e37d75cbfc0e8d","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["11"],"stdout_truncated":false,"stdout_original_line_count":2,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":2,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null},{"ac":"AC4","line":2,"raw_command":"uv run --locked pytest .claude/skills/open-pr/ .claude/skills/impl-review-loop/ -q","command_hash":"sha256:0583f590140dca6f348959cc2397e672d80aa38fae9cd830c48441ca1552823e","execution_key_hash":"sha256:56786db2bb3c9ae6139345e03dc75c13246349d5b17d59770487bf4f946d772f","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["........................................................................ [  9%]","........................................................................ [ 18%]","........................................................................ [ 27%]","........................................................................ [ 36%]","........................................................................ [ 45%]","........................................................................ [ 54%]","........................................................................ [ 63%]","........................x........................x...................... [ 72%]","........................................................................ [ 81%]","........................................................................ [ 91%]",".......................................................................  [100%]","789 passed, 2 deselected, 2 xfailed in 7.57s"],"stdout_truncated":false,"stdout_original_line_count":13,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":7872,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC5","line":2,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule_advisory_routing.py -q","command_hash":"sha256:075536d98c52c8daa7b4f4f0046414a31f5964fd21127c48d6f628ca99d16ea6","execution_key_hash":"sha256:f76194b0a669256a61284e907d0318ddd74a013956085cb1c845de2f213663b4","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/impl-review-loop/tests/test_build_intake_capsule_advisory_routing.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":165,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC6","line":2,"raw_command":"uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_open_pr_canonical_repo_fail_closed.py -q","command_hash":"sha256:84affe544947d63d5eb6e502b798d986e6c63c1ddd32aa2f64290c777eebda27","execution_key_hash":"sha256:eaffc1f874cb9342b6e008d24c262bb01e3c8406ff69165f4765791b7a091334","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/open-pr/scripts/tests/test_open_pr_canonical_repo_fail_closed.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":178,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC7","line":2,"raw_command":"uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_open_pr_overlap_gate.py::test_cross_repo_same_issue_number_is_rejected -q","command_hash":"sha256:64f01e282da72e97699304d7bc91feddc6991b45311b23c35680b12f05318895","execution_key_hash":"sha256:db1a96a89c72743a65513a6335a13183037ffa8088ce34d0f9062b1fb64a7179","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":[".                                                                        [100%]","1 passed in 0.03s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":212,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC8","line":2,"raw_command":"uv run --locked pytest .claude/skills/open-pr/scripts/tests/test_open_pr_overlap_warning_persistence.py -q","command_hash":"sha256:6b2f06e4a0fd3eaac9b0bfaea5c7f311d1b4c50e9f5d9fd0ff820cf1fe86b1a8","execution_key_hash":"sha256:50fd94a6b33c4434e9f298c190f5e68050bb4b37adf1d294ff64377eba36b323","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","stdout_head":["no tests ran in 0.00s"],"stdout_truncated":false,"stdout_original_line_count":3,"stderr_head":["ERROR: file or directory not found: .claude/skills/open-pr/scripts/tests/test_open_pr_overlap_warning_persistence.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":207,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":null,"vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":null,"raw":null},"strict":null,"repair":null},{"ac":"AC9","line":3,"raw_command":"grep -c \"missing_contract_go routing\" .claude/skills/impl-review-loop/SKILL.md","command_hash":"sha256:e56122f5b02e38a5d2769c47259a760e26d2333b6e2e72baa4aa7c8a04d2e265","execution_key_hash":"sha256:46aaadfa1b5bfe90f3d8723d96223ae193de637e535d97a3847c5fb03f27e6b6","runner":"exec","exit_code":0,"classification":"expected_pass","category":"baseline_expect_pass","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["1"],"stdout_truncated":false,"stdout_original_line_count":2,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":3,"fix_hint":null,"certified_target_paths":null,"annotations":{"baseline_expect":"pass","vc_role":null,"missing_baseline_expect":false},"annotation_source":{"line":2,"raw":"# baseline-expect: pass"},"strict":null,"repair":null}]
        declared_path_overlap: {"schema":"declared_path_overlap/v1","advisory":true,"blocking":false,"decision":"advisory_only","disjoint":true,"overlapping_prs":[],"inventory":{"schema":"OPEN_PR_INVENTORY_V1","repo":"squne121/loop-protocol","state":"open","base_ref":"main","base_sha":"79de2b2dde1ee0c53e4747e8801f3ab52e5911d8","draft_policy":"include_drafts","prs":[{"number":1528,"title":"feat(cleanup): 同一実行内の branch-only fallback を追加","base_ref_name":"main","head_ref_name":"worktree-issue-1403-post-merge-cleanup-dedicated-branch-forc","head_ref_oid":"b29007580ae225eb9676c7f32c878ee2bb9ccaa9","is_draft":false,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1528","changed_files_count_graphql":4},{"number":1832,"title":"fix(refinement): 全終端理由で follow-up materialization 結果を出力 (#1321)","base_ref_name":"main","head_ref_name":"worktree-issue-1321-follow-up-materialization-all-reasons","head_ref_oid":"31ac20913386ef2b0a91057fbf1de491a9286af2","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1832","changed_files_count_graphql":2},{"number":1847,"title":"docs: profile/provider contract capability ADR を追加 (#1821)","base_ref_name":"main","head_ref_name":"worktree-issue-1821-profile-provider-contract-capability-design","head_ref_oid":"c25b31afb59e1688ba42c9c16b078fa4f86bd3ca","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1847","changed_files_count_graphql":1},{"number":1850,"title":"実装: Codex Multi-Agent V2 runtime capability を artifact 化する","base_ref_name":"main","head_ref_name":"worktree-issue-1834-codex-v2-runtime-capability","head_ref_oid":"77d4dc42b058750e1515f162385a543b68f2bd9f","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1850","changed_files_count_graphql":5},{"number":1854,"title":"fix: implementation-worker.toml と open_pr.py の legacy artifact hard gate を除去","base_ref_name":"main","head_ref_name":"worktree-issue-1851-legacy-artifact-hard-gate-removal","head_ref_oid":"6a06af57679991b085c69d3d5142cb08f6e6b6eb","is_draft":true,"is_cross_repository":false,"head_repository_owner":"squne121","head_repository_name":"loop-protocol","url":"https://github.com/squne121/loop-protocol/pull/1854","changed_files_count_graphql":6}],"fetched_count":5,"totalCount":5,"has_next_page":false,"complete":true,"saturated":false,"limit":200,"page_count":1,"inventory_digest":"sha256:890d9756801d8c5756154047f98c596bd7feda5dd1ca136d40e556781181a000","errors":[]},"inventory_digest_extended":"sha256:0288e2fa566eb3c745fa32b7db8ea3bab9d6eeef9e26c0efca4c1d5631e6dd68","errors":[],"note":"changed-file 名の単純な重なりのみを証明する advisory check。3-way merge・hunk 競合・rename/delete 競合は評価しない(実 Git merge 競合の判定は Issue #1792 の PAIRWISE_MERGE_OBSERVATION_V1 producer の責務)。単独では blocking にしない。disjoint は tri-state(true/false/null)— 観測が不完全な場合は null。"}
      source: ensure_contract_snapshot_auto
      expected_contract_fingerprint: {"issue_number":1851,"contract_source_kind":"issue_comment","contract_source_id":"5130179117","contract_body_sha256":"sha256:2d68d63c96f4df539d52ba426a869699a8929e58de1cb8a93894e7bcb350fed3","allowed_paths_normalized_sha256":"1aa5dbc43b1a558422407ff76a97a849773b2993b40d6c2f363b9decdd62c6e2","base_ref":"main","base_sha_at_snapshot":"79de2b2dde1ee0c53e4747e8801f3ab52e5911d8"}
  4. added 2 commits that reference this issue on Jul 30, 2026
    5390170
    2c8b8ad
  5. squne121 commented on Jul 30, 2026

    @squne121
    OwnerAuthor

    impl-review-loop: 完了 (2026-07-30T12:04:42Z)

    iteration 2/3 は人間レビュアーによる REQUEST_CHANGES(comment)を受け、Issue 本文を Scope Delta で拡張(Allowed Paths 拡張、AC5-AC9 新設)した上で対応した。

    IMPL_REVIEW_LOOP_RESULT_V1:
      schema_version: 1
      status: draft_pr_ready
      merge_ready: true
      pr_url: "https://github.com/squne121/loop-protocol/pull/1854"
      head_sha: "2c8b8ad4070d2b1d235bf646ca62392d5e3f1680"
      issue_number: 1851
      termination_reason: approved
      iteration: 3
      required_auto_actions: []
    
    FOLLOW_UP_MATERIALIZATION_RESULT_V1:
      schema_version: 1
      materialized_by: impl-review-loop
      follow_up_issues: []
      note_only_observations:
        - dedupe_key: "1851-preparation-dead-route-enum"
          source_url: "https://github.com/squne121/loop-protocol/pull/1854#pullrequestreview-4818539220"
          source_note_id: "minor-non-blocking"
          summary: "preparation.md に _next_action_route() がもう返さない route enum(ensure_contract_snapshot/refresh_contract_snapshot)の記述が dead branch として残存。follow-up での記述整理を推奨(blocker ではない)。"
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

    phase/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions