Skip to content

refactor(hooks): define the model-rule fixture path once - #172

Merged
furedea merged 1 commit into
mainfrom
refactor/74-one-model-rule-fixture-definition
Nov 11, 2026
Merged

furedea merged 1 commit into
mainfrom
refactor/74-one-model-rule-fixture-definition

Conversation

@furedea-agent

@furedea-agent furedea-agent Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

「モデル判定の eval 用 fixture のパス」の定義を 1 か所にまとめ,Stop の対象選択と検証計画の両方が同じ関数で判定するようにします.挙動は変えません.

変更前 変更後
定義 model_rules_files.RULE_FIXTURES(full_match)と check_selection.MODEL_RULE_FIXTURES(fnmatch)の 2 つ model_rule_fixtures.is_model_rule_fixture の 1 つ
一致の方法 2 通り PurePosixPath.full_match
tests/fixtures など別の場所 通常のパス 通常のパス(変更なし)
  • 入れ子の fixture パス,model-rules 外の fixtures,fixtures 直下でない規則ファイルをテストで確認(tests/hooks/test_model_rule_fixtures.py)
  • 既存の呼び出し側のテスト(test_model_rules.py,test_go_check_selection.py,test_check_selection.py,test_related_test_extensions.py)が通る(186 件)
  • ruff check,lefthook の pre-commit(ruff・ty・file-length など)が通る
範囲・前提

🤖 Generated with Claude Code

The Stop model-rule file selection and the verification planner each
carried their own pattern and matcher for the same concept. Move it to
model_rule_fixtures.is_model_rule_fixture and use it from both. A
fixtures directory outside model-rules stays a normal path.

Refs #74

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@furedea

furedea commented Nov 11, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T18:45:38.896101Z 112f2f9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

Review summary (read-only): no findings.

  • is_model_rule_fixture (PurePosixPath.full_match with **/fixtures/**) gives the same results as the old fnmatch pattern in check_selection for real fixture layouts. There is one intended difference: model-rules/fixtures/<file> (no rule directory in between) now counts as a fixture there too. That matches model_rules_files and is tested.
  • fnmatch is still used elsewhere in check_selection.py, so keeping the import is correct.
  • The new tests cover the edge cases: nested paths, a bare fixtures directory, fixtures outside model-rules, and a prefixed path.

I couldn't run the tests in this environment.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 112f2f9b9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@furedea
furedea merged commit b59061e into main Nov 11, 2026
25 checks passed
@furedea
furedea deleted the refactor/74-one-model-rule-fixture-definition branch November 11, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant