Skip to content

改善: scope_cvs_in_scope_mismatch warning の path/word token namespace 分離 #436

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "396"
goal_ref: "path token と word token を同一 set に混在させないよう namespace 分離し、一般語による誤 overlap を防ぐ"
change_kind: code

Parent Issue

#396

Source

PR #430 review comment (reviewer NB1): #430 (comment)

Background / Problem

現行実装では path token と significant word token を同一の set に入れているため、src/payment/main.py と src/auth/main.py が main などの一般語で部分 overlap し、Jaccard が上がって true warning を suppression する可能性がある。

Outcome

path token と word token が別 namespace(path: / word: prefix)で管理され、path-match 済み範囲を mask してから word を抽出する、または overlap/union を namespace 別に集計する設計となる。evidence も path_overlap / word_overlap を分離して出力する。

In Scope

  • _bullet_tokens() を namespace 分離(path:xxx / word:xxx プレフィックス)に変更、または path-match 後に word 抽出する設計
  • detect_warning_scope_cvs_in_scope_mismatch() の Jaccard 計算を namespace 対応に変更
  • evidence の overlap / missing_from_cvs / missing_from_in_scope を namespace 別に分離
  • 関連 fixture の更新

Out of Scope

  • tokenization アルゴリズムの大幅変更(CountVectorizer 等の外部依存)
  • 既存 C1〜C13 checker の他チェックへの影響

Acceptance Criteria

  • path token と word token が別 namespace で管理される
  • src/payment/main.py と src/auth/main.py のような一般語 overlap で false suppress しない fixture が PASS する
  • 既存 fixture 全件が引き続き PASS する

Verification Commands

$ uv run pytest .claude/skills/review-issue/tests/ -v

Allowed Paths

  • .claude/skills/review-issue/scripts/check_issue_contract.py
  • .claude/skills/review-issue/tests/
  • .claude/skills/review-issue/fixtures/

Stop Conditions

なし

Runtime Verification Applicability

decision: not_applicable
reason: pytest で機械的に検証可能

Activity

  1. added
    enhancement
    on May 27, 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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions