Skip to content

実装: issue-refinement-loop handoff の title_prefix_ready を live title readback で保証する #2776

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "issue-refinement-loop が live title に implementation consumer prefix が無いまま title_prefix_ready: true / refinement_approved を発行し、直後の impl-review-loop が metadata_not_ready で停止する cross-loop false-ready を再発防止する"
change_kind: workflow
dedupe_key: "follow-up:issue-refinement-loop:title-prefix-live-readback-false-ready"

Source / Reproducer

Issue #2771 の refinement 完了時に、最新の終了コメントは以下を報告した。

  • termination_reason: approved
  • LOOP_HANDOFF_RESULT_V1.status: refinement_approved
  • metadata.title_prefix_ready: true
  • auto_fixes.required: []
  • blockers: []

Source comment:
#2771 (comment)

一方、同コメント投稿後の live Issue #2771 title は:

再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する

であり、実装: / implement: prefix を持たない。

current .claude/skills/impl-review-loop/steps/preparation.md と
.claude/skills/impl-review-loop/scripts/build_intake_capsule.py は title prefix を
implementation consumer の authoritative readiness 条件として扱い、prefix 欠落時は
metadata_not_ready / title_prefix_ok: false となる。なお
phase/implementation label は #2084 以降 presentation-only であり代替 authority ではない。

これは #626 / #628 が意図した「issue-refinement-loop 成功後、追加の人間 Y なしで
impl-review-loop intake ready に到達する」契約の回帰である。#628 は closed 済みで、
repository-wide issue/PR search ではこの live-title false-ready を扱う open duplicate は
確認できなかった。

Outcome

issue-refinement-loop の approved termination / handoff が、
live Issue title と矛盾する metadata.title_prefix_ready: true を発行できないようにする。

implementation Issue の title prefix が不足している場合は、既存の controlled mutation /
metadata hygiene repair lane を再利用して 実装: または implement: へ決定論的に正規化し、
mutation 後の live readback で prefix を確認してからだけ
refinement_approved / title_prefix_ready: true を発行する。

mutation が permission / transport / readback failure で完了しない場合は false-ready にせず、
bounded retry 後に machine-readable blocker を返す。phase label の存在だけで
title_prefix_ready を true にしてはならない。

In Scope

  • approved termination 直前の live title readback と consumer-ready prefix 判定を deterministic にする。
  • metadata.title_prefix_ready を live title または成功済み metadata-hygiene mutation + readback からのみ導出する。
  • prefix 欠落時は既存 repair executor / controlled GitHub mutation lane を再利用し、新しい broad write path を追加しない。
  • repair 成功後に live title を再取得し、実際の title が 実装: / implement: で始まることを確認する。
  • repair 失敗・readback mismatch 時は refinement_approved を禁止し、明示的 reason code を返す。
  • 実装: 再発防止: Runtime Verification profile の全 assertion を Issue VC に binding して readiness で検証する #2771 型 regression fixture を追加する:
    • implementation body + phase/implementation label + prefix 欠落
    • stale/inaccurate title_prefix_ready: true を許可しない
    • repair 成功後のみ handoff success
  • issue-refinement-loop terminal producer と impl-review-loop intake consumer の cross-loop parity regression を追加する。
  • 実装: issue-refinement-loop の terminal contract を LOOP_HANDOFF_RESULT_V1.status: impl_ready に固定する #628 の no-extra-human-approval goal を維持する。

Out of Scope

Acceptance Criteria

Verification Commands

実装時に current test layout を確認して最小の focused tests を選ぶこと。少なくとも以下の領域を含める。

uv run --locked pytest .claude/skills/issue-refinement-loop/tests/ -q
uv run --locked pytest .claude/skills/impl-review-loop/tests/test_intake_gate.py -q

新規 cross-loop regression test を追加した場合は、その test file を明示的に実行する VC を追加する。

Allowed Paths

  • .claude/skills/issue-refinement-loop/SKILL.md
  • .claude/skills/issue-refinement-loop/references/termination-policy.md
  • .claude/skills/issue-refinement-loop/scripts/**
  • .claude/skills/issue-refinement-loop/tests/**
  • .claude/skills/impl-review-loop/tests/**
  • docs/dev/workflow.md

Stop Conditions

  • title prefix 正規化に新規 broad GitHub write permission / permission-mode 変更が必要になる場合。
  • semantic Issue contract の意味変更が必要になる場合。
  • impl-review-loop 側の title prefix requirement 自体を変更しないと解決できない場合。
  • 上記 Allowed Paths 外の production authority を変更する必要が判明した場合。

Required Design References

Notes for Reviewer

本件は label sync の問題ではない。#2084 の方針どおり label は presentation-only のままとし、
producer の terminal claim を consumer が実際に読む live title predicate と一致させることが目的。

body hash freshness だけでは title drift / title omission を検出できないため、approved termination の
metadata readiness は body-only fingerprint と分離して live title を直接 readback する。

Activity

  1. added
    enhancement
    follow-up
    on Sep 26, 2026
  2. squne121 commented on Oct 10, 2026

    @squne121
    OwnerAuthor

    追加再現例: Issue #3004(2026-10-10)

    #2776 と同じ cross-loop false-ready が #3004 の refinement 終端でも観測されました。

    #3004 の通常実装着手前には既存 metadata-hygiene route でタイトルを 実装: ... に正規化し、live title readback を確認してください。Issue body / AC / VC をこのために再書換えする必要はありません。#2776 の回帰テストには #2771 に加えて #3004 型の refinement_approved + false title_prefix_ready を追加し、修正はこの Issue の既存スコープで扱うのが適切です。重複する新規 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

    enhancementfollow-up

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions