Skip to content

実装: reviewer_claim_replay.py に VCP_BROAD_SEARCH_PATH_UN taxonomy mapping を追加する #1406

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "reviewer_claim_replay.py の REVIEWER_CHECKER_TAXONOMY_V1 に VCP_BROAD_SEARCH_PATH_UN エントリを追加し、broad-path blocker を deterministic_fail_confirmed へルーティングできるようにする"
change_kind: code

Parent Issue

none

Parent Goal Ref

  • Goal: なし(単独改善)
  • Desired Destination: なし(単独改善)

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本 Issue は .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py の REVIEWER_CHECKER_TAXONOMY_V1 dict への静的エントリ追加と、.claude/skills/issue-contract-review/scripts/contract_readiness_check.py の _PREFLIGHT_CATEGORY_TO_READINESS mapping への静的エントリ追加であり、プロセス起動・外部通信・I/O を伴わない。全 AC は pytest によるユニットテスト(静的検証)のみで完結する。

Current Validated Scope

  • .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py の REVIEWER_CHECKER_TAXONOMY_V1 に entry_id == "broad_search_path_unbounded" の新エントリを追加する
  • _build_taxonomy_lookup() のキー衝突検出・analyze() の deterministic 判定ロジックへの回帰がないことを確認する
  • reviewer_claim_replay.py の direct evidence(_matching_vc_preflight())と readiness evidence(_matching_readiness_errors())の両経路について、broad-path entry のみ producer shape の厳密検証(spoof 耐性)を追加する(PR feat: reviewer_claim_replay.py に VCP_BROAD_SEARCH_PATH_UN taxonomy mapping を追加する #1412 レビュー Blocker 1 / High)
  • .claude/skills/issue-contract-review/scripts/contract_readiness_check.py の _PREFLIGHT_CATEGORY_TO_READINESS に broad_search_path_unbounded: needs_fix エントリを追加し、readiness 経路の producer/consumer 不整合を解消する(PR feat: reviewer_claim_replay.py に VCP_BROAD_SEARCH_PATH_UN taxonomy mapping を追加する #1412 レビュー Blocker 2)
  • 対応するテスト(.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay.py、.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py、.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py、新規 .claude/skills/issue-contract-review/tests/test_contract_readiness_check_broad_search_path.py)に回帰・新規テストを追加する

Remaining Parent Gaps

なし

Outcome

.claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py の REVIEWER_CHECKER_TAXONOMY_V1(exact mapping テーブル)に entry_id == "broad_search_path_unbounded" のエントリが追加され、reviewer が Verification Commands の rg broad search path を指摘する blocker(readiness_rule_ids: ["VCP_BROAD_SEARCH_PATH_UN"] / readiness_categories: ["broad_search_path_unbounded"])が checker_gap ではなく deterministic_fail_confirmed として判定される状態になっていること。加えて、readiness 経路(contract_readiness_check.py)と direct evidence 経路(reviewer_claim_replay.py)の両方が、実際の baseline_vc_preflight.py producer 出力形状(classification=blocked / scope_class=baseline_fail_expected 等)とのみ整合する形で deterministic backed になり、改ざん・破損・手書きの疑似 artifact では deterministic_fail_confirmed に到達しない(spoof 耐性を持つ)こと。対応するテストが追加され PASS していること。

In Scope

  • .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py の REVIEWER_CHECKER_TAXONOMY_V1 リストに entry_id == "broad_search_path_unbounded" の新エントリを追加する(entry_id, reviewer_codes, deterministic_checks, readiness_rule_ids, readiness_rule_id_source_check, readiness_categories, readiness_category_source_check, domain_keys の各キーを既存エントリと同じ構造で埋める)
    • entry_id は taxonomy 内で新エントリを一意に識別するキーであり、値は "broad_search_path_unbounded" とする
    • readiness_rule_ids には contract_readiness_check.py が baseline_vc_preflight.py の broad_search_path_unbounded カテゴリから生成する rule_id 文字列 "VCP_BROAD_SEARCH_PATH_UN"(f"VCP_{category.upper()[:20]}" の truncation 結果、.claude/skills/issue-contract-review/scripts/contract_readiness_check.py:468 付近を参照)を設定し、readiness_rule_id_source_check にその rule_id を生成する検証元("baseline_vc_preflight")を設定する
    • readiness_categories には "broad_search_path_unbounded" を設定し、readiness_category_source_check にそのカテゴリを判定する検証元("baseline_vc_preflight")を設定する
    • deterministic_checks は空リスト([])とする
    • reviewer_codes には reviewer が実際に emit しうる表記(vcp_broad_search_path_un / VCP_BROAD_SEARCH_PATH_UN / broad_search_path_unbounded)を、既存エントリの命名規則に合わせて列挙し、すべて broad_search_path_unbounded に normalize されることを確認する
  • 新エントリが既存エントリの reviewer_codes / deterministic_checks / domain_keys とキー衝突しないことを確認する(_build_taxonomy_lookup() の collision 検出が例外を出さないこと)
  • direct evidence 経路の spoof 耐性(PR feat: reviewer_claim_replay.py に VCP_BROAD_SEARCH_PATH_UN taxonomy mapping を追加する #1412 レビュー Blocker 1): _matching_vc_preflight() は、kind == "broad_search_path_unbounded" の場合に限り、vc_preflight_result の top-level schema == "baseline_vc_preflight/v1" を要求し、不一致時は input_or_runtime_error として fail-closed(ValueError を raise)する。加えて item 単位で classification == "blocked" / category == "broad_search_path_unbounded" / decision == "blocked" / scope_class == "baseline_fail_expected" の全一致を要求し、いずれか不一致の item は evidence として採用しない(unexpected_pass の既存 strict 分岐と同じパターンをこの entry にも適用する)。他 entry の挙動・既存テストは変更しない。
  • readiness 経路の producer/consumer 整合(PR feat: reviewer_claim_replay.py に VCP_BROAD_SEARCH_PATH_UN taxonomy mapping を追加する #1412 レビュー Blocker 2): .claude/skills/issue-contract-review/scripts/contract_readiness_check.py の _PREFLIGHT_CATEGORY_TO_READINESS に "broad_search_path_unbounded": "needs_fix" を追加する。これにより実際の broad-path readiness result が human_judgment ではなく needs_fix として正しく分類され、map_preflight_result_to_errors() が生成する error の source_payload(classification/category/decision/scope_class を含む)を通じて producer/consumer 間の意味論が一致する。
  • readiness 経路の rule_id truncation 衝突対策(PR feat: reviewer_claim_replay.py に VCP_BROAD_SEARCH_PATH_UN taxonomy mapping を追加する #1412 レビュー High): _matching_readiness_errors() は、kind == "broad_search_path_unbounded" の場合に限り、rule_id と category の両方が一致すること(OR ではなく AND)に加え、err.source_payload が producer shape(classification == "blocked" / category == "broad_search_path_unbounded" / decision == "blocked" / scope_class == "baseline_fail_expected")と一致することを要求する。rule_id = f"VCP_{category.upper()[:20]}" の 20 文字 truncation により別カテゴリ(例: broad_search_path_unrelated)が同一 rule_id に衝突しても、category と source_payload の不一致により誤って evidence として採用されない。
  • direct vc_preflight_result producer shape(schema/status/classification/category/decision/scope_class の実際の producer 出力)でも同一 body hash であれば deterministic backed になることを確認する
  • stale または欠落した vc_preflight_result.source.body_sha256 は既存どおり input_or_runtime_error で fail-closed することを確認する
  • 新規テストと既存テストの回帰確認を .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay.py、.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py、.claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py(analyze() の deterministic 判定を検証、実際の producer/consumer 関数を使う fixture に統一する)、新規 .claude/skills/issue-contract-review/tests/test_contract_readiness_check_broad_search_path.py(_PREFLIGHT_CATEGORY_TO_READINESS mapping と map_preflight_result_to_errors() の producer 挙動を検証)に追加する

Out of Scope

  • reviewer_claim_replay.py / contract_readiness_check.py 以外のファイルの判定ロジック再実装
  • issue-refinement-loop の control flow・SKILL.md の変更
  • _PREFLIGHT_CATEGORY_TO_READINESS への broad_search_path_unbounded エントリ追加を除く、baseline_vc_preflight.py / contract_readiness_check.py の broad-path 検出ロジック自体の変更(baseline_vc_preflight.py 自体は変更しない。contract_readiness_check.py は mapping テーブルへの 1 エントリ追加のみを扱う)
  • taxonomy 全体の matching mode を汎用的に変更すること(strict AND-match / producer shape 検証は broad_search_path_unbounded entry に限定するスコープ内対応であり、他 entry の matching ロジックには適用しない)

Acceptance Criteria

  • AC1: taxonomy に entry_id == "broad_search_path_unbounded" の entry が存在し、
    readiness_rule_ids == ["VCP_BROAD_SEARCH_PATH_UN"],
    readiness_rule_id_source_check == "baseline_vc_preflight",
    readiness_categories == ["broad_search_path_unbounded"],
    readiness_category_source_check == "baseline_vc_preflight",
    deterministic_checks == [],
    domain_keys が既存 entry と重複しない。
  • AC2: reviewer code vcp_broad_search_path_un,
    VCP_BROAD_SEARCH_PATH_UN, broad_search_path_unbounded
    はすべて broad_search_path_unbounded に normalize される。
  • AC3: contract_readiness_check.py の map_preflight_result_to_errors() が実際の
    broad-path preflight result(classification=blocked / category=broad_search_path_unbounded /
    decision=blocked / scope_class=baseline_fail_expected)から生成した readiness error
    (source_payload を含む)が同一 body hash で存在する場合、analyze() は
    verdict == "deterministic_fail_confirmed"、
    should_consume_iteration == true、
    checker_gap == false を返す。
  • AC4: direct vc_preflight_result producer shape
    schema=="baseline_vc_preflight/v1" / status=="blocked" /
    classification=="blocked" /
    category=="broad_search_path_unbounded" /
    decision=="blocked" / scope_class=="baseline_fail_expected" /
    same source.body_sha256
    でも同じく deterministic backed になる。
  • AC5: stale or missing vc_preflight_result.source.body_sha256
    は既存どおり input_or_runtime_error で fail-closed し、
    broad-path evidence として採用されない。
  • AC6: test_reviewer_claim_replay_taxonomy_parity.py の exact taxonomy dump
    drift test と taxonomy_invariant_violations() == [] が新 entry 追加後も PASS する。
  • AC7: 既存 entry
    vc_command_format / ac_vc_number_mismatch /
    missing_section / rva_immediate_field_missing /
    unexpected_pass の回帰がない。
  • AC8: direct vc_preflight_result の top-level schema が
    "baseline_vc_preflight/v1" 以外(欠落・改ざんを含む)の場合、
    broad_search_path_unbounded evidence は fail-closed(ValueError /
    input_or_runtime_error)になる。item 単位の
    classification / scope_class が producer shape と不一致な場合は
    evidence として採用されない(unbacked)。
  • AC9: readiness error が rule_id のみ一致・category 不一致、または
    category のみ一致・rule_id 不一致、または source_payload が
    欠落・producer shape と不一致の場合、broad_search_path_unbounded
    evidence として採用されない(checker_gap ではなく
    reviewer_claim_unbacked_by_deterministic_checker にとどまる)。
    contract_readiness_check.py の _PREFLIGHT_CATEGORY_TO_READINESS に
    broad_search_path_unbounded が needs_fix として登録されている。

Verification Commands

# AC1
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py -k test_taxonomy_has_broad_search_path_entry

# AC2
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py -k test_reviewer_code_variants_normalize_to_broad_search_path_unbounded

# AC3
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py -k test_vcp_broad_search_path_un_maps_to_deterministic_fail_confirmed

# AC4
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py -k test_direct_vc_preflight_result_producer_shape_deterministic_backed

# AC5
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py -k test_stale_or_missing_body_sha256_fails_closed

# AC6
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py

# AC7
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay.py

# AC8
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py -k "test_direct_vc_preflight_result_unsupported_schema_fails_closed or test_direct_vc_preflight_result_missing_schema_fails_closed or test_direct_vc_preflight_result_classification_mismatch_not_adopted or test_direct_vc_preflight_result_scope_class_mismatch_not_adopted"

# AC9
$ uv run python3 -m pytest .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py -k "test_readiness_rule_id_only_match_category_mismatch_not_adopted or test_readiness_category_only_match_rule_id_mismatch_not_adopted or test_readiness_missing_source_payload_not_adopted or test_readiness_source_payload_classification_mismatch_not_adopted"
$ uv run python3 -m pytest .claude/skills/issue-contract-review/tests/test_contract_readiness_check_broad_search_path.py

Allowed Paths

  • .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay.py
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_taxonomy_parity.py
  • .claude/skills/issue-refinement-loop/tests/test_reviewer_claim_replay_broad_search_path.py
  • .claude/skills/issue-contract-review/scripts/contract_readiness_check.py
  • .claude/skills/issue-contract-review/tests/test_contract_readiness_check_broad_search_path.py

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Required Design References

  • .claude/skills/issue-refinement-loop/scripts/reviewer_claim_replay.py
  • .claude/skills/issue-contract-review/scripts/contract_readiness_check.py
  • .claude/skills/issue-contract-review/scripts/baseline_vc_preflight.py
  • docs/dev/agent-skill-boundaries.md

Scope Delta(任意)

Notes for Reviewer

Activity

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

    @squne121
    OwnerAuthor

    判定: REQUEST_CHANGES

    #1406 の方向性は正しいです。現行 reviewer_claim_replay.py の taxonomy には vc_command_format / ac_vc_number_mismatch / missing_section / rva_immediate_field_missing / unexpected_pass の5件しかなく、broad_search_path_unbounded 系の entry は未登録です。したがって reviewer が rg の broad search path を blocker として出した場合に checker_gap 側へ落ちる、という問題設定は実装資産と整合します。

    ただし、#1406 はこのまま実装に渡すには field 境界が曖昧 です。特に VCP_BROAD_SEARCH_PATH_UN を「entry」と呼ぶ表現、readiness_categories と readiness_rule_ids の混同、source_check の誤指定余地、direct --vc-preflight-result-file 経路の spoof 耐性不足が危険です。#1406 自体にコメントはなく、現時点では Issue 本文だけが契約です。

    前提確認

    broad_search_path_unbounded の producer 側実装は既に存在します。baseline_vc_preflight.py は rg の path 未指定、.、/、Allowed Paths より広い親ディレクトリ、Allowed Paths 外 path を broad と判定し、classification="blocked", category="broad_search_path_unbounded", decision="blocked", scope_class="baseline_fail_expected" を返します。

    contract_readiness_check.py は preflight category から readiness error を作るとき、rule_id = f"VCP_{category.upper()[:20]}" を生成し、source_check は "baseline_vc_preflight" にします。つまり broad_search_path_unbounded の rule id は VCP_BROAD_SEARCH_PATH_UN ですが、source check は contract_readiness_check ではなく baseline_vc_preflight です。

    関連履歴上も、#1406 は mapping-only follow-up として妥当です。#1286 / PR #1304 で table-driven taxonomy、legacy verdict 互換、body-hash fail-closed、taxonomy invariant が導入され、#1368 / PR #1394 では unexpected_pass entry と direct preflight evidence の body hash / producer-shape 照合が追加されています。

    rg broad-path blocker 自体も技術的には正当です。ripgrep 公式ガイドは、file/path を指定しない rg foo はカレントディレクトリ全体を再帰検索し、rg foo は rg foo ./ 相当だと説明しています。したがって VC が実装対象を狭く証明するには、対象 path を指定するか -g などで検索対象を絞る必要があります。([GitHub]1)

    P0-1: entry_id と readiness rule_id を混同している

    #1406 は「VCP_BROAD_SEARCH_PATH_UN エントリを追加」と書いていますが、現行 taxonomy の entry_id は vc_command_format や unexpected_pass のような semantic kind です。一方、VCP_BROAD_SEARCH_PATH_UN は contract_readiness_check.py が生成する readiness rule_id です。これを literal に entry_id にすると、taxonomy の命名規則が壊れます。

    推奨は次です。

    {
        "entry_id": "broad_search_path_unbounded",
        "reviewer_codes": [
            "vcp_broad_search_path_un",
            "VCP_BROAD_SEARCH_PATH_UN",
            "broad_search_path_unbounded",
            "broad search path unbounded",
        ],
        "deterministic_checks": [],
        "readiness_rule_ids": ["VCP_BROAD_SEARCH_PATH_UN"],
        "readiness_rule_id_source_check": "baseline_vc_preflight",
        "readiness_categories": ["broad_search_path_unbounded"],
        "readiness_category_source_check": "baseline_vc_preflight",
        "domain_keys": ["vc_broad_search_path"],
    }

    VCP_BROAD_SEARCH_PATH_UN は readiness_rule_ids に置くべきです。entry_id は broad_search_path_unbounded のように producer category と対応する semantic 名にしてください。

    P0-2: readiness_category_source_check / readiness_rule_id_source_check の正本が違う

    #1406 は contract_readiness_check.py が rule id を生成することに注目していますが、actual readiness error の source_check は "baseline_vc_preflight" です。_matching_readiness_errors() は rule_id と source_check、または category と source_check の組で照合します。ここを "contract_readiness_check" にすると evidence を拾えず、deterministic_fail_confirmed になりません。

    したがって、両方とも明示的にこう固定すべきです。

    "readiness_rule_id_source_check": "baseline_vc_preflight"
    "readiness_category_source_check": "baseline_vc_preflight"

    contract_readiness_check.py は wrapper/aggregator であり、この taxonomy entry の source identity ではありません。

    P0-3: readiness_categories に rule id 文字列を入れてはいけない

    Issue 本文には「readiness_categories には ... VCP_BROAD_SEARCH_PATH_UN ... との対応を反映」と読める箇所があります。これは危険です。現行 schema では readiness_rule_ids と readiness_categories は別フィールドで、_matching_readiness_errors() もそれぞれ別に照合します。

    正しい分離は次です。

    "readiness_rule_ids": ["VCP_BROAD_SEARCH_PATH_UN"]
    "readiness_categories": ["broad_search_path_unbounded"]

    この分離を Issue の AC に明記しないと、実装者が readiness_categories=["VCP_BROAD_SEARCH_PATH_UN"] のような false-green 変更を入れる余地があります。

    P0-4: deterministic_checks に架空の check 名を入れるリスク

    現時点で broad_search_path_unbounded は check_issue_contract.py の deterministic_checks ではなく、baseline_vc_preflight.py category と readiness error で裏付けられます。reviewer_claim_replay.py の _has_deterministic_check_failure() は deterministic_checks 名が存在する entry だけを taxonomy_gap 判定に使います。ここに架空の "C*_..." 名を入れると、producer artifact との対応がない taxonomy になります。

    したがって deterministic_checks は [] が安全です。#1406 の AC2 にある「check_issue_contract.py / contract_readiness_check.py の実行結果」という表現は削り、今回の backing source は baseline_vc_preflight category と、それを変換した readiness error に限定してください。

    P0-5: direct --vc-preflight-result-file 経路の spoof 耐性が不足しうる

    _matching_vc_preflight() は、artifact 全体の status == "blocked"、result の category が taxonomy category に一致、decision == "blocked" を見ます。ただし unexpected_pass だけは追加で classification == "unexpected_pass" と category 一致を要求しています。broad_search_path_unbounded には同様の特別ガードがありません。

    #1394 / #1368 では direct preflight evidence を使う前に source.body_sha256 と producer shape を fail-closed に寄せ、unexpected_pass の category-only spoof をテストで潰しています。#1406 でも同じ品質を要求すべきです。少なくとも新規テストで、direct preflight artifact が以下を満たす producer shape の場合だけ backing になることを固定してください。

    source.body_sha256: same as review/readiness
    status: blocked
    results[].classification: blocked
    results[].category: broad_search_path_unbounded
    results[].decision: blocked
    results[].scope_class: baseline_fail_expected

    より堅くするなら、_matching_vc_preflight() を unexpected_pass 専用特例ではなく、entry 側に expected_preflight_classifications のような schema を追加して一般化すべきです。ただしそれは #1406 の Allowed Paths / fixed schema を広げるため、今回はテストによる producer-shape pinning が最小です。

    P0-6: AC4 の collision check が不十分

    #1406 の AC4 は _build_taxonomy_lookup() が例外を出さないことを確認するとしていますが、この lookup は reviewer_codes、deterministic_checks、domain_keys、entry_id しか見ません。readiness_rule_ids と readiness_categories は lookup collision の対象外です。

    一方、既存の taxonomy_invariant_violations() は duplicate readiness_rule_ids と duplicate (source_check, category) pair も検出します。したがって AC4 は _build_taxonomy_lookup() だけではなく、taxonomy_invariant_violations() == [] も必須にしてください。

    P1: reviewer code alias の範囲を固定する必要がある

    normalize_taxonomy_key() は小文字化と whitespace 正規化だけを行い、underscore / hyphen / slash の正規化はしません。つまり broad_search_path_unbounded と broad-search-path-unbounded は別物です。

    #1406 は vcp_broad_search_path_un / broad_search_path_unbounded 等を例示していますが、「reviewer が実際に emit しうる表記」を再確認せよ、で止まっています。ここは実装者裁量にすると reviewer output drift を再発させます。少なくとも次は AC に入れてください。

    assert normalize_taxonomy_key("vcp_broad_search_path_un") == "broad_search_path_unbounded"
    assert normalize_taxonomy_key("VCP_BROAD_SEARCH_PATH_UN") == "broad_search_path_unbounded"
    assert normalize_taxonomy_key("broad_search_path_unbounded") == "broad_search_path_unbounded"

    自然文の "broad search path unbounded" を入れるかは reviewer の実 emit を確認してからでよいです。入れるならテストで固定してください。

    P1: 既存 parity test の exact entry set 更新が必須

    test_ac5_dump_taxonomy_json_drift_detection() は entry set を exact に pin しています。現状は5 entry 固定なので、新 entry を足すだけではこの test が落ちます。これは設計どおりで、#1406 の AC3 に明示的に含めるべきです。

    更新対象は entry set だけではありません。expected_checks、reviewer code parity、readiness category/source parity も拡張する必要があります。

    推奨 AC 修正版

    #1406 の Acceptance Criteria は次の形まで具体化してください。

    - [ ] AC1: taxonomy に `entry_id == "broad_search_path_unbounded"` の entry が存在し、
          `readiness_rule_ids == ["VCP_BROAD_SEARCH_PATH_UN"]`,
          `readiness_rule_id_source_check == "baseline_vc_preflight"`,
          `readiness_categories == ["broad_search_path_unbounded"]`,
          `readiness_category_source_check == "baseline_vc_preflight"`,
          `deterministic_checks == []`,
          `domain_keys` が既存 entry と重複しない。
    
    - [ ] AC2: reviewer code `vcp_broad_search_path_un`,
          `VCP_BROAD_SEARCH_PATH_UN`, `broad_search_path_unbounded`
          はすべて `broad_search_path_unbounded` に normalize される。
    
    - [ ] AC3: readiness error
          `{rule_id:"VCP_BROAD_SEARCH_PATH_UN",
            source_check:"baseline_vc_preflight",
            category:"broad_search_path_unbounded"}`
          が同一 body hash で存在する場合、`analyze()` は
          `verdict == "deterministic_fail_confirmed"`、
          `should_consume_iteration == true`、
          `checker_gap == false` を返す。
    
    - [ ] AC4: direct `vc_preflight_result` producer shape
          `status=="blocked"` / `classification=="blocked"` /
          `category=="broad_search_path_unbounded"` /
          `decision=="blocked"` / same `source.body_sha256`
          でも同じく deterministic backed になる。
    
    - [ ] AC5: stale or missing `vc_preflight_result.source.body_sha256`
          は既存どおり `input_or_runtime_error` で fail-closed し、
          broad-path evidence として採用されない。
    
    - [ ] AC6: `test_reviewer_claim_replay_taxonomy_parity.py` の exact taxonomy dump
          drift test と `taxonomy_invariant_violations() == []` が新 entry 追加後も PASS する。
    
    - [ ] AC7: 既存 entry
          `vc_command_format` / `ac_vc_number_mismatch` /
          `missing_section` / `rva_immediate_field_missing` /
          `unexpected_pass` の回帰がない。

    実装方針

    この Issue で baseline_vc_preflight.py や contract_readiness_check.py を触る必要はありません。#648 / PR #673 で broad-path guard は実装済みで、#683 / PR #684 で backtick・注釈付き Allowed Paths の正規化バグも修正済みです。#1328 では rg path operand parser の成熟化も扱われています。

    最小実装は、REVIEWER_CHECKER_TAXONOMY_V1 への1 entry 追加と、既存 parity tests / replay tests の拡張で足ります。dump_taxonomy() の JSON schema と invariant は既に存在するため、ここを活用してください。Python の json / JSON Schema 周辺は、stable dump・unknown property rejection・strict serialization という現行設計と相性がよいです。 ([Python documentation]2)

    最終コメント

    #1406 は「やるべきこと」は合っています。しかし現契約のままだと、VCP_BROAD_SEARCH_PATH_UN を entry_id にしてしまう、source_check を contract_readiness_check にしてしまう、readiness_categories に rule id を入れてしまう、あるいは direct preflight の category-only spoof を許す、といった false-green 実装が成立します。

    修正後の #1406 は mapping-only Issue として妥当です。現状の文面では REQUEST_CHANGES です。

  3. squne121 commented on Jul 9, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  4. squne121 commented on Jul 9, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-09T22:19:01Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1406
      body_sha256: "sha256:bd6e7a13515de7f19ad77b7c08f33d29080798ec680f784dd23d1446cd5e3a31"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  5. squne121 commented on Jul 9, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-07-09T22:33:23Z)

    • PR: feat: reviewer_claim_replay.py に VCP_BROAD_SEARCH_PATH_UN taxonomy mapping を追加する #1412
    • Branch: worktree-issue-1406-reviewer-claim-replay-py-vcp-broad-searc
    • Verification: 新規/回帰テスト 69/69 PASS(test_reviewer_claim_replay_broad_search_path.py 6件、test_reviewer_claim_replay_taxonomy_parity.py 22件、test_reviewer_claim_replay.py 41件)、pnpm typecheck/lint/test/build 4/4 PASS、gemini model routing 21件 PASS、ruff check PASS
    • 後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup
  6. squne121 commented on Jul 10, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-07-10T11:41:18Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1406
      body_sha256: "sha256:f9a2897a104293dc2f3cc1098cf2623b9070acc0767581c7fef553b4d0173990"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  7. added a commit that references this issue on Jul 10, 2026
    3dc1e78
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