Skip to content

feat(hooks-post-tool-linter): D-2 lint rule test/comment touch (順位 101/103/106)#146

Merged
aloekun merged 2 commits into
masterfrom
d-2-lint-rule-touch
May 12, 2026
Merged

feat(hooks-post-tool-linter): D-2 lint rule test/comment touch (順位 101/103/106)#146
aloekun merged 2 commits into
masterfrom
d-2-lint-rule-touch

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented May 12, 2026

Summary

Phase D dogfood の 2 本目 (D-2)。2 commits 構成:

  1. docs(todo,analysis): post-merge-feedback PR #145 採用 2 件登録 + Phase D D-1 完了反映
  2. feat(hooks-post-tool-linter): D-2 lint rule code touch (順位 101/103/106) ← D-2 本体

D-2 本体: 3 件採用 task (順位)

diff stat (D-2 本体 = commit 2)

種類 行数
Rust (src/hooks-post-tool-linter/src/main.rs doc comment + 2 new tests + 2 guards) +81
TOML (custom-lint-rules.toml 動線追加) +4
docs (docs/todo6.md + docs/todo-summary.md 完了 entry 削除) -87
合計 4 files, 84 insertions / 88 deletions = 172 line changes

D-2 lint_screen dogfood: skipped (D-1 同様)

D-1 着手時に発見した workflow gap (jj auto-snapshot vs session-only opt-in) は順位 115 (LINT_SCREEN_ENABLED env var override) で解消予定。本 PR ではまだ未 land のため、lint_screen dogfood は引き続き skip。順位 115 land 後の D-3 で初の実 dogfood を実施。

Test plan

  • cargo test -p hooks-post-tool-linter (95 tests pass、新規 2 tests + 1 強化、ZERO regression)
  • markdownlint (0 error) — todo6.md / todo-summary.md
  • takt pre-push-review APPROVE (1 iteration、no anomalies、3m 58s)
  • CodeRabbit review (PR 作成後の自動 trigger)
  • 順位 115 land 後の D-3 (paths filter 実装、順位 102) で env var override workflow を実証

関連

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント

    • カスタムリント規則の仕様情報と計画機能に関する説明を拡充
    • フェーズD検証の進捗状況と実施予定を更新
  • 改善

    • リント検証の自己排除ロジックの厳密性を向上
    • テストカバレッジを強化して設定検証の信頼性を向上

Review Change Stack

aloekun added 2 commits May 12, 2026 16:58
…-1 完了反映

PR #145 (D-1) merge 後の post-merge-feedback で採用された 2 件 (Tier 3 #1 + #3) を todo 系列に登録し、analysis.md の Phase D section に D-1 land 状況と副産物を反映する。

