Skip to content

実装: review loops で既存 primitive の guard 成立を未保証の semantic proof へ誤昇格しない #2755

Open

Description

@squne121

Problem

PR #2754 の review(https://github.com/squne121/loop-protocol/pull/2754#issuecomment-5828693174)で、Issue #2742 の refinement/implementation chain に同型の semantic-proof failure が確認された。

Issue #2742 は OWNER anchor review で「RESTORING を無条件で stale 扱いしてはいけない」「Herdr live handoff では pane process が生存し得る」と明示していたにもかかわらず、refinement 後の contract は既存 primitive mark_restore_blocked_if_pending() の guard 成立を staleness proof として扱う形になった。

しかし当該 primitive が実際に確認するのは概ね:

  • Binding がまだ RESTORING
  • 指定 execution_run がまだ open

のみであり、process death / cold-restart generation / lease expiry / timeout / non-handoff 等の liveness/staleness evidence は確認しない。

そのため PR #2754 は guard succeeded == stale proved を実装・テストへ固定し、正常に進行中の live-handoff restore を RESTORE_BLOCKED に誤遷移させ得る production correctness blocker を作った。

Goal

issue refinement / implementation review が、既存 function・guard・primitive の boolean/result を、その実装が保証していない上位の意味論(stale / dead / live / authorized / complete 等)へ誤昇格しないようにする。

個人趣味開発の速度を落とさないことを優先し、general-purpose theorem prover / 新 daemon / 大規模 schema / 常時 human gate は導入しない。既存 reviewer の bounded read と regression fixture を中心にする。

In Scope

  • .claude/skills/issue-refinement-loop/ の review/refinement guidance
  • .claude/skills/pr-review-judge/ の semantic contract review guidance
  • 必要最小限の regression fixture / unit test
  • 「既存 primitive を AC の証明根拠として再利用する場合」の narrow proof obligation を追加する
    • primitive の docstring / implementation /既存 test が実際に保証する predicate を確認
    • AC が要求する predicate と一致するかを比較
    • 一致しない場合は、その primitive の成功だけを根拠に AC を satisfiable/pass としない
    • missing evidence は REQUEST_CHANGES / contract correction の具体的 fix_delta にする

Acceptance Criteria

Non-Goals

References

Activity

  1. squne121 commented on Sep 25, 2026

    @squne121
    OwnerAuthor

    追加 reproducer: PR #2764

    PR #2764 の OWNER review(https://github.com/squne121/loop-protocol/pull/2764#issuecomment-5832937110)で、#2755 と同型の semantic-proof 誤昇格が再発した。

    #2755 の regression corpus に #2754 だけでなく #2764 も追加し、少なくとも次を検出対象にするのが有用:

    1. primitive proves pane-local foreground activity != target Binding identity/liveness proved
    2. optional/partial fields の欠落時に stronger semantic predicate へ昇格しない
    3. テスト名・コメントが PROVEN_ALIVE を主張していても、causal evidence が対象 identity を束縛していなければ false proof として REQUEST_CHANGES にできる

    既存 Goal/AC2-AC4 の範囲で扱えるため、新規重複 Issue は作成しない。

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