Skip to content

実装: source-bound contract fingerprint を materialize する #1537

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "materialized_go の CONTRACT_REVIEW_RESULT_V1 を source-bound expected_contract_fingerprint 付きで発行し、parser・intake・reviewer が同一 fingerprint で Allowed Paths gate を認証できるようにする"
change_kind: code

Parent Issue

なし(単独改善)

Parent Goal Ref

  • Goal: Issue contract snapshot を実装・PR レビュー間で同一の source-bound Allowed Paths fingerprint により認証し、欠落した snapshot を merge-blocking とする。
  • Desired Destination: materialized go snapshot の producer と loop consumer / reviewer の契約接続を固定する。

Current Validated Scope

Remaining Parent Gaps

なし。本 Issue は source-bound fingerprint の発行・authoritative consumer 認証・二相 transport を扱う。CI runtime baseline の収集・比較、PR 本文整形、Allowed Paths matcher / reason / fix_hint の変更は扱わない。

Outcome

provisional 投稿は authoritative な CONTRACT_REVIEW_RESULT_V1 status: go ではない pending schema に閉じ、PATCH と独立 read-back が成功した後だけ、実際に投稿された GitHub Issue comment を source とする 7 項目の expected_contract_fingerprint を持つ go snapshot になる。欠落・不正・不一致の snapshot はすべての authoritative consumer で採用されず、intake は再 materialize 経路へ戻り、reviewer の Allowed Paths gate は同じ fingerprint を認証して ok または fail-closed を決定できる実装と回帰テストが存在する状態。

In Scope

  • ensure_contract_snapshot.py が materialization 時に base_ref と base_sha_at_snapshot を capture し、投稿後に read-back で確定した実 GitHub Issue comment の contract_source_kind / contract_source_id に bind して、expected_contract_fingerprint を発行・投稿・検証する。
  • fingerprint は issue_number、contract_source_kind、contract_source_id、contract_body_sha256、allowed_paths_normalized_sha256、base_ref、base_sha_at_snapshot の 7 項目と、Allowed Paths gate と同一の正規化・SHA-256 規則を使用する。
  • contract_review_result_parser.py が source-bound fingerprint を持つ go snapshot だけを fingerprint-ready として返し、必須項目の欠落・型不正・source binding 不正を valid fresh go として採用しない。
  • build_intake_capsule.py が fingerprint 欠落/不正の go snapshot を normalized_status: missing_go として ensure_contract_snapshot の再 materialize route に送り、loop-consumable fresh go に昇格させない。
  • allowed_paths_review_gate.py が snapshot 由来の fingerprint を gate input としてそのまま用い、同一 7 項目の再計算結果との一致時だけ source-bound ok を許可する。fingerprint の再生成、欠落 fallback、Issue 実装: issue-contract-review fingerprint refresh path を明示する #1329 が扱う reason / fix_hint の文言変更は行わない。
  • provisional POST は CONTRACT_SNAPSHOT_MATERIALIZATION_PENDING_V1 だけを含み、PATCH 成功後にのみ final CONTRACT_REVIEW_RESULT_V1 status: go を配置する。PATCH/read-back failure の orphan pending は authoritative consumer が採用しない。
  • run_contract_review_once.py、ensure_contract_snapshot.py、build_intake_capsule.py、controlled_skill_mutation_exec.py は fingerprint-ready を共通 predicate で必須にし、caller ごとの緩和を作らない。
  • fingerprint readiness は exact 7 keys、inner body hash との一致、full commit OID、authority binding を検証する。intake は live Issue の canonical Allowed Paths hash も再計算して照合する。
  • producer は canonical Allowed Paths extractor と gate の strict canonicalization を共有し、missing / empty / invalid / valid+invalid は POST 前に fail-closed にする。
  • 実装: ensure_contract_snapshot.py の go コメント binding 検証が実際に投稿済みの go コメントを恒久的に検出できないバグを修正する #1513 から限定統合した PATCH transport は canonical UTF-8 payload bytes を一度だけ送信し、PATCH response body と single-comment GET body を照合する。timeout / transport error は GET reconciliation 後も不明なら non-authoritative にする。
  • 実装: contract snapshot既存再利用パスにpublish receipt bindingを追加する #1490 の既存 snapshot publish receipt、実装: ensure_contract_snapshot.py の go コメント binding 検証が実際に投稿済みの go コメントを恒久的に検出できないバグを修正する #1513 の check-only 診断・過去コメント inventory、実装: issue-contract-review fingerprint refresh path を明示する #1329 の reason / fix_hint 文言は引き続き別責務とする。

Out of Scope

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本 Issue の AC1〜AC5 はすべて expected_contract_fingerprint の発行・検証・ルーティングという Python スクリプト間のデータ契約を対象とし、Verification Commands も pytest によるユニットテストのみで完結する。プロセス起動・外部通信・実行環境 I/O を要する動作検証は不要。

Acceptance Criteria

  • AC1: materialized go の CONTRACT_REVIEW_RESULT_V1 は投稿後 read-back で確定した GitHub Issue comment を contract_source_kind / contract_source_id に使い、Allowed Paths gate と同じ 7 項目・正規化・SHA-256 規則の expected_contract_fingerprint を含む。base ref と base SHA を materialization 時に capture できない場合は go を発行しない。
  • AC2: contract review result parser は 7 項目の fingerprint、source kind / source ID、各 hash を検証し、欠落・型不正・source binding 不正の status: go を fingerprint-ready snapshot として返さない。
  • AC3: intake capsule は fingerprint-ready でない go snapshot を normalized_status: missing_go として ensure_contract_snapshot の再 materialize route に送り、fresh go として実装 worker を起動しない。
  • AC4: reviewer の Allowed Paths gate は snapshot の expected_contract_fingerprint を無変換で gate input に使用し、同じ 7 項目から計算した fingerprint が一致し、changed files が Allowed Paths 内にある場合だけ status: ok を返す。欠落・不一致は従来どおり merge-blocking のままである。
  • AC5: materialized go、parser、intake、reviewer の回帰テストが、同一 fingerprint の happy path と fingerprint 欠落 snapshot の fail-closed / re-materialize path を固定して PASS する。
  • AC6: provisional 投稿は CONTRACT_SNAPSHOT_MATERIALIZATION_PENDING_V1 だけであり、PATCH failure / orphan を含めて parser、run-once、controlled readback が authoritative status: go として採用しない。
  • AC7: fingerprint readiness は exact 7 keys、fingerprint と inner の body SHA 一致、full commit OID、実 comment ID / Issue number を必須にし、intake は live Issue の canonical Allowed Paths hash 不一致を missing_go に route する。
  • AC8: producer と gate は canonical Allowed Paths extractor / strict canonicalization を共有し、unquoted・*・+ bullet の valid path を同じ hash にし、missing / empty / invalid / valid+invalid は POST 前に fail-closed にする。
  • AC9: 限定統合した PATCH transport は同一 UTF-8 payload bytes、PATCH response body、single-comment GET body を照合し、timeout / transport error は GET reconciliation 後も不明なら final go を認証しない。
  • AC10: run_contract_review_once.py の回帰テストが、fingerprint-ready でない provisional / orphan を authoritative go として採用しないことを固定して PASS する。
  • AC11: controlled metadata executor の回帰テストが、fingerprint-ready でない provisional / orphan を authoritative go として採用しないことを固定して PASS する。

