Skip to content

実装: validate_issue_body.py の LP010 が AC/VC 番号不一致(VC 内 AC マーカー皆無・AC bullet 混在ケース)を検出できない偽陰性を修正する #1704

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "validate_issue_body.py の LP010 の AC 番号抽出が hyphen-bullet 限定の正規表現であることに起因する偽陰性(VC 内 AC マーカー皆無ケース、および `-`/`*`/`+` 混在 bullet ケース)を修正する"
change_kind: code

Parent Issue

none(単独改善)

Parent Goal Ref

なし(単独改善のため該当なし)

Current Validated Scope

Remaining Parent Gaps

  • check_issue_contract.py(C5_ac_vc_number_alignment)自体の広域正規表現(re.findall(r"AC(\d+)", ac_section) による説明文中の AC 番号誤抽出)と、VC 側の余分な AC 参照を検出しない片方向判定は、本 Issue のスコープ外。実装: check_issue_contract.py の C5_ac_vc_number_alignment が AC セクション全体への広域正規表現で説明文中の AC 番号を誤抽出し、かつ VC の余分な AC 参照を検出しない問題を修正する #1712(実装: check_issue_contract.py の C5_ac_vc_number_alignment が AC セクション全体への広域正規表現で説明文中の AC 番号を誤抽出し、かつ VC の余分な AC 参照を検出しない問題を修正する)で対応する。
  • AC 定義抽出・Section extraction の共有パーサ化(prose_boundary_policy.py の parse_atx_heading_line() / HEADING_POLICY への統一)は本 Issue のスコープ外。validate_issue_body.py の _extract_section は現状 ^##\s+Acceptance\ Criteria\s*$ という厳密な正規表現のみを認識し、0〜3 spaces indent・closing #・日英併記見出し・fenced code 内外の区別に対応していない。これは別途の懸念として残すが、新規 Issue 番号の付与は本 Issue の必須要件ではない。
  • .claude/skills/issue-refinement-loop/scripts/parent_replay_binding.py の parent-local replay integrity binding(コード docstring 内で Issue 実装: review compact artifact の provenance attestation を追加する #1532 参照)が、本 Issue の修正後に実際に reviewer_false_positive_suspected を出さなくなるかは、AC7 の parent replay integration test で確認する(production の parent_replay_binding.py 自体は変更しない)。

Outcome

.claude/skills/create-issue/scripts/validate_issue_body.py の LP010 ルールが、(a) Verification Commands セクションに # AC<N> 形式の AC 参照コメントが一つも存在しないケース、(b) AC セクションの task-list marker が -/*/+ で混在するケース、の両方を正しく FAIL として検出するようになり、かつ AC item の説明文・URL・ファイル名・inline code・fenced code 内に現れる AC<N> という文字列を定義済み AC として誤抽出しない状態。C5(check_issue_contract.py)と LP010 の合否一致は fixture-level(同一 fixture に対する個別比較)で確認し、一般的な「C5 との parity 回復」は主張しない(C5 側の広域 regex / extra-ref semantics は #1712 のスコープ)。.claude/skills/create-issue/scripts/tests/ 配下に追加した回帰テストと .claude/skills/issue-refinement-loop/tests/ 配下に追加した parent replay integration test、既存テストスイートが全て PASS している状態。

In Scope

  • validate_issue_body.py の _extract_ac_numbers(または関連ヘルパー)を修正し、-/*/+ の task-list marker、[ ]/[x]/[X]、marker 後 1〜4 spaces を認識するようにする
  • AC 番号抽出結果が空集合になったケースで、VC 側参照集合との vacuous match(誤って「一致」とみなす)が発生しないようにする
  • AC item の説明文・URL・ファイル名・inline code・fenced code 内に現れる AC<N> という文字列を、定義済み AC として誤抽出しないようにする
  • Issue 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 の該当時点の body(AC1〜AC15 が * [ ] bullet で存在し、VC セクションに # AC<N> 参照が一切ないケース)をリポジトリ内に固定した fixture(GitHub live body に依存しない)を使った回帰テストの追加。fixture には source_issue / source_observed_at / source_body_sha256 を記録する
  • - [ ] AC1 と * [ ] AC2 が混在する fixture を使った回帰テストの追加
  • 同一 fixture に対する C5(check_issue_contract.py, FAIL)と LP010(validate_issue_body.py, FAIL)の合否一致を検証するテストの追加(fixture-level assertion に限定し、一般的な parity 主張はしない)
  • contract_readiness_check.py の結果に LP010 error が現れること、同一 body_sha256 で REVIEWER_BLOCKER_CLAIM_V1 を parent replay に渡した際に deterministic_fail_confirmed / proceed_to_rewrite になることを確認する parent replay integration test(.claude/skills/issue-refinement-loop/tests/ 配下に新規追加。production の parent_replay_binding.py 自体は変更しない)
  • 修正後も既存の LP010/LP011/LP016 関連テスト(test_validate_issue_body.py、test_validate_issue_body_mrc_shared.py、test_vc_grammar_parity.py)が regression なく PASS すること

Out of Scope

Acceptance Criteria

  • AC1: validate_issue_body.py の AC 番号抽出ロジックが、-/*/+ の task-list marker、[ ]/[x]/[X]、marker 後 1〜4 spaces を認識して AC 番号を抽出する
  • AC2: AC セクションの全項目がアスタリスク bullet(* [ ] AC番号...)で記述され、VC セクションに # AC<N> 参照が一つも存在しない fixture body に対して、LP010 が errors に rule_id: LP010 を含む結果を返す(現状は 0 errors で誤って PASS する。fixture 内の AC 番号レンジは 1 から 15 とする)
  • AC3: - [ ] AC1 と * [ ] AC2 が混在する fixture body に対して、LP010 が errors に rule_id: LP010 を含む結果を返す
  • AC4: AC item の説明文・URL・ファイル名・inline code・fenced code 内に現れる AC<N> という文字列が、定義済み AC として誤抽出されない
  • AC5: AC2 と同一の fixture body に対して、check_issue_contract.py の C5_ac_vc_number_alignment(FAIL)と LP010(FAIL)の合否が fixture-level で一致する
  • AC6: 追加した回帰テストに加え、既存の test_validate_issue_body.py / test_validate_issue_body_mrc_shared.py / test_vc_grammar_parity.py の全既存テストが regression なく PASS する
  • AC7: contract_readiness_check.py --mode static の結果に LP010 由来の error が現れる fixture について、同一 body_sha256 を持つ REVIEWER_BLOCKER_CLAIM_V1 を parent_replay_binding.py の parent-local replay integrity binding に渡した際に deterministic_fail_confirmed / proceed_to_rewrite になることを、.claude/skills/issue-refinement-loop/tests/ 配下の新規 integration test で確認する
  • AC8: Issue 実装: ChatGPT GitHub connector retro E2E proof を live 環境で検証し resolve-live status を記録する #1415 の該当時点の body を再現した fixture がリポジトリ内に固定され、source_issue / source_observed_at / source_body_sha256 を記録し、GitHub live body の取得に依存しない

Verification Commands

$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_extract_ac_numbers_recognizes_mixed_markers  # AC1
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_fails_when_all_asterisk_bullet_and_vc_has_zero_ac_markers  # AC2
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_fails_on_mixed_hyphen_asterisk_bullet  # AC3
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_does_not_extract_ac_number_from_prose_or_code  # AC4
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_c5_lp010_fixture_level_agreement_on_zero_marker_fixture  # AC5
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_validate_issue_body.py .claude/skills/create-issue/scripts/tests/test_validate_issue_body_mrc_shared.py .claude/skills/review-issue/tests/test_vc_grammar_parity.py  # AC6
$ uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_parent_replay_lp010_deterministic_fail.py -k test_lp010_error_drives_deterministic_fail_confirmed  # AC7
$ uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_issue_1415_historical_fixture_is_repo_pinned  # AC8

Allowed Paths

  • .claude/skills/create-issue/scripts/validate_issue_body.py
  • .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py
  • .claude/skills/issue-refinement-loop/tests/test_parent_replay_lp010_deterministic_fail.py

Stop Conditions

Required Skills

なし

Required Design References

  • docs/dev/agent-skill-boundaries.md
  • .claude/skills/issue-refinement-loop/references/anchor-comment-handling.md
  • .claude/skills/review-issue/tests/test_vc_grammar_parity.py

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本 Issue は既存 Python 検証スクリプト(validate_issue_body.py)内の正規表現ロジック修正であり、プロセス起動・ネットワーク通信・外部 I/O を伴わない。全 AC は pytest による静的な単体テスト/統合テスト(contract_readiness_check.py --mode static 呼び出しを含む subprocess テストも静的入出力検証のみ)で完結する。

Scope Delta(任意)

N/A

Background

OWNER Anchor Comment 対応の記録

  • 本 Issue 本文は OWNER の anchor comment(issuecomment-5073552872、REQUEST_CHANGES、author_association: OWNER、trusted)への対応として書き換えた。
  • anchor comment の指摘: 「C5 との parity 回復」という表現は過大主張であり、C5(片方向判定・extra-ref許容)と LP010(完全一致判定)は異なる述語であるため、現状の C5 実装のままでは一般的な parity は達成不可能。加えて、C5 の AC 抽出自体が広域正規表現で説明文中の AC 番号を誤抽出する別バグを抱えている。
  • orchestrator は独立に実コード(check_issue_contract.py の check_c5_ac_vc_alignment L1034-1076、validate_issue_body.py の _extract_ac_numbers L189-202・_extract_section L90-117、check_c3_ac_checkbox_format L963-972)を fact-check し、anchor comment の技術的主張が正しいことを確認した。
  • 是正ルートとして anchor comment が提示した「完全修正ルート(C5 もスコープに含める)」「限定修正ルート(タイトル・Outcome から一般的な『C5 parity』表現を撤回し、LP010 の zero-marker 偽陰性修正に限定。ただし mixed-bullet fixture・fenced-code除外・parent replay integration test は追加し、C5 の広域 regex と extra-ref semantics は明示的な Remaining Gap として実 Issue 番号を付ける)」のうち、限定修正ルートを採用した。理由: 「1 Issue = 1 PR」の原則を維持し、C5 側の変更は cross-cutting な別懸念であるため、直前に新規起票した 実装: check_issue_contract.py の C5_ac_vc_number_alignment が AC セクション全体への広域正規表現で説明文中の AC 番号を誤抽出し、かつ VC の余分な AC 参照を検出しない問題を修正する #1712 に切り出す方が変更の検証可能性・レビュー容易性が高いと判断した。

Dependencies / Related

Notes for Reviewer

Activity

  1. added
    enhancement
    phase/implementation
    agent/implementer
    on Jul 24, 2026
  2. squne121 commented on Jul 24, 2026

    @squne121
    OwnerAuthor

    [create-issue] Scope Collision (C1): related_issue=#1396, #30; overlapping_paths=.claude/skills/create-issue/scripts/tests/test_lp010_c5_parity_regression.py, .claude/skills/create-issue/scripts/validate_issue_body.py。

    non_conflict_reason: #1396 は同ファイルを Allowed Paths に含むが対象は Machine-Readable Contract 追加 key の検証ロス修正であり、本 Issue(AC/VC 番号整合の LP010/C5 parity 修正)とは独立した concern。#30 は .claude/skills/create-issue/scripts ディレクトリ全体を broad に含むだけで、対象は Out of Scope 追跡手順であり無関係。

    edit_intent: 本 Issue は _extract_ac_numbers / _validate_lp010_ac_vc_mismatch のロジック修正と新規回帰テストファイル追加のみ。#1396 が実装される場合はマージ順序に応じて rebase が必要になる可能性があるため、実装時に #1396 の状態を確認すること。

    dependency ordering: 明示的な blocked-by 関係は設定しない(両 Issue とも独立に着手可能と判断)。

  3. squne121 commented on Jul 24, 2026

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    根本原因の特定自体は妥当です。現行の LP010 は、AC 抽出を - [ ] AC<N> 系の正規表現に依存し、AC・VC の抽出結果がともに空集合になると無条件に一致扱いします。そのため、* [ ] AC1 のような AC が並び、VC に AC 参照がない本文では偽陰性になります。

    また、実害の因果関係も成立しています。parent_replay_binding.py は信頼境界上、child 由来の findings と deterministic_checks を意図的に破棄し、親が取得した readiness / VC evidence だけで再裁定します。したがって、readiness artifact に LP010 が出なければ、正当な C5 blocker でも unbacked lane に入り、反復時には human escalation へ進みます。

    しかし、現在の Issue contract は特定 fixture の false negative を直すことはできても、「C5 との parity 回復」も、記載された実障害の閉塞も証明できません。主に以下が blocker です。


    P0-1. C5 と LP010 は、そもそも同じ述語を実装していない

    C5 は次の片方向判定です。

    defined AC ⊆ VC references
    

    実装上も missing_in_vc = ac_numbers - vc_ac_refs だけを検査し、VC に余分な AC 参照があっても PASS します。

    一方、LP010 は次の完全一致判定です。

    defined AC == VC references
    

    既存テストも、存在しない AC3 を VC が参照した場合に LP010 が FAIL する契約を固定しています。

    したがって、次の本文では恒久的に判定が分かれます。

    ## Acceptance Criteria
    - [ ] AC1: test
    

    Verification Commands

    # AC1
    $ true
    
    # AC999
    $ true
    </code></pre><pre><code>
    | Checker | 判定 |
    |---|---|
    | C5 | PASS |
    | LP010 | FAIL |
    
    これは実装バグではなく、現在の仕様差です。Issue #1704 の AC2 は「zero-marker fixture 1件で両方 FAIL」を確認するだけで、parity を証明していません。現在のタイトル、`goal_ref`、Outcome は過大主張です。
    
    修正方法は二択です。
    
    1. **C5 も変更対象に含め、余分な VC 参照を FAIL にして完全一致へ統一する**
    2. **Issue のタイトルと Outcome から parity を撤回し、「LP010 の zero-marker false negative 修正」に限定する**
    
    C5 を Out of Scope にしたまま「parity 回復」を受け入れることはできません。
    
    ---
    
    ## P0-2. AC3 は空集合だけを特判する表面的修正を許している
    
    現在の AC3 は、次のような修正でも通ります。
    
    ```python
    if not ac_numbers and not vc_numbers:
        return [LP010Error(...)]
    </code></pre><p>この修正では、次の混在ケースが残ります。</p><pre><code class="language-markdown">## Acceptance Criteria
    - [ ] AC1: first
    * [ ] AC2: second
    
    ## Verification Commands
    ```bash
    # AC1
    $ true
    </code></pre><pre><code>
    現行 LP010 の AC 抽出は AC1 だけを取得するため、AC 集合と VC 集合がともに `{AC1}` になり PASS します。C5 はセクション全体から AC1 と AC2 を拾うため FAIL します。
    
    さらに、「`*` bullet は C3 が別途検出する」という Issue 本文の説明も、混在ケースには成立しません。C3 は**有効なハイフン checkbox が1行以上存在するか**しか確認しておらず、全 AC 行が canonical かは検査していません。上記 fixture では C3 も PASS します。
    
    GFM の unordered-list marker は `-`、`+`、`*` の3種類で、marker 後には1〜4個の空白が許されます。Task-list marker は空白または `x` / `X` を角括弧内に持ちます。したがって、今回の問題は単なる `-` と `*` の一文字差ではなく、Markdown task-list 構文のモデル化不足です。:contentReference[oaicite:9]{index=9} :contentReference[oaicite:10]{index=10}
    
    最低でも、次を parameterized test として固定する必要があります。
    
    | AC記法 | 要求される抽出 |
    |---|---|
    | `- [ ] AC1` | AC1 |
    | `* [ ] AC1` | AC1 |
    | `+ [ ] AC1` | AC1 |
    | `- [x] AC1` | AC1 |
    | `* [X] AC1` | AC1 |
    | marker 後 1〜4 spaces | AC1 |
    | `-` と `*` の混在 | 全 AC |
    | `[foo] AC1` | AC として扱わない/syntax error |
    | fenced code 内の `- [ ] AC999` | AC として扱わない |
    
    `pytest.mark.parametrize` を使えば、この入力文法マトリクスを一つのテスト契約として管理できます。:contentReference[oaicite:11]{index=11}
    
    ---
    
    ## P0-3. C5 は parity の正解 oracle として安全ではない
    
    Issue 本文は「C5 は現状で正しく FAIL」としていますが、C5 の AC 抽出は次の実装です。
    
    ```python
    set(re.findall(r"AC(\d+)", ac_section))
    </code></pre><p>これは AC task-list item ではなく、<strong>Acceptance Criteria セクション内のすべての <code inline="">AC&lt;digits&gt;</code> 文字列</strong>を定義済み AC とみなします。</p><p>例えば次の本文では、実際に定義されているのは AC1 だけです。</p><pre><code class="language-markdown">- [ ] AC1: test_AC999_regression を追加する
    </code></pre><p>しかし C5 は AC1 と AC999 を抽出し、VC が AC1 だけを参照すると FAIL します。Python の <code inline="">re.findall</code> は対象文字列全体を走査します。(<a href="https://docs.python.org/3/library/re.html" title="re — Regular expression operations — Python 3.14.6 documentation">Python documentation</a>)</p><p>同様に、AC セクション内の fenced code、ファイル名、URL、説明文に含まれる <code inline="">AC999</code> も誤抽出されます。GFM の fenced code 内容はコードとして扱われるため、task-list item や AC 定義として解釈すべきではありません。(<a href="https://github.github.io/gfm/" title="GitHub Flavored Markdown Spec">GitHub Pages</a>)</p><p>したがって、正しい方針は LP010 を C5 の広い regex に寄せることではありません。</p><p><strong>AC 定義の canonical grammar を先に定義し、C5 と LP010 が同じ構造化 parser を使用する必要があります。</strong></p><hr><h2>P0-4. Section extraction の差異が残る</h2><p>LP010 側の <code inline="">_extract_section()</code> は、列頭から始まる厳密な次の見出しだけを認識します。</p><pre><code class="language-regex">^##\s+Acceptance\ Criteria\s*$
    </code></pre><p>0〜3 spaces の indent、末尾の closing <code inline="">#</code>、日英併記見出し、fence 内外の区別には対応していません。</p><p>一方、リポジトリにはすでに次を認識する GFM heading parser と heading inventory があります。</p><ul><li><p>0〜3 spaces の indent</p></li><li><p>1〜6個の <code inline="">#</code></p></li><li><p>optional closing sequence</p></li><li><p><code inline="">受け入れ条件 (Acceptance Criteria)</code> などの accepted forms</p></li><li><p><code inline="">検証コマンド (Verification Commands)</code> などの accepted forms</p></li></ul><p>GFM 自体も ATX heading の0〜3 spaces indent と optional closing <code inline="">#</code> を認めています。(<a href="https://github.github.io/gfm/" title="GitHub Flavored Markdown Spec">GitHub Pages</a>)</p><p>例えば次の本文では C5 と LP010 の section identity が分かれ得ます。</p><pre><code class="language-markdown">  ## Acceptance Criteria ##
    
    * [ ] AC1: test
    </code></pre><p>また、LP010 の単純な行走査は fenced code 内の <code inline="">## Acceptance Criteria</code> を実見出しとして誤認する余地があります。</p><p>AC parser だけ直しても section parser differential が残るため、一般的な parity は回復しません。既存の <code inline="">parse_atx_heading_line()</code> と <code inline="">HEADING_POLICY</code> を validator 側でも使用するか、共有 section parser を導入すべきです。</p><hr><h2>P0-5. 実害を閉じる integration test がスコープ外にされている</h2><p>Issue は Background で、次の実障害を修正理由にしています。</p><pre><code class="language-text">C5 blocker
      → LP010 evidence 不在
      → reviewer_claim_unbacked_by_deterministic_checker
      → reviewer_false_positive_suspected
      → human_escalation
    </code></pre><p>しかし Remaining Parent Gaps では、この経路が修正後に解消されるかを別 Issue に延期しています。</p><p>これは closure contract として不十分です。実際の artifact chain は次です。</p><pre><code class="language-text">Issue body
      → loop_body_lint/v1
      → ISSUE_CONTRACT_READINESS_RESULT_V1
      → PARENT_REPLAY_BINDING_ARTIFACT_V1
      → replay_result
    </code></pre><p><code inline="">contract_readiness_check.py</code> は validator の LP010 を <code inline="">source_check: validate_issue_body</code> の readiness error に変換します。</p><p>taxonomy は C5 / LP010 / <code inline="">vc_number_alignment</code> を同一 entry に束ねています。</p><p>LP010 evidence が親入力にあれば、現行 replay contract は次を返すべきです。</p><pre><code class="language-yaml">verdict_detail_v1: deterministic_fail_confirmed
    routing: proceed_to_rewrite
    should_consume_iteration: true
    consecutive_unbacked_count: 0
    </code></pre><p>したがって、少なくとも次の integration test が必要です。</p><ol><li><p>問題 fixture を <code inline="">validate_issue_body</code> に渡す</p></li><li><p><code inline="">contract_readiness_check</code> の結果に LP010 があることを確認する</p></li><li><p>同一 <code inline="">body_sha256</code> の <code inline="">REVIEWER_BLOCKER_CLAIM_V1</code> を parent replay に渡す</p></li><li><p><code inline="">deterministic_fail_confirmed / proceed_to_rewrite</code> を確認する</p></li><li><p>同一入力を反復しても <code inline="">reviewer_false_positive_suspected</code> にならないことを確認する</p></li></ol><p>production の <code inline="">parent_replay_binding.py</code> を変更する必要はありませんが、少なくとも issue-refinement-loop 側の test path は Allowed Paths に追加すべきです。</p><hr><h2>P0-6. Historical fixture の provenance が固定されていない</h2><p>Issue #1704 は、Issue #1415 の「該当時点の body」を回帰 fixture として使うとしています。しかし現在取得できる #1415 本文の AC はすでに <code inline="">- [ ]</code> 形式であり、<code inline="">* [ ]</code> だった historical state は live Issue から再構成できません。</p><p>テストが GitHub の live body を取得する構成であってはいけません。fixture には以下を固定してください。</p><pre><code class="language-yaml">source_issue: 1415
    source_observed_at: 2026-07-24T...
    source_body_sha256: sha256:...
    fixture_scope: minimal_reproduction | historical_snapshot
    </code></pre><p>実際の回帰テストは AC1・AC2 程度の最小 fixture を主とし、AC1〜AC15 の historical fixture は provenance 付きの補助 fixture とする方が診断性に優れます。</p><hr><h1>敵対的入力マトリクス</h1>
    入力 | 現行 LP010 | 現行 C5 | #1704 ACで検出
    -- | -- | -- | --
    全 AC が * [ ]、VC refs 0件 | PASS | FAIL | AC1で検出
    - [ ] AC1 と * [ ] AC2、VCはAC1のみ | PASS | FAIL | 未検出
    AC1のみ、VCがAC1とAC999を参照 | FAIL | PASS | 仕様矛盾
    AC1の説明文に test_AC999、VCはAC1のみ | PASS | FAIL | 未検出
    bilingual heading | section不在扱い | section抽出可能 | 未検出
    indented heading + closing # | section不在扱い | section抽出可能 | 未検出
    fenced code 内の AC checkbox | 誤抽出余地あり | 広域regexで抽出 | 未検出
    AC12 のような Unicode decimal digit | \d 使用箇所により受理 | 受理 | 未定義
    
    <p>Python の Unicode string regex における <code inline="">\d</code> は ASCII の <code inline="">[0-9]</code> だけでなく Unicode decimal digit に一致します。AC identifier を ASCII とするなら、共有 parser では <code inline="">[0-9]+</code> と明記すべきです。(<a href="https://docs.python.org/3/library/re.html" title="re — Regular expression operations — Python 3.14.6 documentation">Python documentation</a>)</p><hr><h1>関連 Issue / PR から得られる設計上の結論</h1><p>Issue #993 と PR #1002 は、C4/C5・LP010/LP011・preflight 間の VC grammar drift を共有 parser で解消する作業でした。</p><p>その PR でも、初期修正は edit-issue の回帰9件を発生させ、後続修正では diagnostic context の2048-byte制限違反が検出されています。また最終的に、一部 consumer 間には意図的な severity 差も残されました。これは今回も「1本の regex を直して selected tests を通す」だけでは不十分であることを示します。</p><p>Issue #1286 は C5 / LP010 の taxonomy parity を直接扱っており、#1704 の Dependencies / Related に追加すべきです。#1532 は parent-owned replay binding の信頼境界を説明する上で重要ですが、今回の blocker/evidence mapping の直接の先行 Issue は #1286 です。</p><p>#1396 と #30 については、現在のコメントどおり concern は別ですが、同じ validator/test path に触れるため merge 順序と rebase は必要です。これは仕様 blocker ではなく、実装時の競合リスクです。</p><hr><h1>推奨実装</h1><h2>推奨案A: 共有 AC parser を導入する</h2><p>VC grammar が <code inline="">vc_contract_syntax.py</code> に共有化されているのと同様、AC grammar も共有化します。</p><pre><code class="language-text">ac_contract_syntax.py
      ├─ section identity
      ├─ task-list item recognition
      ├─ AC identifier extraction
      ├─ syntax errors
      ├─ duplicate refs
      └─ line metadata
    </code></pre><p>返却値の例です。</p><pre><code class="language-python">@dataclass
    class AcParseResult:
        defined_refs: set[str]
        items: list[AcItem]
        errors: list[AcParseError]
        duplicate_refs: set[str]
    </code></pre><p>C5 と LP010 は同じ <code inline="">defined_refs</code> を使い、判定述語だけを明示します。</p><p>現行 LP010 の完全一致契約を維持するなら、C5 も次に変更するのが一貫しています。</p><pre><code class="language-python">missing_in_vc = ac_refs - vc_refs
    extra_in_vc = vc_refs - ac_refs
    
    fail = bool(missing_in_vc or extra_in_vc)
    </code></pre><p>C5 を coverage-only のまま維持するなら、チェック名と Issue Outcome に「両 checker の pass/fail parity」を記載してはいけません。</p><h2>推奨案B: 最小修正として Issue を狭める</h2><p>C5 を変更しない場合は、タイトルを次のように変更します。</p><blockquote><p>実装: LP010 の非ハイフン AC task-list 抽出漏れによる zero-marker 偽陰性を修正する</p></blockquote><p>この場合でも、最低限以下は必要です。</p><ul><li><p><code inline="">-</code> / <code inline="">*</code> / <code inline="">+</code> と混在 bullet の抽出</p></li><li><p>fenced code の除外</p></li><li><p>semantic expected/actual の診断</p></li><li><p>parent replay integration test</p></li><li><p>「C5 parity」は fixture-level assertion に限定し、一般的な Outcome から削除</p></li></ul><hr><h1>Acceptance Criteria 差し替え案</h1><pre><code class="language-markdown">- [ ] AC1: AC parser が `-` / `*` / `+` の task-list marker、
          `[ ]` / `[x]` / `[X]`、marker 後 1〜4 spaces を
          明示された grammar に従って抽出する。
    
    - [ ] AC2: `* [ ] AC1` 〜 `* [ ] AC15` が存在し、
          VC AC refs が空の fixture で LP010 が FAIL し、
          expected が AC1〜AC15、actual が空集合になる。
    
    - [ ] AC3: `- [ ] AC1` と `* [ ] AC2` が混在し、
          VC が AC1 のみを参照する fixture で LP010 が FAIL する。
    
    - [ ] AC4: AC item の説明文、URL、ファイル名、inline code、
          fenced code 内の `AC999` は定義済み AC として抽出されない。
    
    - [ ] AC5: 余分な VC ref の扱いを exact-equality または
          coverage-only のいずれかとして明文化し、
          C5 と LP010 の意図的差異または一致をテストで固定する。
    
    - [ ] AC6: canonical heading、0〜3 spaces indent、
          closing `#`、accepted bilingual heading に対する
          section identity が consumer 間で一致し、
          fenced code 内の見出しを無視する。
    
    - [ ] AC7: validator の LP010 error が
          ISSUE_CONTRACT_READINESS_RESULT_V1 に同一 body_sha256 で写像される。
    
    - [ ] AC8: parent replay integration で
          verdict_detail_v1=deterministic_fail_confirmed、
          routing=proceed_to_rewrite、
          consecutive_unbacked_count=0 になる。
    
    - [ ] AC9: historical #1415 fixture は本文をリポジトリ内に固定し、
          source issue、観測日時、body sha256 を記録する。
          テストは GitHub live body に依存しない。
    
    - [ ] AC10: LP010 error の rule_id、expected、actual、
           minimal_context、context_truncated を検証し、
           diagnostic context が 2048 bytes を超えない。
    
    - [ ] AC11: create-issue、edit-issue、review-issue、
           issue-contract-review、issue-refinement-loop の
           関連テストがすべて PASS する。
    </code></pre><hr><h1>Verification Commands 差し替え案</h1><pre><code class="language-bash"># AC parser / alignment matrix
    $ uv run --locked pytest \
        .claude/skills/create-issue/scripts/tests/test_ac_contract_syntax.py \
        .claude/skills/review-issue/tests/test_ac_vc_alignment_parity.py \
        -q
    
    # Validator → readiness mapping
    $ uv run --locked pytest \
        .claude/skills/issue-contract-review/scripts/tests/test_contract_readiness.py \
        -q -k "lp010 or ac_vc"
    
    # Parent-owned replay route
    $ uv run --locked pytest \
        .claude/skills/issue-refinement-loop/tests/test_parent_replay_binding.py \
        -q -k "lp010 or ac_vc_number_mismatch"
    
    # Transitive consumer regression
    $ uv run --locked pytest \
        .claude/skills/create-issue/tests/ \
        .claude/skills/create-issue/scripts/tests/ \
        .claude/skills/edit-issue/tests/ \
        .claude/skills/review-issue/tests/ \
        .claude/skills/issue-contract-review/scripts/tests/ \
        .claude/skills/issue-refinement-loop/tests/ \
        -q
    </code></pre><p>このリポジトリでは Python 3.12 以上、pytest 8 以上、uv 0.11.29 が固定され、CI の Python test plan にはこれらの consumer directory が含まれています。</p><p><code inline="">uv run --locked</code> は lockfile が欠落・陳腐化している場合に更新せず失敗させるため、再現性を要求する Verification Command として適切です。(<a href="https://docs.astral.sh/uv/reference/cli/?utm_source=chatgpt.com" title="Commands | uv">Astral Docs</a>)</p><hr><h1>承認可能になる条件</h1><p>次のどちらかが必要です。</p><p><strong>完全修正ルート</strong></p><ul><li><p>C5 をスコープに含める</p></li><li><p>AC parser と section parser を共有する</p></li><li><p>exact equality / coverage の意味を統一する</p></li><li><p>parent replay integration test を追加する</p></li></ul><p><strong>限定修正ルート</strong></p><ul><li><p>タイトル、<code inline="">goal_ref</code>、Outcome から一般的な「C5 parity」を削除する</p></li><li><p>zero-marker false negative 修正であることを明記する</p></li><li><p>mixed-bullet fixture と parent replay integration test を追加する</p></li><li><p>C5 の広域 regex と extra-ref semantics は明示的な Remaining Gap とし、実 Issue 番号を付ける</p></li></ul><p>現状のままでは、AC1〜AC4 をすべて満たしても、混在 bullet の偽陰性、extra VC ref の判定差、section parser differential、C5 の incidental-token 偽陽性、parent replay の artifact chain 未検証が残ります。</p><p>本レビューは、2026年7月25日時点で取得した GitHub 上の Issue、PR、コメント、<code inline="">main</code> のリポジトリ資産と公式仕様の静的照合に基づきます。ローカルでの pytest 実行は行っていません。</p></body></html><!--EndFragment-->
    </body>
    </html># 判定: **REQUEST_CHANGES**
    
    根本原因の特定自体は妥当です。現行の LP010 は、AC 抽出を `- [ ] AC<N>` 系の正規表現に依存し、AC・VC の抽出結果がともに空集合になると無条件に一致扱いします。そのため、`* [ ] AC1` のような AC が並び、VC に AC 参照がない本文では偽陰性になります。
    
    また、実害の因果関係も成立しています。`parent_replay_binding.py` は信頼境界上、child 由来の `findings` と `deterministic_checks` を意図的に破棄し、親が取得した readiness / VC evidence だけで再裁定します。したがって、readiness artifact に LP010 が出なければ、正当な C5 blocker でも unbacked lane に入り、反復時には human escalation へ進みます。
    
    しかし、現在の Issue contract は**特定 fixture の false negative を直すことはできても、「C5 との parity 回復」も、記載された実障害の閉塞も証明できません**。主に以下が blocker です。
    
    ---
    
    ## P0-1. C5 と LP010 は、そもそも同じ述語を実装していない
    
    C5 は次の片方向判定です。
    
    ```text
    defined AC ⊆ VC references
    

    実装上も missing_in_vc = ac_numbers - vc_ac_refs だけを検査し、VC に余分な AC 参照があっても PASS します。

    一方、LP010 は次の完全一致判定です。

    defined AC == VC references
    

    既存テストも、存在しない AC3 を VC が参照した場合に LP010 が FAIL する契約を固定しています。

    したがって、次の本文では恒久的に判定が分かれます。

    ## Acceptance Criteria
    - [ ] AC1: test
    
    ## Verification Commands
    ```bash
    # AC1
    $ true
    
    # AC999
    $ true
    
    
    | Checker | 判定 |
    |---|---|
    | C5 | PASS |
    | LP010 | FAIL |
    
    これは実装バグではなく、現在の仕様差です。Issue #1704 の AC2 は「zero-marker fixture 1件で両方 FAIL」を確認するだけで、parity を証明していません。現在のタイトル、`goal_ref`、Outcome は過大主張です。
    
    修正方法は二択です。
    
    1. **C5 も変更対象に含め、余分な VC 参照を FAIL にして完全一致へ統一する**
    2. **Issue のタイトルと Outcome から parity を撤回し、「LP010 の zero-marker false negative 修正」に限定する**
    
    C5 を Out of Scope にしたまま「parity 回復」を受け入れることはできません。
    
    ---
    
    ## P0-2. AC3 は空集合だけを特判する表面的修正を許している
    
    現在の AC3 は、次のような修正でも通ります。
    
    ```python
    if not ac_numbers and not vc_numbers:
        return [LP010Error(...)]
    

    この修正では、次の混在ケースが残ります。

    ## Acceptance Criteria
    - [ ] AC1: first
    * [ ] AC2: second
    
    ## Verification Commands
    ```bash
    # AC1
    $ true
    
    
    現行 LP010 の AC 抽出は AC1 だけを取得するため、AC 集合と VC 集合がともに `{AC1}` になり PASS します。C5 はセクション全体から AC1 と AC2 を拾うため FAIL します。
    
    さらに、「`*` bullet は C3 が別途検出する」という Issue 本文の説明も、混在ケースには成立しません。C3 は**有効なハイフン checkbox が1行以上存在するか**しか確認しておらず、全 AC 行が canonical かは検査していません。上記 fixture では C3 も PASS します。
    
    GFM の unordered-list marker は `-`、`+`、`*` の3種類で、marker 後には1〜4個の空白が許されます。Task-list marker は空白または `x` / `X` を角括弧内に持ちます。したがって、今回の問題は単なる `-` と `*` の一文字差ではなく、Markdown task-list 構文のモデル化不足です。:contentReference[oaicite:9]{index=9} :contentReference[oaicite:10]{index=10}
    
    最低でも、次を parameterized test として固定する必要があります。
    
    | AC記法 | 要求される抽出 |
    |---|---|
    | `- [ ] AC1` | AC1 |
    | `* [ ] AC1` | AC1 |
    | `+ [ ] AC1` | AC1 |
    | `- [x] AC1` | AC1 |
    | `* [X] AC1` | AC1 |
    | marker 後 1〜4 spaces | AC1 |
    | `-` と `*` の混在 | 全 AC |
    | `[foo] AC1` | AC として扱わない/syntax error |
    | fenced code 内の `- [ ] AC999` | AC として扱わない |
    
    `pytest.mark.parametrize` を使えば、この入力文法マトリクスを一つのテスト契約として管理できます。:contentReference[oaicite:11]{index=11}
    
    ---
    
    ## P0-3. C5 は parity の正解 oracle として安全ではない
    
    Issue 本文は「C5 は現状で正しく FAIL」としていますが、C5 の AC 抽出は次の実装です。
    
    ```python
    set(re.findall(r"AC(\d+)", ac_section))
    

    これは AC task-list item ではなく、Acceptance Criteria セクション内のすべての AC<digits> 文字列を定義済み AC とみなします。

    例えば次の本文では、実際に定義されているのは AC1 だけです。

    - [ ] AC1: test_AC999_regression を追加する
    

    しかし C5 は AC1 と AC999 を抽出し、VC が AC1 だけを参照すると FAIL します。Python の re.findall は対象文字列全体を走査します。([Python documentation]1)

    同様に、AC セクション内の fenced code、ファイル名、URL、説明文に含まれる AC999 も誤抽出されます。GFM の fenced code 内容はコードとして扱われるため、task-list item や AC 定義として解釈すべきではありません。([GitHub Pages]2)

    したがって、正しい方針は LP010 を C5 の広い regex に寄せることではありません。

    AC 定義の canonical grammar を先に定義し、C5 と LP010 が同じ構造化 parser を使用する必要があります。


    P0-4. Section extraction の差異が残る

    LP010 側の _extract_section() は、列頭から始まる厳密な次の見出しだけを認識します。

    ^##\s+Acceptance\ Criteria\s*$
    

    0〜3 spaces の indent、末尾の closing #、日英併記見出し、fence 内外の区別には対応していません。

    一方、リポジトリにはすでに次を認識する GFM heading parser と heading inventory があります。

    • 0〜3 spaces の indent

    • 1〜6個の #

    • optional closing sequence

    • 受け入れ条件 (Acceptance Criteria) などの accepted forms

    • 検証コマンド (Verification Commands) などの accepted forms

    GFM 自体も ATX heading の0〜3 spaces indent と optional closing # を認めています。([GitHub Pages]2)

    例えば次の本文では C5 と LP010 の section identity が分かれ得ます。

      ## Acceptance Criteria ##
    
    * [ ] AC1: test
    

    また、LP010 の単純な行走査は fenced code 内の ## Acceptance Criteria を実見出しとして誤認する余地があります。

    AC parser だけ直しても section parser differential が残るため、一般的な parity は回復しません。既存の parse_atx_heading_line() と HEADING_POLICY を validator 側でも使用するか、共有 section parser を導入すべきです。


    P0-5. 実害を閉じる integration test がスコープ外にされている

    Issue は Background で、次の実障害を修正理由にしています。

    C5 blocker
      → LP010 evidence 不在
      → reviewer_claim_unbacked_by_deterministic_checker
      → reviewer_false_positive_suspected
      → human_escalation
    

    しかし Remaining Parent Gaps では、この経路が修正後に解消されるかを別 Issue に延期しています。

    これは closure contract として不十分です。実際の artifact chain は次です。

    Issue body
      → loop_body_lint/v1
      → ISSUE_CONTRACT_READINESS_RESULT_V1
      → PARENT_REPLAY_BINDING_ARTIFACT_V1
      → replay_result
    

    contract_readiness_check.py は validator の LP010 を source_check: validate_issue_body の readiness error に変換します。

    taxonomy は C5 / LP010 / vc_number_alignment を同一 entry に束ねています。

    LP010 evidence が親入力にあれば、現行 replay contract は次を返すべきです。

    verdict_detail_v1: deterministic_fail_confirmed
    routing: proceed_to_rewrite
    should_consume_iteration: true
    consecutive_unbacked_count: 0
    

    したがって、少なくとも次の integration test が必要です。

    1. 問題 fixture を validate_issue_body に渡す
    2. contract_readiness_check の結果に LP010 があることを確認する
    3. 同一 body_sha256 の REVIEWER_BLOCKER_CLAIM_V1 を parent replay に渡す
    4. deterministic_fail_confirmed / proceed_to_rewrite を確認する
    5. 同一入力を反復しても reviewer_false_positive_suspected にならないことを確認する

    production の parent_replay_binding.py を変更する必要はありませんが、少なくとも issue-refinement-loop 側の test path は Allowed Paths に追加すべきです。


    P0-6. Historical fixture の provenance が固定されていない

    Issue #1704 は、Issue #1415 の「該当時点の body」を回帰 fixture として使うとしています。しかし現在取得できる #1415 本文の AC はすでに - [ ] 形式であり、* [ ] だった historical state は live Issue から再構成できません。

    テストが GitHub の live body を取得する構成であってはいけません。fixture には以下を固定してください。

    source_issue: 1415
    source_observed_at: 2026-07-24T...
    source_body_sha256: sha256:...
    fixture_scope: minimal_reproduction | historical_snapshot
    

    実際の回帰テストは AC1・AC2 程度の最小 fixture を主とし、AC1〜AC15 の historical fixture は provenance 付きの補助 fixture とする方が診断性に優れます。


    敵対的入力マトリクス

    入力 現行 LP010 現行 C5 #1704 ACで検出
    全 AC が * [ ]、VC refs 0件 PASS FAIL AC1で検出
    - [ ] AC1 と * [ ] AC2、VCはAC1のみ PASS FAIL 未検出
    AC1のみ、VCがAC1とAC999を参照 FAIL PASS 仕様矛盾
    AC1の説明文に test_AC999、VCはAC1のみ PASS FAIL 未検出
    bilingual heading section不在扱い section抽出可能 未検出
    indented heading + closing # section不在扱い section抽出可能 未検出
    fenced code 内の AC checkbox 誤抽出余地あり 広域regexで抽出 未検出
    AC12 のような Unicode decimal digit \d 使用箇所により受理 受理 未定義

    Python の Unicode string regex における \d は ASCII の [0-9] だけでなく Unicode decimal digit に一致します。AC identifier を ASCII とするなら、共有 parser では [0-9]+ と明記すべきです。([Python documentation]1)


    関連 Issue / PR から得られる設計上の結論

    Issue #993 と PR #1002 は、C4/C5・LP010/LP011・preflight 間の VC grammar drift を共有 parser で解消する作業でした。

    その PR でも、初期修正は edit-issue の回帰9件を発生させ、後続修正では diagnostic context の2048-byte制限違反が検出されています。また最終的に、一部 consumer 間には意図的な severity 差も残されました。これは今回も「1本の regex を直して selected tests を通す」だけでは不十分であることを示します。

    Issue #1286 は C5 / LP010 の taxonomy parity を直接扱っており、#1704 の Dependencies / Related に追加すべきです。#1532 は parent-owned replay binding の信頼境界を説明する上で重要ですが、今回の blocker/evidence mapping の直接の先行 Issue は #1286 です。

    #1396 と #30 については、現在のコメントどおり concern は別ですが、同じ validator/test path に触れるため merge 順序と rebase は必要です。これは仕様 blocker ではなく、実装時の競合リスクです。


    推奨実装

    推奨案A: 共有 AC parser を導入する

    VC grammar が vc_contract_syntax.py に共有化されているのと同様、AC grammar も共有化します。

    ac_contract_syntax.py
      ├─ section identity
      ├─ task-list item recognition
      ├─ AC identifier extraction
      ├─ syntax errors
      ├─ duplicate refs
      └─ line metadata
    

    返却値の例です。

    @dataclass
    class AcParseResult:
        defined_refs: set[str]
        items: list[AcItem]
        errors: list[AcParseError]
        duplicate_refs: set[str]
    

    C5 と LP010 は同じ defined_refs を使い、判定述語だけを明示します。

    現行 LP010 の完全一致契約を維持するなら、C5 も次に変更するのが一貫しています。

    missing_in_vc = ac_refs - vc_refs
    extra_in_vc = vc_refs - ac_refs
    
    fail = bool(missing_in_vc or extra_in_vc)
    

    C5 を coverage-only のまま維持するなら、チェック名と Issue Outcome に「両 checker の pass/fail parity」を記載してはいけません。

    推奨案B: 最小修正として Issue を狭める

    C5 を変更しない場合は、タイトルを次のように変更します。

    実装: LP010 の非ハイフン AC task-list 抽出漏れによる zero-marker 偽陰性を修正する

    この場合でも、最低限以下は必要です。

    • - / * / + と混在 bullet の抽出
    • fenced code の除外
    • semantic expected/actual の診断
    • parent replay integration test
    • 「C5 parity」は fixture-level assertion に限定し、一般的な Outcome から削除

    Acceptance Criteria 差し替え案

    - [ ] AC1: AC parser が `-` / `*` / `+` の task-list marker、
          `[ ]` / `[x]` / `[X]`、marker 後 1〜4 spaces を
          明示された grammar に従って抽出する。
    
    - [ ] AC2: `* [ ] AC1` 〜 `* [ ] AC15` が存在し、
          VC AC refs が空の fixture で LP010 が FAIL し、
          expected が AC1〜AC15、actual が空集合になる。
    
    - [ ] AC3: `- [ ] AC1` と `* [ ] AC2` が混在し、
          VC が AC1 のみを参照する fixture で LP010 が FAIL する。
    
    - [ ] AC4: AC item の説明文、URL、ファイル名、inline code、
          fenced code 内の `AC999` は定義済み AC として抽出されない。
    
    - [ ] AC5: 余分な VC ref の扱いを exact-equality または
          coverage-only のいずれかとして明文化し、
          C5 と LP010 の意図的差異または一致をテストで固定する。
    
    - [ ] AC6: canonical heading、0〜3 spaces indent、
          closing `#`、accepted bilingual heading に対する
          section identity が consumer 間で一致し、
          fenced code 内の見出しを無視する。
    
    - [ ] AC7: validator の LP010 error が
          ISSUE_CONTRACT_READINESS_RESULT_V1 に同一 body_sha256 で写像される。
    
    - [ ] AC8: parent replay integration で
          verdict_detail_v1=deterministic_fail_confirmed、
          routing=proceed_to_rewrite、
          consecutive_unbacked_count=0 になる。
    
    - [ ] AC9: historical #1415 fixture は本文をリポジトリ内に固定し、
          source issue、観測日時、body sha256 を記録する。
          テストは GitHub live body に依存しない。
    
    - [ ] AC10: LP010 error の rule_id、expected、actual、
           minimal_context、context_truncated を検証し、
           diagnostic context が 2048 bytes を超えない。
    
    - [ ] AC11: create-issue、edit-issue、review-issue、
           issue-contract-review、issue-refinement-loop の
           関連テストがすべて PASS する。
    

    Verification Commands 差し替え案

    # AC parser / alignment matrix
    $ uv run --locked pytest \
        .claude/skills/create-issue/scripts/tests/test_ac_contract_syntax.py \
        .claude/skills/review-issue/tests/test_ac_vc_alignment_parity.py \
        -q
    
    # Validator → readiness mapping
    $ uv run --locked pytest \
        .claude/skills/issue-contract-review/scripts/tests/test_contract_readiness.py \
        -q -k "lp010 or ac_vc"
    
    # Parent-owned replay route
    $ uv run --locked pytest \
        .claude/skills/issue-refinement-loop/tests/test_parent_replay_binding.py \
        -q -k "lp010 or ac_vc_number_mismatch"
    
    # Transitive consumer regression
    $ uv run --locked pytest \
        .claude/skills/create-issue/tests/ \
        .claude/skills/create-issue/scripts/tests/ \
        .claude/skills/edit-issue/tests/ \
        .claude/skills/review-issue/tests/ \
        .claude/skills/issue-contract-review/scripts/tests/ \
        .claude/skills/issue-refinement-loop/tests/ \
        -q
    

    このリポジトリでは Python 3.12 以上、pytest 8 以上、uv 0.11.29 が固定され、CI の Python test plan にはこれらの consumer directory が含まれています。

    uv run --locked は lockfile が欠落・陳腐化している場合に更新せず失敗させるため、再現性を要求する Verification Command として適切です。([Astral Docs]3)


    承認可能になる条件

    次のどちらかが必要です。

    完全修正ルート

    • C5 をスコープに含める
    • AC parser と section parser を共有する
    • exact equality / coverage の意味を統一する
    • parent replay integration test を追加する

    限定修正ルート

    • タイトル、goal_ref、Outcome から一般的な「C5 parity」を削除する
    • zero-marker false negative 修正であることを明記する
    • mixed-bullet fixture と parent replay integration test を追加する
    • C5 の広域 regex と extra-ref semantics は明示的な Remaining Gap とし、実 Issue 番号を付ける

    現状のままでは、AC1〜AC4 をすべて満たしても、混在 bullet の偽陰性、extra VC ref の判定差、section parser differential、C5 の incidental-token 偽陽性、parent replay の artifact chain 未検証が残ります。

    本レビューは、2026年7月25日時点で取得した GitHub 上の Issue、PR、コメント、main のリポジトリ資産と公式仕様の静的照合に基づきます。ローカルでの pytest 実行は行っていません。

  4. changed the title [-]実装: validate_issue_body.py の LP010 が AC/VC 番号不一致(VC 内 AC マーカー皆無ケース)を検出できない偽陰性を修正し C5 との parity を回復する[/-] [+]実装: validate_issue_body.py の LP010 が AC/VC 番号不一致(VC 内 AC マーカー皆無・AC bullet 混在ケース)を検出できない偽陰性を修正する[/+] on Jul 24, 2026
  5. squne121 commented on Jul 24, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: ''
        generated_at: '2026-07-24T19:50:52Z'
        body_sha256: sha256:e66a627de4f81d12ecf2ae8e37b7d6dc261871ef6caf4e6ffba6071b80ece07c
      metadata:
        title_prefix_ready: true
        phase_label_ready: true
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: '2026-07-24T19:50:52Z'
      checked_body_sha256: sha256:e66a627de4f81d12ecf2ae8e37b7d6dc261871ef6caf4e6ffba6071b80ece07c
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []
  6. squne121 commented on Jul 24, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

    LOOP_HANDOFF_RESULT_V1:
      status: impl_ready
      routing_action: run_impl_review_loop
      contract_review:
        status: go
        gate_result: fresh_go
        latest_comment_url: ''
        generated_at: '2026-07-24T19:50:52Z'
        body_sha256: sha256:e66a627de4f81d12ecf2ae8e37b7d6dc261871ef6caf4e6ffba6071b80ece07c
      metadata:
        title_prefix_ready: true
        phase_label_ready: true
      auto_fixes:
        result: auto_fixed
        required: []
        skipped: []
      blockers: []
      permissions:
        unavailable: []
      generated_at: '2026-07-24T19:50:52Z'
      checked_body_sha256: sha256:e66a627de4f81d12ecf2ae8e37b7d6dc261871ef6caf4e6ffba6071b80ece07c
      checker_exit_code: 0
      missing_sections: []
      missing_contract_keys: []
  7. squne121 commented on Jul 25, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-25T00:18:27Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1704
      body_sha256: "sha256:e66a627de4f81d12ecf2ae8e37b7d6dc261871ef6caf4e6ffba6071b80ece07c"
      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:e66a627de4f81d12ecf2ae8e37b7d6dc261871ef6caf4e6ffba6071b80ece07c","source_provenance":{"source_type":"github_api","body_file":null}}
        vc_preflight:
          decision: pass
          classifications: [{"ac":"AC1","line":1,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_extract_ac_numbers_recognizes_mixed_markers","command_hash":"sha256:98abe36ce5e759fc1eb7a189367f20c3aba70644b9c77a3b4909aa40fe4b755e","execution_key_hash":"sha256:4e991ea1e9e690579b5b3231e73fec1177207568ecf7599c5846367b9cf221cd","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","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 0 items","============================ no tests ran in 0.00s ============================="],"stdout_truncated":false,"stdout_original_line_count":9,"stderr_head":["ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":200,"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":2,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_fails_when_all_asterisk_bullet_and_vc_has_zero_ac_markers","command_hash":"sha256:9527c42a6fafaa649046b08cd52e55c0012c708130873c3fcd503db8bcf76b8b","execution_key_hash":"sha256:9ecacb897d19e43588e37b0597e0cb73e24409c27978e7db49672110cf197c15","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","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 0 items","============================ no tests ran in 0.00s ============================="],"stdout_truncated":false,"stdout_original_line_count":9,"stderr_head":["ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":158,"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":3,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_fails_on_mixed_hyphen_asterisk_bullet","command_hash":"sha256:79e680e6386911fa9befb9473f6bd5d82ed7a0c12553b2525a3ad93b7de3ba41","execution_key_hash":"sha256:da1bdfab9396ba4690a5028fdac25a0f7c608054e3d0e8e5408d79e4bbaef1f0","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","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 0 items","============================ no tests ran in 0.00s ============================="],"stdout_truncated":false,"stdout_original_line_count":9,"stderr_head":["ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":156,"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":4,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_lp010_does_not_extract_ac_number_from_prose_or_code","command_hash":"sha256:7bf46f983faf2d36823d9a9117a233048f36210c322e2addcfb7104e657b8762","execution_key_hash":"sha256:c91f9f6ef326325e3de86113921610ebc184a5c4d43a65bb8a4a013bb50c1452","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","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 0 items","============================ no tests ran in 0.00s ============================="],"stdout_truncated":false,"stdout_original_line_count":9,"stderr_head":["ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":172,"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":5,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_c5_lp010_fixture_level_agreement_on_zero_marker_fixture","command_hash":"sha256:76d6b6443cc405f4e673e2d79c24c8ee0b9e0e350d54df0cae1cb124f0df2be6","execution_key_hash":"sha256:e06bf17913eedea20c21f45a7141a9b6b097d36d2ad119936e167c72d45e4b7c","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","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 0 items","============================ no tests ran in 0.00s ============================="],"stdout_truncated":false,"stdout_original_line_count":9,"stderr_head":["ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":184,"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":6,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_validate_issue_body.py .claude/skills/create-issue/scripts/tests/test_validate_issue_body_mrc_shared.py .claude/skills/review-issue/tests/test_vc_grammar_parity.py","command_hash":"sha256:877f754a466360e2fe1ced9f6a07c8441273bf1c0594e8727e49138c6c578ebc","execution_key_hash":"sha256:ea9424e5127a766a1a9c0508e282d4bbfec45015db104182b7acc52d8d6d2f95","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 94 items",".claude/skills/create-issue/scripts/tests/test_validate_issue_body.py .. [  2%]","...........................................................              [ 64%]",".claude/skills/create-issue/scripts/tests/test_validate_issue_body_mrc_shared.py . [ 65%]","...                                                                      [ 69%]",".claude/skills/review-issue/tests/test_vc_grammar_parity.py ............ [ 81%]",".................                                                        [100%]","============================== 94 passed in 1.81s =============================="],"stdout_truncated":false,"stdout_original_line_count":16,"stderr_head":[],"stderr_truncated":false,"stderr_original_line_count":1,"runner_env_delta":{},"duration_ms":1979,"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":7,"raw_command":"uv run --locked pytest .claude/skills/issue-refinement-loop/tests/test_parent_replay_lp010_deterministic_fail.py -k test_lp010_error_drives_deterministic_fail_confirmed","command_hash":"sha256:4faa75e2db304fc977e2d4777fb545940edcc485eb782ce740d70e751107ace2","execution_key_hash":"sha256:32da32b9be7389e50479d63ecfd294601dbccb8acb4daeafa0bf5a5261d1cf6e","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","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 0 items","============================ no tests ran in 0.00s ============================="],"stdout_truncated":false,"stdout_original_line_count":9,"stderr_head":["ERROR: file or directory not found: .claude/skills/issue-refinement-loop/tests/test_parent_replay_lp010_deterministic_fail.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":167,"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":8,"raw_command":"uv run --locked pytest .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py -k test_issue_1415_historical_fixture_is_repo_pinned","command_hash":"sha256:bd9d23e44e91e49298b62ccdd45c2614db9b331905c0a938d28b50d32b3f10f0","execution_key_hash":"sha256:b5efa129b9f1f5903b3b9114ce5c07bc2133ce7e2c842185ca4439b2c880d0cb","runner":"exec","exit_code":4,"classification":"expected_fail","category":"expected_baseline_fail","decision":"go","scope_class":"baseline_fail_expected","confidence":"high","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 0 items","============================ no tests ran in 0.00s ============================="],"stdout_truncated":false,"stdout_original_line_count":9,"stderr_head":["ERROR: file or directory not found: .claude/skills/create-issue/scripts/tests/test_lp010_ac_extraction_regression.py"],"stderr_truncated":false,"stderr_original_line_count":3,"runner_env_delta":{},"duration_ms":161,"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
      expected_contract_fingerprint: {"issue_number":1704,"contract_source_kind":"issue_comment","contract_source_id":"5075787328","contract_body_sha256":"sha256:e66a627de4f81d12ecf2ae8e37b7d6dc261871ef6caf4e6ffba6071b80ece07c","allowed_paths_normalized_sha256":"f965f940ff7f6d1eb225b958059186d1915947727dc21ee687bb4ed9f23e46f0","base_ref":"main","base_sha_at_snapshot":"65d44f570a6fffb10c5bc6a64ee1ed19b2a7646f"}
  8. squne121 commented on Jul 25, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-07-25T00:41:01Z)

    • PR: fix: validate_issue_body.py の LP010 が AC/VC 番号不一致を検出できない偽陰性を修正する #1717
    • Worktree: .claude/worktrees/issue-1704-validate-issue-body-py-lp010-ac-vc-vc-ac
    • Branch: worktree-issue-1704-validate-issue-body-py-lp010-ac-vc-vc-ac
    • Verification: 8/8 AC VC PASS(AC1-AC5, AC7, AC8 新規テスト、AC6 既存94件回帰)
    • 標準4コマンド(pnpm typecheck/lint/test/build)も PASS
    • Overlap preflight: route=proceed_with_collision_evidence(C1、drift なし、PR body に証跡記載)
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
  9. added 2 commits that reference this issue on Jul 25, 2026
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/implementation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions