Skip to content

docs(todo): 順位 137 + 138 追加 (PR #163 採用 follow-up)#164

Merged
aloekun merged 1 commit into
masterfrom
docs/add-rank-137-138
May 19, 2026
Merged

docs(todo): 順位 137 + 138 追加 (PR #163 採用 follow-up)#164
aloekun merged 1 commit into
masterfrom
docs/add-rank-137-138

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented May 19, 2026

Summary

PR #163 (Bundle k-2) merge 後の post-merge-feedback で採用された 2 件の follow-up task を docs/todo*.md 系列に登録する docs-only PR。実装は別 PR で着手。

  • 順位 137 (🚀 Tier 1, M): Rule-Test Coverage Check Cargo test — .claude/custom-lint-rules.toml の extensions ⇔ src/hooks-post-tool-linter/src/main.rs の test 関数名を mechanical に検証
  • 順位 138 (💎 Tier 3, XS): Rule Extension Test Pattern を ~/.claude/rules/common/testing.md に明文化

背景

PR #163 (Bundle k-2 = TOML positive/negative test + extensions reminder comment) で順位 124 (TOML test) + 順位 127 (passive reminder comment) を land したが、merge 後の analyzer 判定:

passive reminder では PR #152 同根再発を防止できなかった実証ベース → mechanical enforcement が必要

= feedback_no_unenforced_rules.md 原則 (機械検知できなければ何もしない方がマシ) を analyzer 自身が私の comment 追加に対して適用した形。

Frequency High (PR #110 / #151 / #152 / #155 の 4 PR 観測) で構造的防止層の必要性が確定。

2 層構成

順位 役割
機械強制層 137 (Tier 1, M) Cargo test step で TOML の rule.extensions × main.rs の test 関数名対応を mechanical に検証、不在で fail
canonical 文書化層 138 (Tier 3, XS) global rules (~/.claude/rules/common/testing.md) に pattern + 命名規約を記述、派生プロジェクトへ自動波及

137 + 138 は同 PR land 推奨 (命名規約決定が atomic に整う、cross-reference が同 commit で完結)。

補正事項

analyzer report が target を src/cli-custom-linter/src/main.rs と記載していたが、実際の crate 名は hooks-post-tool-linter のため詳細 entry で補正済。reviewer も「Crate name correction ... Intentional and well-documented」と独立 validate。

変更内容

ファイル 変更 内容
docs/todo-summary.md +2 順位 137 + 138 table 行
docs/todo8.md +88 順位 137 + 138 詳細 entry (動機 / 設計決定 / 作業計画 / 完了基準 / 詰まっている箇所)

Net: +90 行 (docs only)

ADR-035 適用

docs-only PR として ADR-035 適用、reviewer も「Per ADR-035, standard code review criteria (mutation, error handling, DRY, YAGNI, test coverage, function length) do not apply」と確認済。

takt pre-push-review

  • APPROVED (1 iteration / 2m 0s)
  • Blocking anomalies: 0
  • Informational note 1 件: lint screen が unrelated file (cli-push-runner) を flag したが diff 外で verdict 不変

Test plan

  • takt pre-push-review: APPROVED
  • CI green (post-push)
  • CodeRabbit に actionable comments がない (docs-only addition)

Summary by CodeRabbit

ドキュメンテーション

  • テスト検証プロセスに関するタスク追跡ドキュメントを更新しました。
  • テスト実装の命名規約およびパターンに関するガイドラインを追加しました。

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Warning

Rate limit exceeded

@aloekun has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 44 minutes and 58 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 96f9eea3-ce65-49c8-b0e0-f22652eb97fb

📥 Commits

Reviewing files that changed from the base of the PR and between 4ae4760 and 0db4afe.

📒 Files selected for processing (2)
  • docs/todo-summary.md
  • docs/todo8.md
📝 Walkthrough

Walkthrough

PR #163 関連として、custom lint rule の extensions 更新時に対応するテストが追加されているか CI で機械検証する体系化を計画する 2 つのタスク(Rule-Test Coverage Check と Rule Extension Test Pattern 明文化)を、ドキュメントテーブルと詳細タスク記述に追加しました。

Changes

Rule Extension Test Pattern タスク計画

Layer / File(s) Summary
推奨実行順序サマリー更新
docs/todo-summary.md
「推奨実行順序サマリー」テーブルに順位 137・138 のエントリを追加。順位 137 は Cargo test による extensions とテスト関数名の機械検証、順位 138 は ~/.claude/rules/common/testing.md への Rule Extension Test Pattern の明文化。
詳細タスク記述の追加
docs/todo8.md
Rule-Test Coverage Check タスク(custom-lint-rules.toml 内の各 rule の idextensions から未対応テスト関数を列挙し、段階的に warning→fail する実装計画)と Rule Extension Test Pattern 明文化タスク(extensions 変更時の positive/negative 追加運用規約、命名規約、fixture 除外方針、機械検証との相互参照を testing.md に文書化)の 2 つを記述。

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRのタイトルは「順位 137 + 138 追加 (PR #163 採用 follow-up)」であり、変更の主要な目的(PR #163のマージ後の2つのfollow-upタスクをドキュメントに追加)を明確かつ簡潔に表現している。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/todo8.md`:
- Around line 426-434: 完了基準と未解決事項でスコープが食い違っているので「必須対象 ext
を明示列挙して完了基準へ反映」する方針に統一してください; 具体的には docs/todo8
の「完了基準」節と「詰まっている箇所」節で、必須カバレッジ対象を(例: rs, toml, yaml のような主要 ext の明示リスト)一つに固定し、"全
(rule, ext) ペア必須" の文言を削除または注記して、TOML meta field vs
命名規約の議論は補助的設計決定として残すように更新し、さらに testing.md への cross-reference
と完了条件の記述が一致するように両方を同時に修正してください.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2f4c36d0-c1a3-489a-b677-85417f8c7134

📥 Commits

Reviewing files that changed from the base of the PR and between 6f2f250 and 4ae4760.

📒 Files selected for processing (2)
  • docs/todo-summary.md
  • docs/todo8.md

Comment thread docs/todo8.md Outdated
…ule-test coverage check + global testing.md 明文化)

PR #163 (Bundle k-2) merge 後の post-merge-feedback で 2 件採用された follow-up
task を todo 系列に登録。

## 順位 137 (Tier 1, M, Frequency High)

Rule-Test Coverage Check Cargo test。
`.claude/custom-lint-rules.toml` の各 rule の extensions ⇔
`src/hooks-post-tool-linter/src/main.rs` の test 関数名を mechanical に検証
する Cargo test step を追加する。

由来: PR #110/#151/#152/#155 の 4 PR 観測 (Frequency High)、PR #163 で順位 127
として passive reminder comment を追加したが、analyzer が「passive reminder
では PR #152 同根再発を防止できなかった実証ベース → mechanical enforcement
が必要」と判定。

必須カバレッジ scope (CodeRabbit Minor 指摘で確定): 主要 ext rs/toml/yaml/yml ×
全 rule に対応 test 必須、その他 ext (jsonc/json/ts/tsx/js/jsx/py/ps1) は
rule あたり positive single test 1 件以上で代替。完了基準と詰まっている箇所
の scope drift を fix。

## 順位 138 (Tier 3, XS, Frequency High)

Rule Extension Test Pattern を `~/.claude/rules/common/testing.md` に明文化。
順位 137 (mechanical Cargo test) と 2 層構成。`~/.claude/` global 配下のため
派生プロジェクト (techbook-ledger / auto-review-fix-vc) へ自動波及。

## land 順序の推奨

順位 137 + 138 は同 PR で land 推奨 (命名規約 + 必須 ext scope 決定が
atomic に整う、cross-reference が同 commit で完結)。

## 補正事項

analyzer report は target を `src/cli-custom-linter/src/main.rs` と記載
していたが、実際の crate 名は `hooks-post-tool-linter` のため詳細 entry
で補正済。

## CodeRabbit review 反映

PR review (PR #164 round 1) で順位 137 の「完了基準」(全 (rule, ext) ペア必須)
と「詰まっている箇所」(主要 ext に絞った coverage 推奨) の scope drift を
🟡 Minor で指摘。修正方針:

- 完了基準を 主要 ext (rs/toml/yaml/yml) × 全 rule 必須 + その他 ext は
  rule あたり single positive test で代替、と明示
- 設計決定 section に必須カバレッジ scope を追加 (順位 138 testing.md と
  同一 commit で codify することで cross-reference の atomicity 確保)
- 詰まっている箇所 から該当議論を削除、TOML meta field vs 命名規約方式の
  trade-off のみ残す (= 順位 138 実装時に確定する補助 design 議論)

## docs only

実装は別 PR で着手予定。
@aloekun aloekun force-pushed the docs/add-rank-137-138 branch from 4ae4760 to 0db4afe Compare May 19, 2026 03:59
@aloekun aloekun merged commit a1e979b into master May 19, 2026
1 check passed
@aloekun aloekun deleted the docs/add-rank-137-138 branch May 19, 2026 04:06
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