Verification Commands

# AC1
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py

# AC2
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py

# AC3
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py

# AC4
$ uv run --locked pytest .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py

# AC5
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py

# AC6
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py

# AC7
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py

# AC8
$ uv run --locked pytest .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py

# AC9
$ uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py

# AC10
$ uv run --locked pytest .claude/skills/issue-contract-review/tests/test_run_contract_review_once.py

# AC11
$ uv run --locked pytest scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py

Allowed Paths

  • .claude/skills/impl-review-loop/scripts/ensure_contract_snapshot.py
  • .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py
  • .claude/skills/issue-contract-review/scripts/contract_review_result_parser.py
  • .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py
  • .claude/skills/impl-review-loop/scripts/build_intake_capsule.py
  • .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py
  • .claude/skills/pr-review-judge/scripts/allowed_paths_review_gate.py
  • .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py
  • .claude/skills/impl-review-loop/tests/test_contract_snapshot_author_binding.py(Scope Delta、PR feat: source-bound contract fingerprint を materialize する #1548 追加分。詳細は下記「Scope Delta」参照)
  • .claude/skills/issue-contract-review/scripts/run_contract_review_once.py
  • .claude/skills/issue-contract-review/tests/test_run_contract_review_once.py
  • scripts/agent-guards/controlled_skill_mutation_exec.py
  • scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py

Stop Conditions

Required Skills

  • Python
  • pytest

Required Design References

  • docs/dev/workflow.md#Issue 駆動開発フロー
  • docs/dev/agent-skill-boundaries.md#Loop Sequencing & Preconditions
  • docs/dev/workflows/impl-review-loop-design.md#State Model
  • .claude/skills/pr-review-judge/references/allowed-paths-gate.md

Scope Delta(任意)

Delivery Rule

  • 1 Issue = 1 PR とし、専用 worktree で実装して Draft PR を作成する。
  • PR の review evidence は、materialized snapshot URL、snapshot 内 fingerprint、Allowed Paths gate 出力の fingerprint が同一であることを current HEAD に bind して記録する。

Bootstrap Fingerprint Exception Policy

BOOTSTRAP_FINGERPRINT_EXCEPTION_POLICY_V1:
  authorization: "owner approved 2026-07-17"
  status: "expired_due_to_issue_body_revision"
  purpose: "source-bound fingerprint producer 自身を初回レビューするための、循環しない限定 bootstrap policy"
  target:
    issue: 1537
    pull_request: 1548
    reviewed_head_sha: "51d1e429f083b2fab3c01173c0633fb1f80fa54b (historical target only)"
  snapshot_selection:
    required: "この本文更新後に issue-contract-review が controlled metadata lane で投稿する、同一 body_sha256 の最新 trusted CONTRACT_REVIEW_RESULT_V1 status: go"
    disallow: "PR branch・worker report・手作業の snapshot を authoritative source として採用すること"
  waiver:
    only_reason: "expected_contract_fingerprint_missing"
    effect: "PR #1548 の初回 review に限り Allowed Paths gate の当該 reason を bootstrap exception として判定する。snapshot が fingerprint-ready 又は authoritative fingerprint source であるとは主張しない。"
  not_waived:
    - "Allowed Paths"
    - "reviewed head SHA 一致"
    - "Acceptance Criteria / Verification Commands"
    - "CI"
    - "schema consumer inventory"
    - "safety claims"
    - "その他の Allowed Paths gate reason"
  prohibited:
    - "未マージ PR の producer を使った GitHub contract snapshot の生成、PATCH、権威化"
    - "worker 自己申告又は自由記述による fingerprint 補完"
  post_merge_requirement:
    - "PR #1548 merge 後、trusted main の producer で二相 materialize を実行する"
    - "独立 read-back で fingerprint-ready snapshot を確認する"
    - "以後の PR review で本 exception を再利用しない"
  expiration:
    - "PR #1548 の head SHA が変化した時"
    - "対象 issue 本文が変化した時"
    - "選択された contract snapshot の source 又は body_sha256 が不一致になった時"
    - "PR #1548 merge 後の fingerprint-ready snapshot read-back 完了時"

Notes for Reviewer

Scope Collision Preflight

Activity

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

    @squne121
    OwnerAuthor

    Scope Collision (C1): related_issue=#1513, #1490, #1348, #1329, #1116, #1114, #1053, #996, #966, #965, #962, #961, #351; overlapping_paths=.claude/skills/impl-review-loop/scripts/build_intake_capsule.py, .claude/skills/impl-review-loop/scripts/ensure_contract_snapshot.py, .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py, .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py, .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py, .claude/skills/pr-review-judge/scripts/allowed_paths_review_gate.py, .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py. non_conflict_reason / edit_intent / dependency ordering を記録すること。

    Non-conflict reason

    Edit intent

    • ensure_contract_snapshot.py: 実 Issue comment ID と materialization 時の base ref/SHA に bind した fingerprint を発行・read-back 検証する。
    • parser / intake: fingerprint を持たない go を loop-consumable fresh go とせず、再 materialize に戻す。
    • reviewer: snapshot の fingerprint を無変換で gate input に渡し、同じ 7項目で認証する。

    Dependency ordering

  3. squne121 commented on Jul 16, 2026

    @squne121
    OwnerAuthor

    判定: NO-GO / REQUEST_CHANGES

    方向性は妥当です。特に、fingerprint 欠落時の fallback を認めず、producer・parser・intake・reviewer を同一の値で接続しようとしている点は正しいです。

    ただし、現在の Issue #1537 は、実装可能性・独立検証性・障害時状態遷移の3点が閉じていません。このまま着手すると、表面上は AC を満たすものの、実際には snapshot 自己申告を再比較するだけの実装か、半端に投稿された authoritative comment を残す実装になる可能性が高いです。


    1. [P0 / Merge blocker] comment ID の自己参照を解く発行プロトコルがない

    AC1 は、実際に投稿された GitHub Issue comment の ID を contract_source_id とし、その値を同じ comment 内の expected_contract_fingerprint に含めることを要求しています。

    しかし現行実装は次の順序です。

    最終 comment body を生成
      → POST
      → html_url を受領
      → URL から comment ID を抽出
      → GET で投稿結果を検証
    

    _build_contract_review_comment() は POST 前に最終本文を構築し、post_comment() は .html_url だけを返します。取得した ID は read-back 検証にしか使われず、同じ comment を更新する PATCH 経路はありません。

    GitHub API 上も、comment ID は作成後のレスポンスで初めて確定します。既存 comment の本文更新には、その ID を指定した PATCH が必要です。GET・PATCH・DELETE はいずれも owner/repo/comment_id を要求します。したがって、単一 POST では AC1 を満たせません。(GitHub Docs)

    必須修正

    Issue に以下の二相発行状態機械を明記すべきです。

    PRECHECK
      → POST provisional comment
      → response.id を構造化レスポンスから取得
      → fingerprint を確定
      → PATCH 同一 comment ID に final CONTRACT_REVIEW_RESULT_V1 を設定
      → GET 同一 ID を read-back
      → body / ID / issue / repository / publisher / fingerprint を検証
      → Issue body・base ref を再確認
      → authoritative go として採用
    

    provisional comment は、絶対に CONTRACT_REVIEW_RESULT_V1 status: go として parser が認識できない形式にします。例えば次です。

    CONTRACT_REVIEW_MATERIALIZATION_PENDING_V1:
      status: pending
      issue_number: 1537
      idempotency_key: "..."
    

    PATCH または最終 read-back に失敗した場合は、同じ ID を DELETE します。DELETE にも失敗した場合、pending comment が非 authoritative であるため安全側に残ります。GitHub の comment 作成は通知と secondary rate limit を発生させ得るため、再実行時の重複排除と orphan pending の回復規則も必要です。(GitHub Docs)

    また、POST レスポンスを .html_url へ縮退させ、正規表現で ID を再構成する必要はありません。GitHub のレスポンス object から id、html_url、body、user、issue_url を直接保持すべきです。(GitHub Docs)


    2. [P0 / Merge blocker] Issue #1513 は条件付き衝突ではなく、先行依存

    Scope Collision コメントでは、#1513 と同一 helper・同一行に衝突した場合だけ先行 merge を待つとしています。

    しかし、衝突条件は既に成立しています。

    Issue #1513 は、まさに以下を変更対象としています。

    • post_comment()

    • _build_contract_review_comment()

    • verify_controlled_publisher_comment_id_binding()

    • 実際に送信した一時ファイルの byte 列を hash の正とする処理

    • check-only での投稿済み comment 検出

    #1537 が二相発行を導入すると、「送信した本文」が provisional POST と final PATCH の2種類になります。authoritative hash は final PATCH の実送信 byte 列でなければなりません。#1513 の byte-level 修正を先に確定せず #1537 を実装すると、双方が同じ投稿・hash・read-back 境界を別々の前提で変更します。

    必須修正

    依存関係を次のように固定してください。

    #1513 merge
      → #1537 rebase
      → #1537 implementation
    

    少なくとも Issue 本文に以下が必要です。

    blocked_by:
      - 1513
    

    「同一 helper に及ぶ場合」という条件文では不十分です。既に同一 helper に及ぶことが確認できています。


    3. [P1 / Merge blocker] “source-bound” だが repository-bound ではない

    現行 gate の ContractFingerprint は次の7項目です。

    issue_number
    contract_source_kind
    contract_source_id
    contract_body_sha256
    allowed_paths_normalized_sha256
    base_ref
    base_sha_at_snapshot
    

    repository は含まれません。CLI にも repository input はありません。

    一方、GitHub comment の取得・更新・削除は owner/repo/comment_id で識別され、issue number も repository 内の番号です。GitHub は owner/repo 名を case-insensitive と定義しています。(GitHub Docs)

    共有 parser は scoped repository から comment を取得し、issue_url も検査するため、通常の経路では多くの誤配線を防げます。しかし AC4 は reviewer gate が「同じ fingerprint を認証する」と主張しています。現行7項目だけでは、gate 単体は wrong-repository capsule や source context の取り違えを検出できません。

    推奨修正

    第一選択は repository を追加した8項目化です。

    expected_contract_fingerprint:
      repository: squne121/loop-protocol
      issue_number: 1537
      contract_source_kind: issue_comment
      contract_source_id: "4990476813"
      contract_body_sha256: "sha256:..."
      allowed_paths_normalized_sha256: "sha256:..."
      base_ref: "refs/heads/main"
      base_sha_at_snapshot: "..."
    

    repository は owner/repo を case-fold した canonical form にします。

    既存の7項目を維持する場合は、少なくとも外側に独立検証される envelope が必要です。

    contract_source_context:
      repository: squne121/loop-protocol
      issue_number: 1537
      comment_id: "4990476813"
    expected_contract_fingerprint:
      # 現行7項目
    

    ただし、その場合は「7項目 fingerprint 単体が source-bound」という主張を弱める必要があります。現在の Stop Conditions は固定キー集合の変更を禁止しているため、実装開始前に Issue 契約自体を修正する必要があります。


    4. [P1 / Merge blocker] gate の「再計算」が独立検証になっていない

    現行 compute_contract_fingerprint() が内部で実際に導出しているのは、主に allowed_paths_normalized_sha256 です。それ以外の項目は evaluator に渡された値を ContractFingerprint へコピーしています。

    したがって caller が snapshot から、

    • expected_contract_fingerprint

    • contract_source_id

    • contract_body_sha256

    • base_ref

    • base_sha_at_snapshot

    をすべて取り出して同時に gate へ渡すだけなら、比較はほぼ snapshot 自己申告値と snapshot 自己申告値の一致確認 になります。

    Issue には、各値をどの独立 authority から取得するかを固定した provenance table が必要です。

    項目 | reviewer 側の独立 authority -- | -- repository | 現在レビュー中の repository context issue_number | PR の linked issue / closing reference source kind / ID | GitHub comment API の実 comment metadata contract body hash | GitHub API から再取得した現在の Issue body Allowed Paths hash | 現在の Issue body から shared canonicalizer で再計算 base_ref | PR base ref、または契約で明示された target ref base SHA | GitHub refs API または検証済み local remote-tracking ref

    helper を mock して成功値を返すだけではなく、少なくとも1系統は GitHub API response fixture を通した CLI-level integration test が必要です。


    推奨実装順序

    1. #1513: 実送信 byte と body hash/read-back の authority を確定
    2. #1537: 二相発行、strict schema、伝播、独立再計算
    3. #1490: existing snapshot reuse の publication receipt
    

    #1329 は gate の reason/fix_hint を変更するため、#1537 後に rebase する方が安全です。#1348 は intake の precedence と schema surface に触れるため、同時実装は避け、どちらかを先に merge して回帰テストを統合すべきです。

    最終判断: Issue #1537 は実装開始前に、少なくとも 二相発行プロトコル、#1513 への明示依存、repository binding、独立 provenance、invalid-go precedence、capsule propagation、共有 canonicalizer を契約へ追加する必要があります。現在のままの Draft PR 作成は非推奨です。

    ## 判定: **NO-GO / REQUEST_CHANGES**

    方向性は妥当です。特に、fingerprint 欠落時の fallback を認めず、producer・parser・intake・reviewer を同一の値で接続しようとしている点は正しいです。

    ただし、現在の Issue #1537 は、実装可能性・独立検証性・障害時状態遷移の3点が閉じていません。このまま着手すると、表面上は AC を満たすものの、実際には snapshot 自己申告を再比較するだけの実装か、半端に投稿された authoritative comment を残す実装になる可能性が高いです。


    1. [P0 / Merge blocker] comment ID の自己参照を解く発行プロトコルがない

    AC1 は、実際に投稿された GitHub Issue comment の ID を contract_source_id とし、その値を同じ comment 内の expected_contract_fingerprint に含めることを要求しています。

    しかし現行実装は次の順序です。

    最終 comment body を生成
      → POST
      → html_url を受領
      → URL から comment ID を抽出
      → GET で投稿結果を検証
    

    _build_contract_review_comment() は POST 前に最終本文を構築し、post_comment() は .html_url だけを返します。取得した ID は read-back 検証にしか使われず、同じ comment を更新する PATCH 経路はありません。

    GitHub API 上も、comment ID は作成後のレスポンスで初めて確定します。既存 comment の本文更新には、その ID を指定した PATCH が必要です。GET・PATCH・DELETE はいずれも owner/repo/comment_id を要求します。したがって、単一 POST では AC1 を満たせません。([GitHub Docs]1)

    必須修正

    Issue に以下の二相発行状態機械を明記すべきです。

    PRECHECK
      → POST provisional comment
      → response.id を構造化レスポンスから取得
      → fingerprint を確定
      → PATCH 同一 comment ID に final CONTRACT_REVIEW_RESULT_V1 を設定
      → GET 同一 ID を read-back
      → body / ID / issue / repository / publisher / fingerprint を検証
      → Issue body・base ref を再確認
      → authoritative go として採用
    

    provisional comment は、絶対に CONTRACT_REVIEW_RESULT_V1 status: go として parser が認識できない形式にします。例えば次です。

    CONTRACT_REVIEW_MATERIALIZATION_PENDING_V1:
      status: pending
      issue_number: 1537
      idempotency_key: "..."

    PATCH または最終 read-back に失敗した場合は、同じ ID を DELETE します。DELETE にも失敗した場合、pending comment が非 authoritative であるため安全側に残ります。GitHub の comment 作成は通知と secondary rate limit を発生させ得るため、再実行時の重複排除と orphan pending の回復規則も必要です。([GitHub Docs]1)

    また、POST レスポンスを .html_url へ縮退させ、正規表現で ID を再構成する必要はありません。GitHub のレスポンス object から id、html_url、body、user、issue_url を直接保持すべきです。([GitHub Docs]1)


    2. [P0 / Merge blocker] Issue #1513 は条件付き衝突ではなく、先行依存

    Scope Collision コメントでは、#1513 と同一 helper・同一行に衝突した場合だけ先行 merge を待つとしています。

    しかし、衝突条件は既に成立しています。

    Issue #1513 は、まさに以下を変更対象としています。

    • post_comment()
    • _build_contract_review_comment()
    • verify_controlled_publisher_comment_id_binding()
    • 実際に送信した一時ファイルの byte 列を hash の正とする処理
    • check-only での投稿済み comment 検出

    #1537 が二相発行を導入すると、「送信した本文」が provisional POST と final PATCH の2種類になります。authoritative hash は final PATCH の実送信 byte 列でなければなりません。#1513 の byte-level 修正を先に確定せず #1537 を実装すると、双方が同じ投稿・hash・read-back 境界を別々の前提で変更します。

    必須修正

    依存関係を次のように固定してください。

    #1513 merge
      → #1537 rebase
      → #1537 implementation
    

    少なくとも Issue 本文に以下が必要です。

    blocked_by:
      - 1513

    「同一 helper に及ぶ場合」という条件文では不十分です。既に同一 helper に及ぶことが確認できています。


    3. [P1 / Merge blocker] “source-bound” だが repository-bound ではない

    現行 gate の ContractFingerprint は次の7項目です。

    issue_number
    contract_source_kind
    contract_source_id
    contract_body_sha256
    allowed_paths_normalized_sha256
    base_ref
    base_sha_at_snapshot
    

    repository は含まれません。CLI にも repository input はありません。

    一方、GitHub comment の取得・更新・削除は owner/repo/comment_id で識別され、issue number も repository 内の番号です。GitHub は owner/repo 名を case-insensitive と定義しています。([GitHub Docs]1)

    共有 parser は scoped repository から comment を取得し、issue_url も検査するため、通常の経路では多くの誤配線を防げます。しかし AC4 は reviewer gate が「同じ fingerprint を認証する」と主張しています。現行7項目だけでは、gate 単体は wrong-repository capsule や source context の取り違えを検出できません。

    推奨修正

    第一選択は repository を追加した8項目化です。

    expected_contract_fingerprint:
      repository: squne121/loop-protocol
      issue_number: 1537
      contract_source_kind: issue_comment
      contract_source_id: "4990476813"
      contract_body_sha256: "sha256:..."
      allowed_paths_normalized_sha256: "sha256:..."
      base_ref: "refs/heads/main"
      base_sha_at_snapshot: "..."

    repository は owner/repo を case-fold した canonical form にします。

    既存の7項目を維持する場合は、少なくとも外側に独立検証される envelope が必要です。

    contract_source_context:
      repository: squne121/loop-protocol
      issue_number: 1537
      comment_id: "4990476813"
    expected_contract_fingerprint:
      # 現行7項目

    ただし、その場合は「7項目 fingerprint 単体が source-bound」という主張を弱める必要があります。現在の Stop Conditions は固定キー集合の変更を禁止しているため、実装開始前に Issue 契約自体を修正する必要があります。


    4. [P1 / Merge blocker] gate の「再計算」が独立検証になっていない

    現行 compute_contract_fingerprint() が内部で実際に導出しているのは、主に allowed_paths_normalized_sha256 です。それ以外の項目は evaluator に渡された値を ContractFingerprint へコピーしています。

    したがって caller が snapshot から、

    • expected_contract_fingerprint
    • contract_source_id
    • contract_body_sha256
    • base_ref
    • base_sha_at_snapshot

    をすべて取り出して同時に gate へ渡すだけなら、比較はほぼ snapshot 自己申告値と snapshot 自己申告値の一致確認 になります。

    Issue には、各値をどの独立 authority から取得するかを固定した provenance table が必要です。

    項目 reviewer 側の独立 authority
    repository 現在レビュー中の repository context
    issue_number PR の linked issue / closing reference
    source kind / ID GitHub comment API の実 comment metadata
    contract body hash GitHub API から再取得した現在の Issue body
    Allowed Paths hash 現在の Issue body から shared canonicalizer で再計算
    base_ref PR base ref、または契約で明示された target ref
    base SHA GitHub refs API または検証済み local remote-tracking ref

    GitHub refs API は heads/<branch> を指定して ref と commit SHA を取得できます。([GitHub Docs]2)

    特に contract_source_id は、snapshot 本文内の自己申告値を authority にしてはいけません。parser が走査している comment object 自身の id と、本文内 fingerprint の ID が一致することを検査すべきです。


    5. [P1] base_sha_at_snapshot の freshness 意味論が曖昧

    現行 gate では、fingerprint 計算に使用する base_sha_at_snapshot と、changed-files 用の current_base_sha は別入力です。current_base_sha は merge-base 検証に使われますが、fingerprint の base_sha_at_snapshot と現在の base tip を比較する処理ではありません。

    そのため reviewer が snapshot 内の base_sha_at_snapshot をそのまま evaluator に渡せば、base branch が進んでいても fingerprint は一致します。

    以下のどちらかを明示する必要があります。

    1. freshness binding とする
      現在の base_ref tip を独立取得し、snapshot の base_sha_at_snapshot と異なれば stale_snapshot。

    2. historical audit binding とする
      snapshot 作成時点の base SHA を記録するだけで、base movement 自体は stale 条件にしない。

    現在の Issue は「freshness」「snapshot時のbase SHA」「同一 fingerprint」を混在させており、どちらの意味論なのか確定していません。名称からは1が自然です。その場合、現在の gate 接続だけでは不足します。


    6. [P1 / Security] 新しい invalid go が古い valid go へ downgrade され得る

    共有 parser は、validation に失敗した YAML block を結果集合へ追加せず、valid な結果だけを時系列順に選択します。

    このまま fingerprint validation を追加すると、次の状態が危険です。

    1. trusted publisher の古い valid go
    2. 同じ trusted publisher の新しい go
    3. 新しい go は fingerprint 欠落または型不正
    4. parser が新しい go を候補から除外
    5. 古い valid go が latest go として採用される
    

    これは fail-closed ではなく、実質的な downgrade です。

    必須 precedence

    • 最新 trusted blocked は fingerprint の有無に関係なく precedence を維持する。
    • 最新 trusted go が fingerprint missing/invalid なら、古い go に fallback せず missing_go。
    • trusted invalid go は authoritative-candidate barrier として扱う。
    • untrusted invalid comment は trusted snapshot を pre-empt しない。
    • comment API evidence が不完全なら引き続き fail-closed。

    最低限、次の状態を parser output に持たせるべきです。

    fingerprint_state: ready | missing | invalid | source_mismatch | stale

    7. [P1] intake から reviewer への値の伝播契約が存在しない

    現在の build_intake_capsule.py は、live snapshot を次のような状態へ正規化します。

    normalized_status
    upstream_schema
    upstream_status
    source
    contract_snapshot_url
    top_blocked_categories
    contract_blocker_triage
    

    fingerprint object 自体は出力していません。

    一方、pr-reviewer の明示入力は PR number と任意の reviewed head SHA であり、fingerprint の具体的な取得元・capsule field・gate CLI 接続は固定されていません。ドキュメント上は fingerprint 必須と宣言しているだけです。

    AC3 と AC4 の間に、少なくとも次の出力契約が必要です。

    contract_snapshot:
      normalized_status: go
      fingerprint_state: ready
      expected_contract_fingerprint: {...}
      source_comment_id: "..."
      source_comment_url: "..."
      source_repository: "owner/repo"

    reviewer はこの object を手入力・再構築せず、capsule または GitHub API の検証済み結果から取得する必要があります。

    また、現在の Allowed Paths は gate script/test だけで、reviewer skill・orchestrator の wiring 変更を含みません。AC4 を end-to-end で完了させるなら、実際に reviewer input を構築する資産を Allowed Paths に追加する必要があります。追加しない場合は、AC4 を「gate library の入力契約」までに狭めるべきです。


    8. [P1] schema・型・canonicalization の single source of truth がない

    現行 gate の Allowed Paths hash は、

    • pattern の正規化
    • sorted(set(...))
    • json.dumps(..., separators=(",", ":"), ensure_ascii=True)
    • SHA-256

    という Python 固有の手順です。

    一方、現在のテスト fixture は base_sha_at_snapshot: "abc123"、contract_body_sha256: "contract_sha" のような placeholder を正常入力としており、SHA・Git object ID・source ID の形式検証を証明していません。

    次を固定すべきです。

    • 厳密なキー集合。未知キーを許可するか拒否するか
    • issue_number: 正数 int、bool は拒否
    • contract_source_kind: issue_comment の enum
    • contract_source_id: 正数 int、または canonical decimal string のどちらかに統一
    • hash: sha256: prefix の有無、大文字小文字、64 hex
    • base_ref: main か refs/heads/main か
    • Git SHA-1/SHA-256 移行を考慮した object ID policy
    • Unicode、非ASCII path、重複、順序、末尾 slash の golden vectors
    • invalid と stale の区別

    hash input は producer と consumer 間で byte 単位に一致する必要があります。RFC 8785 も、hash や署名には不変表現が必要であり、deterministic property sorting と UTF-8 を含む canonical representation を定義しています。JCS をそのまま採用する必要はありませんが、少なくとも現行 Python 手順を versioned algorithm として共有 module に切り出すべきです。([RFC Editor]3)

    推奨資産は例えば次です。

    .claude/skills/issue-contract-review/scripts/contract_fingerprint_v1.py
    .claude/skills/issue-contract-review/tests/test_contract_fingerprint_v1.py
    

    producer・parser・intake・gate の4系統がこの1実装を import します。現在の Allowed Paths には存在しないため、Issue 契約の修正が必要です。


    9. [P1] Issue #1490 との security claim 境界を明文化すべき

    GitHub issue comment は後から PATCH で更新可能です。したがって、ID と現在の本文が一致していても、それだけでは「この process が当初投稿した byte 列」の永続的証跡にはなりません。([GitHub Docs]1)

    PR #1485 も、投稿直後の binding は強化した一方、existing snapshot reuse では publication-time binding を再検証しないと明示し、完全な receipt を Issue #1490 に分離しています。

    Issue #1490 は repo、issue_number、comment_id、comment body hash、publisher identity などを含む publish receipt を対象にしています。

    したがって #1537 は、保証範囲を次のように限定する必要があります。

    評価時点で GitHub API から取得した allowlisted publisher の comment が、現在の issue/body/base context と一致することを保証する。最初に publish された byte 列との永続的同一性は #1490 の receipt 完了まで保証しない。

    「controlled publisher が当初投稿した不変 snapshot」まで主張するなら、#1490 は follow-up ではなく先行依存です。

    設計上は、in-toto Statement のように「対象 subject の digest」と「付随 metadata」を分離する形が参考になります。現在の expected_contract_fingerprint は単一 fingerprint というより、source-binding statement に近い構造です。([GitHub]4)


    修正後の Acceptance Criteria 案

    AC1: 二相発行

    • provisional comment は authoritative go として parse されない。
    • structured POST response から ID を取得する。
    • 同一 ID を PATCH して final fingerprint を含む go にする。
    • final GET で repository、issue、ID、body、publisher、fingerprint を検証する。
    • PATCH/GET 失敗時は go を発行済み扱いにしない。
    • orphan pending と retry の決定論的回復規則を持つ。

    AC2: strict schema

    • repository を含む source context を検証する。
    • すべての型・enum・hash・ref・ID 形式を検証する。
    • missing、invalid、source mismatch、stale を区別する。
    • blocked には go fingerprint を要求しない。

    AC3: precedence

    • 新しい trusted invalid go から古い valid go へ fallback しない。
    • trusted blocked precedence を維持する。
    • untrusted invalid comment は authoritative state を変更しない。
    • incomplete evidence は fail-closed。

    AC4: intake propagation

    • fingerprint object を変換せず capsule に保持する。
    • live parsing path と ensure_contract_snapshot result path が同一 schema を返す。
    • fingerprint_state != ready は必ず missing_go。

    AC5: reviewer independence

    • reviewer は repository、linked issue、comment metadata、current issue body、Allowed Paths、base ref/SHA を独立 authority から取得する。
    • expected object と recomputed object を別 provenance から構築する。
    • wrong repository、wrong comment、wrong issue、wrong base を拒否する。

    AC6: failure-injection integration tests

    分類 必須ケース
    発行 POST成功、PATCH成功、同一IDでfinal化
    中断 POST後クラッシュ、PATCH失敗、GET失敗、DELETE失敗
    競合 Issue body変更、base ref進行、comment同時更新
    再実行 pending再開、重複防止、orphan cleanup
    schema bool-as-int、未知キー、不正SHA、不正source kind
    precedence 古いvalid go+新しいinvalid go、blocked+go
    canonicalization Unicode、非ASCII、重複path、順序差
    E2E producer → parser → intake → reviewer で完全同一 object

    helper を mock して成功値を返すだけではなく、少なくとも1系統は GitHub API response fixture を通した CLI-level integration test が必要です。


    推奨実装順序

    1. #1513: 実送信 byte と body hash/read-back の authority を確定
    2. #1537: 二相発行、strict schema、伝播、独立再計算
    3. #1490: existing snapshot reuse の publication receipt
    

    #1329 は gate の reason/fix_hint を変更するため、#1537 後に rebase する方が安全です。#1348 は intake の precedence と schema surface に触れるため、同時実装は避け、どちらかを先に merge して回帰テストを統合すべきです。

    最終判断: Issue #1537 は実装開始前に、少なくとも 二相発行プロトコル、#1513 への明示依存、repository binding、独立 provenance、invalid-go precedence、capsule propagation、共有 canonicalizer を契約へ追加する必要があります。現在のままの Draft PR 作成は非推奨です。

  4. squne121 commented on Jul 16, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Human Escalation Required

    The loop has terminated and requires human review. Cause: human judgment required

    Blockers

    "codebase-investigator delegation (gemini-cli-headless-delegation) が Gemini API の monthly spending cap 超過 (HTTP 429 RESOURCE_EXHAUSTED) で継続的に失敗"
    
    "investigation_policy.required=true のため Step 1 investigation は必須だが、SubAgent contract 上 delegation 失敗時の Read/Grep fallback は禁止されており調査を完了できない"
    
    "setup_check.py --json は auth.ok=false / status=timeout を報告。直接 gemini --prompt 実行でも 429 RESOURCE_EXHAUSTED (spend cap) を確認済み — transient ではなく environment_failure"
    
    "人間による Gemini API spend cap 引き上げ、または GEMINI_API_KEY 設定、もしくは agy (Antigravity CLI) への移行判断が必要"
    
  5. squne121 commented on Jul 16, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Human Escalation Required

    The loop has terminated and requires human review. Cause: human judgment required

    Blockers

    "Step 0f preflight (`preflight.run.with_anchor` via `skill_runtime_exec.py`) は canonical main root(realpath 一致・branch=default_branch)でのみ実行可能な privileged executor class だが、本 control-plane subagent はセッション起動時から isolation worktree(`.claude/worktrees/agent-a4356e4791a854f0a`, branch `worktree-agent-a4356e4791a854f0a`)に cwd を pin されており、bash 内 `cd` は shell 内では成功して見えても `worktree_scope_guard.sh` フックが検査する実際の tool-call cwd を変えられない。"
    
    "非 isolation の general-purpose SubAgent を新規に起動して同じコマンドを試みても、そのセッションも同一の pinned worktree 上で起動され、同じフックで `mutation outside active issue worktree` として拒否された(`expected_worktree: <skill-runtime-denied>`)。"
    
    "EnterWorktree/ExitWorktree ツールも canonical main root(worktree ではない通常 checkout)への切替手段を提供しないため、本 subagent の実行コンテキストから Step 0f を完了する経路が存在しない。"
    
    "この状態は前回 iteration(agentId aaeb3a389492e9200)で成功した Step 0f 実行環境とは異なる pinned-cwd 制約であり、agy 委譲や investigation 以前の environment_failure 相当のブロッカーである。"
    
    "人間に依頼したいアクション: (a) canonical main root(`/home/squne/projects/LOOP_PROTOCOL`, branch main)で直接 `preflight.run.with_anchor` を実行して artifacts を生成いただくか、(b) isolation-pinned でない control-plane セッションで本タスクを再開いただくか、いずれかで Step 0f 以降を継続してください。"
    
  6. squne121 commented on Jul 16, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Human Escalation Required

    The loop has terminated and requires human review. Cause: human judgment required

    Blockers

    "issue-reviewer SubAgent が validate_review_compact_output.py に2回連続で通らない producer 出力を返した(fail-closed)"
    
    "1回目: REPLAY_ARTIFACT_DIGEST に sha256: prefix が欠落(validation_status: invalid, input_sha256: sha256:10fb8f48f50568b096988ff942af485d01b44c49e17ae30f20c8fad7a9c4d594)"
    
    "2回目: compact envelope が prose/見出し/code fence で包まれ、REPLAY_VERDICT が5値enum外の値(needs-fix)、EVIDENCE が空(validation_status: invalid, input_sha256: sha256:15a02165a47277b4869ba3e39ae1973df54d19a235c44e49c3892af467687069)"
    
    "reviewer 自体の判定内容としては両回とも VERDICT: needs-fix、blocker C9(## Runtime Verification Applicability セクションがない、レガシー Issue)を示しているが、validator-first fail-closed policy によりこの内容を routing の根拠として採用できない"
    
    "orchestrator は SKILL.md の validator-first fail-closed 方針に従い、producer 出力を自ら手動修復せず Step 5 human_escalation で停止する"
    
  7. squne121 commented on Jul 16, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  8. squne121 commented on Jul 16, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-16T21:38:59Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1537
      body_sha256: "sha256:530a14af2b162a5ecbee5ea6f605fc1d23192736c531556fdc581a1ff1c93c8f"
      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:530a14af2b162a5ecbee5ea6f605fc1d23192736c531556fdc581a1ff1c93c8f","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:0b3258c175e81aa3c8ef59481ff38a03d6353490b2d58d926b3eef2ade4b3d8b","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.11s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":295,"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":"AC2","line":5,"raw_command":"uv run --locked pytest .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py","command_hash":"sha256:f1f1cb74b0f6ca90e405505922fb1f7f474e22d569e5eecfac82594c801685eb","execution_key_hash":"sha256:12cdb29cd9674decd317d3c60475bad655bcfe9329a06e9548f2449bb46a7fcd","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 30 items",".claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py . [  3%]",".............................                                            [100%]","============================== 30 passed in 0.04s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":188,"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":"AC3","line":8,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py","command_hash":"sha256:54330cbe02ee6032fad0db621802c7cbd6d98550452b196a54b5cff85bffb7ce","execution_key_hash":"sha256:4f7f45dc4d0591782d159357115452563139a9f02167d246e1b2a76ac0bfc3c1","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 8 items",".claude/skills/impl-review-loop/tests/test_build_intake_capsule.py ..... [ 62%]","...                                                                      [100%]","============================== 8 passed in 0.05s ==============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":214,"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":"AC4","line":11,"raw_command":"uv run --locked pytest .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py","command_hash":"sha256:6481b4ac9c781cf02887be884bcf399d44f0228d1ab4fb0c60990f16aa6b2acc","execution_key_hash":"sha256:1e3a8c211e2eb7911e96ade5d8a2daacaa08cb5f8e051ec67cdec6d9ba7223ac","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 68 items",".claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py . [  1%]","...................................................................      [100%]","============================== 68 passed in 0.27s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":440,"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":14,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:f3a8b019c30fa1cfae4c0178da8d5a4e671100e5a2c426aa28ff0d81127764a5","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.10s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":250,"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}]
      source: ensure_contract_snapshot_auto
  9. squne121 commented on Jul 16, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了

    • PR: feat: source-bound contract fingerprint を materialize する #1548
    • Worktree: .claude/worktrees/issue-1537-source-bound-contract-fingerprint-materi
    • Branch: worktree-issue-1537-source-bound-contract-fingerprint-materi
    • Verification: 4/4 PASS(AC1: 63 passed / AC2: 46 passed / AC3: 11 passed / AC4: 68 passed / AC5: AC1 と同一)
    • Scope Delta: .claude/skills/impl-review-loop/tests/test_contract_snapshot_author_binding.py(既存2テストへのモック追加のみ、詳細は PR 本文参照)
    • Overlap Preflight: fresh re-run が #1348 との構造的シグナル共有により route: human_review_required を返したため、PR は open_pr.py を経由せず gh pr create で直接起票した(既存 precedent は PR 実装: contract snapshotのtrusted publisher identityとcomment ID bindingを検証する #1485 の Notes 参照)。人間による overlap 判定の再確認が必要。
    • 後続: PR レビュー(pr-review-judge)→ overlap 判定の人間確認 → マージ → post-merge-cleanup
  10. added 2 commits that reference this issue on Jul 16, 2026
  11. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-17T10:14:11Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1537
      body_sha256: "sha256:a246baca7d0fde7e5a6204c21af7fbd97feb402718640ed875cb2f7273717abe"
      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:a246baca7d0fde7e5a6204c21af7fbd97feb402718640ed875cb2f7273717abe","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:0b3258c175e81aa3c8ef59481ff38a03d6353490b2d58d926b3eef2ade4b3d8b","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.11s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":278,"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":"AC2","line":5,"raw_command":"uv run --locked pytest .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py","command_hash":"sha256:f1f1cb74b0f6ca90e405505922fb1f7f474e22d569e5eecfac82594c801685eb","execution_key_hash":"sha256:12cdb29cd9674decd317d3c60475bad655bcfe9329a06e9548f2449bb46a7fcd","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 30 items",".claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py . [  3%]",".............................                                            [100%]","============================== 30 passed in 0.04s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"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":"AC3","line":8,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py","command_hash":"sha256:54330cbe02ee6032fad0db621802c7cbd6d98550452b196a54b5cff85bffb7ce","execution_key_hash":"sha256:4f7f45dc4d0591782d159357115452563139a9f02167d246e1b2a76ac0bfc3c1","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 8 items",".claude/skills/impl-review-loop/tests/test_build_intake_capsule.py ..... [ 62%]","...                                                                      [100%]","============================== 8 passed in 0.05s ==============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":209,"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":"AC4","line":11,"raw_command":"uv run --locked pytest .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py","command_hash":"sha256:6481b4ac9c781cf02887be884bcf399d44f0228d1ab4fb0c60990f16aa6b2acc","execution_key_hash":"sha256:1e3a8c211e2eb7911e96ade5d8a2daacaa08cb5f8e051ec67cdec6d9ba7223ac","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 68 items",".claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py . [  1%]","...................................................................      [100%]","============================== 68 passed in 0.25s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":397,"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":14,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:f3a8b019c30fa1cfae4c0178da8d5a4e671100e5a2c426aa28ff0d81127764a5","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.10s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":242,"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}]
      source: ensure_contract_snapshot_auto
  12. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-17T10:37:43Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1537
      body_sha256: "sha256:baaa85736da32247b4ef3c9f3ef1278b10fae0ad3630c582a92b5419a90880d1"
      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:baaa85736da32247b4ef3c9f3ef1278b10fae0ad3630c582a92b5419a90880d1","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:0b3258c175e81aa3c8ef59481ff38a03d6353490b2d58d926b3eef2ade4b3d8b","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.13s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":409,"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":"AC2","line":5,"raw_command":"uv run --locked pytest .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py","command_hash":"sha256:f1f1cb74b0f6ca90e405505922fb1f7f474e22d569e5eecfac82594c801685eb","execution_key_hash":"sha256:12cdb29cd9674decd317d3c60475bad655bcfe9329a06e9548f2449bb46a7fcd","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 30 items",".claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py . [  3%]",".............................                                            [100%]","============================== 30 passed in 0.06s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":314,"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":"AC3","line":8,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py","command_hash":"sha256:54330cbe02ee6032fad0db621802c7cbd6d98550452b196a54b5cff85bffb7ce","execution_key_hash":"sha256:4f7f45dc4d0591782d159357115452563139a9f02167d246e1b2a76ac0bfc3c1","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 8 items",".claude/skills/impl-review-loop/tests/test_build_intake_capsule.py ..... [ 62%]","...                                                                      [100%]","============================== 8 passed in 0.07s ==============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":361,"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":"AC4","line":11,"raw_command":"uv run --locked pytest .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py","command_hash":"sha256:6481b4ac9c781cf02887be884bcf399d44f0228d1ab4fb0c60990f16aa6b2acc","execution_key_hash":"sha256:1e3a8c211e2eb7911e96ade5d8a2daacaa08cb5f8e051ec67cdec6d9ba7223ac","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 68 items",".claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py . [  1%]","...................................................................      [100%]","============================== 68 passed in 0.40s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":614,"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":14,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:f3a8b019c30fa1cfae4c0178da8d5a4e671100e5a2c426aa28ff0d81127764a5","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.16s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":400,"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}]
      source: ensure_contract_snapshot_auto
  13. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Bootstrap Fingerprint Exception

    BOOTSTRAP_FINGERPRINT_EXCEPTION_V1:
      authorization: "owner approved 2026-07-17"
      target:
        issue: 1537
        pull_request: 1548
        reviewed_head_sha: "51d1e429f083b2fab3c01173c0633fb1f80fa54b"
        contract_snapshot:
          comment_id: "5002251342"
          url: "https://github.com/squne121/loop-protocol/issues/1537#issuecomment-5002251342"
          issue_body_sha256: "sha256:baaa85736da32247b4ef3c9f3ef1278b10fae0ad3630c582a92b5419a90880d1"
      waiver:
        only_reason: "expected_contract_fingerprint_missing"
        effect: "PR #1548 の初回 review に限り、当該 reason を bootstrap exception として扱う。snapshot は fingerprint-ready 又は fingerprint の authoritative source ではない。"
      not_waived:
        - "Allowed Paths"
        - "reviewed head SHA 一致"
        - "Acceptance Criteria / Verification Commands"
        - "CI"
        - "schema consumer inventory"
        - "safety claims"
        - "その他の Allowed Paths gate reason"
      prohibited:
        - "未マージ PR の producer を使った GitHub contract snapshot の生成、PATCH、権威化"
        - "worker 自己申告又は自由記述による fingerprint 補完"
      post_merge_requirement:
        - "PR #1548 merge 後、trusted main の producer で二相 materialize を実行する"
        - "独立 read-back で fingerprint-ready snapshot を確認する"
        - "以後の PR review で本 exception を再利用しない"
      expiration:
        - "PR #1548 の head SHA が変化した時"
        - "対象 issue 本文が変化した時"
        - "target contract snapshot の source 又は body_sha256 が不一致になった時"
        - "PR #1548 merge 後の fingerprint-ready snapshot read-back 完了時"
  14. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-17T11:23:51Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1537
      body_sha256: "sha256:ac125375e0fc1e6fbcdb0f7afffb48f44fc123daa6bae66e0fe49eb9bbe85f39"
      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:ac125375e0fc1e6fbcdb0f7afffb48f44fc123daa6bae66e0fe49eb9bbe85f39","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":2,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:0b3258c175e81aa3c8ef59481ff38a03d6353490b2d58d926b3eef2ade4b3d8b","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.10s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":250,"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":"AC2","line":5,"raw_command":"uv run --locked pytest .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py","command_hash":"sha256:f1f1cb74b0f6ca90e405505922fb1f7f474e22d569e5eecfac82594c801685eb","execution_key_hash":"sha256:12cdb29cd9674decd317d3c60475bad655bcfe9329a06e9548f2449bb46a7fcd","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 30 items",".claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py . [  3%]",".............................                                            [100%]","============================== 30 passed in 0.04s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":192,"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":"AC3","line":8,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_build_intake_capsule.py","command_hash":"sha256:54330cbe02ee6032fad0db621802c7cbd6d98550452b196a54b5cff85bffb7ce","execution_key_hash":"sha256:4f7f45dc4d0591782d159357115452563139a9f02167d246e1b2a76ac0bfc3c1","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 8 items",".claude/skills/impl-review-loop/tests/test_build_intake_capsule.py ..... [ 62%]","...                                                                      [100%]","============================== 8 passed in 0.05s ==============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":214,"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":"AC4","line":11,"raw_command":"uv run --locked pytest .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py","command_hash":"sha256:6481b4ac9c781cf02887be884bcf399d44f0228d1ab4fb0c60990f16aa6b2acc","execution_key_hash":"sha256:1e3a8c211e2eb7911e96ade5d8a2daacaa08cb5f8e051ec67cdec6d9ba7223ac","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 68 items",".claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py . [  1%]","...................................................................      [100%]","============================== 68 passed in 0.28s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":446,"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":14,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:f3a8b019c30fa1cfae4c0178da8d5a4e671100e5a2c426aa28ff0d81127764a5","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.10s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":253,"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":17,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:3ca26ba3521e001058fbc01b444a6153de17bbb643d8d6a922827e6c8f855610","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.12s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":293,"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":20,"raw_command":"uv run --locked pytest .claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py","command_hash":"sha256:f1f1cb74b0f6ca90e405505922fb1f7f474e22d569e5eecfac82594c801685eb","execution_key_hash":"sha256:219519d1056aca61652a84bdffd8091d550c984dc004e362d2ea277a3224f44a","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 30 items",".claude/skills/issue-contract-review/tests/test_contract_review_result_parser.py . [  3%]",".............................                                            [100%]","============================== 30 passed in 0.04s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"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":"AC8","line":23,"raw_command":"uv run --locked pytest .claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py","command_hash":"sha256:6481b4ac9c781cf02887be884bcf399d44f0228d1ab4fb0c60990f16aa6b2acc","execution_key_hash":"sha256:3752255a177e404207d5eeca40c0628c9230e58892144b27d7f7401ac617753c","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 68 items",".claude/skills/pr-review-judge/tests/test_allowed_paths_review_gate.py . [  1%]","...................................................................      [100%]","============================== 68 passed in 0.29s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":491,"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":26,"raw_command":"uv run --locked pytest .claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py","command_hash":"sha256:a44e76bf6cf480a6e6726baaa882a33d675f5ef2982a5fac6803f22903414a24","execution_key_hash":"sha256:84f41a1fe84e1acb86fbd3ae4c2a03e114b0d4bf4dc1907ba1eff7a7bf1b767b","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 50 items",".claude/skills/impl-review-loop/tests/test_ensure_contract_snapshot.py . [  2%]",".................................................                        [100%]","============================== 50 passed in 0.12s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":287,"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":"AC10","line":29,"raw_command":"uv run --locked pytest .claude/skills/issue-contract-review/tests/test_run_contract_review_once.py","command_hash":"sha256:498d8b094e2decf41587ba21596c3474af4863b9f0fe59c2c7834d60be406a5d","execution_key_hash":"sha256:b005d664b72bddeb36fa1a2a71ce10afd4eead88f127721834c9bf604e70799d","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 26 items",".claude/skills/issue-contract-review/tests/test_run_contract_review_once.py . [  3%]",".........................                                                [100%]","============================== 26 passed in 0.05s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":206,"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":"AC11","line":32,"raw_command":"uv run --locked pytest scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py","command_hash":"sha256:83654db5c9bc9310e88002ab653cb6fe57a2c0ddb8288ac3de40b144870f9ce0","execution_key_hash":"sha256:3cf946219bca29046d8dbe112117a7de9ceb245ea60fc4fb3c751885c4d9bdaf","runner":"exec","exit_code":0,"classification":"expected_pass","category":"regression_gate","decision":"go","scope_class":"regression_gate","confidence":"low","stdout_head":["============================= test session starts ==============================","platform linux -- Python 3.12.3, pytest-9.0.3, pluggy-1.6.0","rootdir: /home/squne/projects/LOOP_PROTOCOL","configfile: pyproject.toml","plugins: xdist-3.8.0","collected 49 items","scripts/agent-guards/tests/test_controlled_issue_metadata_exec.py ...... [ 12%]","...........................................                              [100%]","============================== 49 passed in 0.34s =============================="],"stdout_truncated":false,"stdout_original_line_count":12,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":496,"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}]
      source: ensure_contract_snapshot_auto
  15. squne121 commented on Jul 17, 2026

    @squne121
    OwnerAuthor

    Bootstrap Fingerprint Exception

    BOOTSTRAP_FINGERPRINT_EXCEPTION_V1:
      authorization: "owner approved 2026-07-17"
      target:
        issue: 1537
        pull_request: 1548
        reviewed_head_sha: "9bae1ce687c7276f4f7fbe6f7a13782f18406ff3"
        contract_snapshot:
          comment_id: "5002722988"
          url: "https://github.com/squne121/loop-protocol/issues/1537#issuecomment-5002722988"
          issue_body_sha256: "sha256:ac125375e0fc1e6fbcdb0f7afffb48f44fc123daa6bae66e0fe49eb9bbe85f39"
      waiver:
        only_reason: "expected_contract_fingerprint_missing"
        effect: "PR #1548 の current-head review に限り、当該 reason を bootstrap exception として扱う。snapshot は fingerprint-ready 又は fingerprint の authoritative source ではない。"
      not_waived:
        - "Allowed Paths"
        - "reviewed head SHA 一致"
        - "Acceptance Criteria / Verification Commands"
        - "CI"
        - "schema consumer inventory"
        - "safety claims"
        - "その他の Allowed Paths gate reason"
      prohibited:
        - "未マージ PR の producer を使った GitHub contract snapshot の生成、PATCH、権威化"
        - "worker 自己申告又は自由記述による fingerprint 補完"
      post_merge_requirement:
        - "PR #1548 merge 後、trusted main の producer で二相 materialize を実行する"
        - "独立 read-back で fingerprint-ready snapshot を確認する"
        - "以後の PR review で本 exception を再利用しない"
      expiration:
        - "PR #1548 の head SHA が変化した時"
        - "対象 issue 本文が変化した時"
        - "target contract snapshot の source 又は body_sha256 が不一致になった時"
        - "PR #1548 merge 後の fingerprint-ready snapshot read-back 完了時"
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