Skip to content

実装: IMPLEMENTATION_SCOPE_COVERAGE_V1 の pr_head_sha を current-head drift で stale 化させない #2766

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "PR本文の IMPLEMENTATION_SCOPE_COVERAGE_V1 が fix iteration 後も current head と自己矛盾せず、review noise と stale provenance を発生させない"
change_kind: workflow
dedupe_key: "impl-review-loop:implementation-scope-coverage-current-head-drift:v1"

Problem

PR #2764 の OWNER review(https://github.com/squne121/loop-protocol/pull/2764#issuecomment-5832937110)で、PR本文の IMPLEMENTATION_SCOPE_COVERAGE_V1.pr_head_sha が d8a3e701... のままなのに対し、live PR head は 5104d7bf... へ進んでいた。

実装・レビューの fix iteration で commit が追加されるたび、静的な PR body 内の head SHA は自然に stale 化し得る。一方、impl-review-loop / current-head evidence の運用は過去 head の PASS を current head へ流用しないことを重視しており、手動更新前提の pr_head_sha は provenance 表示として自己矛盾と不要なレビュー指摘を生みやすい。

これは merge correctness の blocker ではないが、繰り返し発生しやすい workflow friction なので軽量に解消する。

Goal

IMPLEMENTATION_SCOPE_COVERAGE_V1 の static coverage metadata と live-head evidence の責務を分離し、PR更新後に手動で body の SHA を追随させなくても stale provenance claim を作らない。

In Scope

  • IMPLEMENTATION_SCOPE_COVERAGE_V1.pr_head_sha の authority / lifecycle を明確化する。
  • 次のいずれかの最小設計を採用する:
    1. static PR-body manifest から pr_head_sha を削除し、current head は既存 live readback / Step 2 / Step 4 evidence に委ねる。
    2. field を残す場合は authoritative current-head claim と扱わず、生成時 snapshot と明示してレビュー判定根拠から外す。
    3. 自動更新が既存 primitive だけで十分軽量なら、publish 後に current head へ idempotent に再生成する。
  • PR 実装: Herdr live handoff 後の startup hook 再発火で ACTIVE Binding を重複resumeしない #2764 を regression fixture / concrete reproducer として使う。
  • 新 daemon、常時 human gate、重い provenance subsystem は導入しない。

Acceptance Criteria

  • AC1: fix iteration で PR head が進んでも、static coverage block が current-head の虚偽/陳腐化した authority claim を残さない。
  • AC2: semantic/test/CI の current-head binding は既存 impl-review-loop の live evidence gate を正本として維持する。
  • AC3: PR 実装: Herdr live handoff 後の startup hook 再発火で ACTIVE Binding を重複resumeしない #2764 型の「coverage block の SHA は旧head、live PR は新head」が false inconsistency / review churn を起こさない regression test または fixture を追加する。
  • AC4: 追加処理は通常の自律 impl-review-loop を妨げず、手動 PR-body 更新を要求しない。
  • AC5: stale metadata を hidden PASS evidence として扱わず、current-head checks の既存 freshness contractを弱めない。

Non-Goals

Source

Activity

  1. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    再発観測: PR #3026 の static coverage marker が現HEADと乖離(非blocking)

    現行の code/CI/VC の failure はこの乖離だけでは実証されておらず、マージ blocker としない。既存Issue #2766 の扱う「静的 marker を current-head の authority と誤認する」failure class の再発例として記録する。PR #3026 に対しては本文の説明文を現行VC表記へ合わせ、旧markerは generation-time snapshot として明示するか、正規 producer の手順に従って扱う。旧テスト結果のSHAだけを現HEADに書き換えて検証済みと偽装しない。

    新しい gate / schema / approval layer の追加は不要。

  2. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    再発観測: PR #3032 の static coverage marker が main 取込み後に旧 HEAD を参照

    これは #2766 の「static pr_head_sha を current-head provenance と誤認しやすい」既知 failure class の別再発例。修復方針は既存 AC を再利用し、新 schema / gate を追加しない。PR #3032 の機能修正やマージを本事象単独でブロックしない。

  3. squne121 commented on Oct 11, 2026

    @squne121
    OwnerAuthor

    再発観測: PR #3040 の static scope-coverage marker が現 HEAD / Allowed Paths と乖離(非blocking)

    これは既存 #2766 が所有する「PR HEAD や契約が更新されると static coverage marker が古い provenance を保持する」事象の再発です。新規 Issue は起票せず本 Issue に証拠を集約します。

    この乖離単独で実装/required CI/PR review が失敗した証拠はなく、独立した merge blocker としません。PR #3040 の P2/P3 コード修復は既存 #3039 で進め、修復後 HEAD の test/CI/review/terminal-gate を改めて取得してください。旧 marker の SHA や旧 HEAD の APPROVE を現 HEAD の検証済み証拠に読み替えないでください。恒久対策は本 Issue の AC を再利用し、新しい gate・schema・approval layer を増やさない方針です。

  4. squne121 commented on Oct 14, 2026

    @squne121
    OwnerAuthor

    再発観測: PR #3045 の coverage marker が main 取込み後の HEAD に追随しない

    これは #2766 の既存 dedupe key impl-review-loop:implementation-scope-coverage-current-head-drift:v1 と同じ failure class。新規 Issue は作らず、既存 #2766 に観測例として追記する。#3045 の直接の P2(pytest tmp_path / --basetemp 配置依存)は Issue #3023 / 同一PRで修正する別の論点。

    新しい schema / gate / approval layer は求めない。既存 #2766 の最小対応方針を維持する。

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions