Skip to content

fix(refs): docs/todo.md セクション参照を非ドキュメントファイルから削除#94

Merged
aloekun merged 1 commit into
masterfrom
fix/stale-todo-refs
Apr 29, 2026
Merged

fix(refs): docs/todo.md セクション参照を非ドキュメントファイルから削除#94
aloekun merged 1 commit into
masterfrom
fix/stale-todo-refs

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented Apr 29, 2026

Summary

PR #93 post-merge-feedback の Tier 3 finding #1 (Cross-File Reference Lifecycle ルール) の retroactive 適用。永続成果物から ephemeral な docs/todo*.md セクション名への参照を全件排除します。~/.claude/rules/common/coding-style.md に追加した新ルールに対する初回 sweep。

Why

PR #93 で実装した polling-anti-pattern hook の block message に「docs/todo.mdPolling anti-pattern 検出ルール を参照」という pointer があり、参照先のエントリが同 PR で削除されたため merge 直後から dead pointer になっていました。post-merge-feedback でこの構造的問題が指摘され (Tier 3 #1)、coding-style.md にルール化済み。本 PR は当該ルールを既存コードベースに retroactive 適用。

非 docs ファイル全件 grep (docs/todo) で 3 件発見、全件対応。

Changes

File Before After Status
src/hooks-pre-tool-validate/src/main.rs ... ADR-018 ... 、docs/todo.md の「Polling anti-pattern 検出ルール」を参照 ... ADR-018 ... を参照 (dead pointer 削除) 確定 stale (PR #93 で削除済みエントリへの参照)
.claude/custom-lint-rules.toml コメント中の引用例: [docs/todo.md](todo.md#推奨実行順序サマリー) 「日本語 heading への GFM 自動 anchor link」と一般化 引用文字列自身が日付付き heading 由来で stale 構造
.markdownlint-cli2.jsonc // Initial rule set per docs/todo.md "Markdown linter hook 統合" task. // Initial rule set introduced in PR #88 (markdownlint-cli2 PostToolUse hook integration). task は PR #88 で merge 済 → 該当 todo エントリ削除済

Design notes

  • 修正方針は coding-style.md の Cross-File Reference Lifecycle セクションに準拠:
    • GOOD: ADR / PR 番号 / 安定 docs/ パス (永続)
    • BAD: docs/todo*.md セクション名・anchor (ephemeral)
  • custom-lint-rules.toml の修正では、CodeRabbit が PR docs(todo): PR #88 post-merge-feedback の Tier 1/2 finding を採用 #89 で指摘した「pattern」を一般化して引用に置き換え。元の文字列引用は「悪例の例示」用途だったが、引用そのものが heading slug 変更で機能しないという矛盾を解消。
  • 自動防止 (lint rule で docs/todo を非 docs ファイルから検出) は別 task。誤検出回避の regex 設計が必要なため bundle せず、必要に応じて Phase 2 以降で検討。

Test plan

  • cargo test -p hooks-pre-tool-validate → 122/122 pass (block message 修正のみ、テストロジック影響なし)
  • grep "docs/todo" --glob '!docs/**' で 0 matches (clean)
  • pnpm build:hooks-pre-tool-validate → exe 再生成成功
  • takt pre-push-review APPROVE (1 iteration, aggregate=approved)

Phase

PR #93 post-merge-feedback の Tier 3 #1 採用分。Phase 2 (Bundle T) 着手前のクリーンアップ。

Summary by CodeRabbit

リリースノート

  • Documentation

    • ドキュメント内の参照リンクを更新し、関連するアーキテクチャ決定記録への直接リンクを整備しました。
  • Chores

    • ルール説明および検証メッセージのテキストを改善し、より一般化した表現に統一しました。

PR #93 post-merge-feedback finding #1 (Cross-File Reference Lifecycle ルール)
の retroactive 適用。永続成果物 (hook block messages / config / コード) から
ephemeral な docs/todo*.md セクション名への参照を排除する。

修正箇所 (3 件):

1. src/hooks-pre-tool-validate/src/main.rs (preset_polling_anti_pattern block message)
   `docs/todo.md の「Polling anti-pattern 検出ルール」を参照` を削除。
   当該 todo.md エントリは PR #93 自身で削除済みの dead pointer。
   ADR-018 への参照のみ残す (こちらは permanent reference)。

2. .claude/custom-lint-rules.toml (no-mutable-anchor 由来コメント)
   `[docs/todo.md](todo.md#推奨実行順序サマリー)` 形式の引用を、
   日本語 heading 自体を anchor 形式で書かない記述に書き換え。
   日付付き heading のスラッグは時間で変化するため、引用例自体が
   stale になる構造的問題があった (まさに本ルールが検出する pattern)。

3. .markdownlint-cli2.jsonc (config 由来コメント)
   `per docs/todo.md "Markdown linter hook 統合" task` を
   `introduced in PR #88 (markdownlint-cli2 PostToolUse hook integration)`
   に置換。PR 番号は permanent reference。

背景: ~/.claude/rules/common/coding-style.md に追加した
"Cross-File Reference Lifecycle" ルール (永続→ephemeral 参照禁止) の
retroactive sweep。grep で非 docs ファイルを洗い出し全件対応。

検証:
- cargo test -p hooks-pre-tool-validate: 122/122 pass
- grep "docs/todo" --glob '!docs/**': matches 0 (clean)
- ./.claude/hooks-pre-tool-validate.exe を rebuild
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 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: 1d1997f6-02c3-4b82-8ab0-adcdf240666d

📥 Commits

Reviewing files that changed from the base of the PR and between a3f4abc and 7b57515.

📒 Files selected for processing (3)
  • .claude/custom-lint-rules.toml
  • .markdownlint-cli2.jsonc
  • src/hooks-pre-tool-validate/src/main.rs

📝 Walkthrough

Walkthrough

3つのファイルのドキュメント参照を更新。docs/todo.mdへの言及を削除し、PR #88およびADR-018参照に置き換える。ロジックまたは設定値の変更なし。

Changes

Cohort / File(s) Summary
Documentation and Message Updates
.claude/custom-lint-rules.toml, .markdownlint-cli2.jsonc, src/hooks-pre-tool-validate/src/main.rs
ドキュメント参照とユーザー向けメッセージのテキストを更新。docs/todo.mdへの参照を削除し、PR #88とADR-018参照に置き換え。機能的な変更なし。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 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 プルリクエストのタイトルは、変更内容の主要な目的を正確に反映しています。docs/todo.md への参照を非ドキュメントファイルから削除するという、このPRの中核となる変更を明確に述べています。
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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@aloekun aloekun merged commit 3d46cd5 into master Apr 29, 2026
1 check passed
@aloekun aloekun deleted the fix/stale-todo-refs branch April 29, 2026 15:09
aloekun added a commit that referenced this pull request May 9, 2026
…必須 follow-up (順位 91 + 92 + 93) (#135)

* feat(cli-finding-classifier, cli-push-runner): Bundle i — Phase d 着手前必須 follow-up (順位 91 + 92 + 93)

PR #132 (Phase c MVP land) の post-merge-feedback で採用された 3 件を 1 PR にまとめて land。

## 順位 91 (Tier 2 #4): [lint_screen] config parse test
- src/cli-push-runner/src/config.rs に 5 tests を追加
- silent field rename / 追加で None fallback する failure mode を unit test で防止
- full fields / minimal only enabled / absent yields None / numeric defaults / string defaults の 5 軸独立検証

## 順位 92 (Tier 2 #5): scale-aware eval fixtures (200+ 行)
- eval13-large-refactor-real.diff (5 file / 280 行) — context 限界 + JSON 完全性
- eval14-mid-mixed.diff (3 file / 153 行) — mid-scale recall 安定性
- eval15-syntax-stress.diff (1 file / 208 行) — 単 file 長尺の schema 完全性
- lint-screen-evals.json に id 13/14/15 baseline (auto_fix lane × 13 findings 合計) 追加
- count test を rename + 上限緩和 (eval_set_loads_and_has_at_least_phase_b_prime_baseline_count)
- Bundle i 実体スモーク test (eval_set_includes_bundle_i_scale_aware_fixtures) 追加

### dogfood 結果 (mistral:7b / temperature=0)

agreement = 11/15 = 73.3% (Phase b' 75% から marginal 劣化 = fixture が設計通り failure mode を再現)

eval13 (280 行): JSON parse error 'missing field screen_decision' → fallback path 作動
  = PR #132 smoke (868 行 diff) で観測した failure mode を decisive に再現
eval15 (208 行): JSON parse error 'missing field severity at line 38'
  = nested field omission の別 failure mode を新規捕捉
eval14 (153 行): JSON 完全だが recall 33% (3 baseline 中 1 件のみ TP)

aggregate precision=76.2% recall=51.6% latency p50=4591ms p95=8370ms verdict CONDITIONAL-GO

agreement < 75% 未達理由は eval13/15 の fallback (= fixture が設計通り作動した結果) で
mechanical に説明可能。Phase d 投入前の必須 measurement を取得 (todo6.md L164 「未達理由が
文書化される」branch を満たす)。§8.D v4 prompt 改訂は別 bundle に切り出し。

## 順位 93 (Tier 3 #8): coding-style.md partial fix anti-pattern codify
- ~/.claude/rules/common/coding-style.md § Cross-File Reference Lifecycle に
  「変更差分外への partial fix 再発」anti-pattern を追加
- PR #94 / #111 / #132 を inline cite (実証ベース)
- family_tag を grep -rn で全 path 検索する対処手順、partial fix の意図的切り出しを明記

## Phase d 着手の前提条件 update

Bundle i land で以下が揃った:
- (a) [lint_screen] config silent failure 防止 (順位 91)
- (b) scale-aware fixtures による failure mode の reproducible measurement (順位 92)
- (c) cross-file partial fix anti-pattern の global rule 化 (順位 93)

次は §8.D v4 prompt 改訂で大規模 diff の JSON 完全性を改善するループ (Phase d 着手前の最終 gate)。

* fix(cli-finding-classifier): CodeRabbit Major #r3213115045 — eval count 下限を Bundle i baseline 15 に固定

>=12 だと既存 fixture 削除を検出できないため >= 15 に変更し regression 防止。
将来の fixture 追加 (>15) は許容。
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