順位 116 (Tier 3 XS、PR #145 T3-#1):
  - ADR-040 step_timeout 説明に sublinear / KV cache locality clarification 追記
  - 実測値 600s 採択 / 保守上限 720s / sublinear 性の KV cache 根拠

順位 117 (Tier 3 S、PR #145 T3-#3):
  - coding-style.md § Cross-File Reference Lifecycle に ephemeral → permanent 知識移管 edit order を追記
  - 3 ステップ原則 (① permanent target 先行作成・validate → ② 参照追加 → ③ 参照元削除)

analysis.md Phase D section 更新:
  - D-1 land 状況 (PR #145、298 行、ZERO findings APPROVE) を table の状態列に反映
  - 順位 115 を D-2 前 critical path として明示
  - D-1 dogfood outcome として 4 項目記録 (skip 理由 / workflow gap 発見 / ADR-040 fix / migration codify)

順位 115 (Tier 1) の rationale に「post-merge-feedback Tier 1 #1 で再 validate 済」を追記。
Phase D dogfood の 2 本目 (D-2)。lint rule の test gap + struct doc + self-exclusion guards を bundled。

順位 101 (PR #140 T1-#1 採用): rule⑧ depth-1 root MD edge case test 2 件追加
  - md_no_docs_relative_detects_root_level_back_reference (CLAUDE.md fixture)
  - md_no_docs_relative_detects_root_readme_back_reference (README.md fixture)
  - 「fire = true positive」整理を doc comment と test 名で明示
  - root-level MD からの ../docs/ 参照は repo 外を指す broken link で真陽性が正しい挙動

順位 103 (PR #140 T1-#3 採用): CustomRule struct に lint runner field reference doc comment 追加
  - サポート field 一覧 (id/pattern/severity/message/extensions/why/fix/example) を /// で記述
  - planned field (paths、順位 102) も併記し設計-実装 gap を構造的に予防
  - custom-lint-rules.toml 冒頭コメントに main.rs CustomRule struct への動線追加

順位 106 (PR #141 T2-#1 採用): self-exclusion invariant test に 2 false-green guards 追加
  - assert!(path.exists()) — deployed TOML 削除 / 移動時の silent pass 抑止
  - assert!(extensions contains "toml") — rule scope 変更時の silent degradation 抑止
  - 各 assertion message に silent degradation のリスクと由来 (順位 106 / PR #141 T2-#1) を inline で記述

cargo test pass: hooks-post-tool-linter 95 tests (新規 2 + 既存 +1 強化、ZERO regression)。

PR #145 = D-1 と同様、lint_screen dogfood は順位 115 (env var override) land 前のため skip。
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 19155edd-0c4a-4c3e-ab76-3dd278ffbb80

📥 Commits

Reviewing files that changed from the base of the PR and between bcd8f3c and 184907d.

📒 Files selected for processing (6)
  • .claude/custom-lint-rules.toml
  • docs/local-llm-offload-analysis.md
  • docs/todo-summary.md
  • docs/todo6.md
  • docs/todo8.md
  • src/hooks-post-tool-linter/src/main.rs
💤 Files with no reviewable changes (1)
  • docs/todo6.md

📝 Walkthrough

Walkthrough

カスタムリント規則スキーマのドキュメント化とテスト強化、およびプロジェクト進捗追跡ドキュメントの更新。TOML 設定と Rust 実装でスキーマ仕様を明確化し、ルール検証テストを追加・強化。完了したタスクを整理し、Phase D dogfood 検証の現在の状態と次の follow-up タスクを記載。

Changes

リント規則スキーマドキュメント化とテスト強化

Layer / File(s) Summary
スキーマドキュメント追加
.claude/custom-lint-rules.toml, src/hooks-post-tool-linter/src/main.rs
custom-lint-rules.toml[[rules]] セクションに対応フィールド仕様の参照注記を追加。Rust 実装では CustomRule スキーマの詳細説明(対応フィールド一覧、計画中の paths フィールド結合セマンティクス)をドキュメントコメントで拡張。
リント規則テスト拡張
src/hooks-post-tool-linter/src/main.rs
"no docs relative back to docs" ルールがリポジトリ直下 Markdown(CLAUDE.md, README.md)から ../docs/ への相対参照を正しく検出することを確認するユニットテストを追加。デプロイ TOML 存在確認と extensions リストの "toml" 包含を検証する self-exclusion 不変量テストを強化。

プロジェクト進捗追跡と todo 管理

Layer / File(s) Summary
完了タスクの削除と整理
docs/todo6.md
PR #145 で実装済みとなった 3 つのタスク(rule⑧ edge-case テスト追加、CustomRule support fields code comment、self-exclusion test path/extension ガード)のセクションを削除し、残存タスク記載を繰り上げ。
Phase D 進捗記録と次のステップ
docs/local-llm-offload-analysis.md
Phase D dogfood 検証を「計画中」から「進行中」に更新。D-1(PR #145, 2026-05-12)がワークフロー gap により dogfood スキップされたことを記録。D-2/D-3 予定の環境変数オーバーライド(LINT_SCREEN_ENABLED=true)と段階的 PR サイズ戦略(小→中→中大)を詳細化。発見された ADR-040 不整合と修正内容を follow-up 記録。
推奨実行順序と follow-up タスク追加
docs/todo-summary.md, docs/todo8.md
推奨実行順序テーブルで完了タスクを削除。todo8.md Tier 1 タスク(LINT_SCREEN_ENABLED env var override)の説明を拡張し post-merge-feedback での再検証を追記。新規 Tier 3 タスク 2 件:ADR-040 step_timeout 説明の sublinear / KV cache locality 明確化、coding-style.md Cross-File Reference Lifecycle への ephemeral→permanent 知識移管 edit order 追記(3 ステップ原則と実行計画を記載)。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 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 プルリクエストのタイトルは、主な変更内容である「D-2 lint rule test/comment touch」を明確に説明し、具体的なタスク優先度(順位 101/103/106)も記載している。
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

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