Skip to content

docs(todo): 順位 147/151/212/213/214 削除 (land 済) + weekly_review_reminder enable - #216

Merged
aloekun merged 1 commit into
masterfrom
cleanup-stale-todo-weekly-enable
Jun 22, 2026
Merged

docs(todo): 順位 147/151/212/213/214 削除 (land 済) + weekly_review_reminder enable#216
aloekun merged 1 commit into
masterfrom
cleanup-stale-todo-weekly-enable

Conversation

@aloekun

@aloekun aloekun commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

3 PR 計画 (PR-1 → PR-3 → PR-2) の 1 件目。Stale entry の棚卸しと weekly review reminder の試験運用元 enable を一括して実施。

削除エントリ (5 件、land 状況検証済)

順位 タスク Land PR ファイル
147 File length lint (800 行 max) #202 docs/todo9.md
151 PR diff lines check (pr_size_check stage) #202 docs/todo9.md
212 PowerShell dispatch + powershell-destructive-write-block preset #215 docs/todo10.md
213 parse_coderabbit_status API ordering test #215 docs/todo10.md
214 parse_actionable_comments 境界条件 test #215 docs/todo10.md

各エントリは docs/todo-summary.md の table row + 対応する詳細 entry の両方を削除。grep による実装確認で全て land 済であることを検証 (e.g. find_file_length_violations in hooks-post-tool-comment-lint-rust, cr_status_reverse_chronological_picks_first test in check-ci-coderabbit/src/parsers.rs)。

保持 (誤判定を救出)

Weekly review reminder enable の根拠

.claude/weekly-review-last-run.jsonlast_run_at = 2026-06-01T10:11:00Z で最終実行から 22 日経過。ADR-031 § Phase E 観測でも「SessionStart reminder は実発火していない」と記録されており、design 通りの silent state が継続していた。

ADR-039 § 1 opt-in 契約 (default OFF) は派生プロジェクト deploy 時の規範であり、試験運用元 (= 本リポジトリ) で本採用後の機能を意図的に enable することは矛盾しない。本変更で SessionStart hook が 7 日経過時 + .failed marker 検出時に additionalContext で /weekly-review を促すようになる。

PR 計画における位置

3 PR plan:

  1. 本 PR (PR-1): 即時 cleanup + reminder enable (XS、本 PR)
  2. PR-3: Layered config ([features].enabled allow-list pattern) + ADR-039 amendment + lib-hooks-config 抽出 (M-L)
  3. PR-2: Stop hook での todo cleanup check 追加 (M、structural fix for stale entry 再発防止)

PR-3 で本 PR の enabled = true[features].enabled allow-list 登録に置き換わる予定。

Test plan

  • grep -nE "^\| (147|151|212|213|214) " docs/todo-summary.md で table row が削除されていることを確認 (0 hits)
  • grepdocs/todo9.md / docs/todo10.md から該当 detail entry が消えていることを確認
  • grep "Defensive State Reset" ~/.claude/rules/common/coding-style.md で順位 215 が未実装であることを確認 (保持判断の根拠)
  • hooks-config.tomlweekly_review_reminder.enabled = true + rationale comment block を確認
  • markdownlint clean (PostToolUse hook で各 Edit ごとに確認、0 errors)
  • pre-push pipeline all approved (5m 49s、.takt/runs/20260622-183348-pre-push-review 参照)

既知 out-of-scope

  • docs/todo9.md:258,275,282 に順位 154 (review-todo-whole facet) の content 内で「順位 147」cross-reference が 3 箇所残存。順位 154 着手時または PR-3 で整理推奨 (現時点では設計意図参照として valid)

Summary by CodeRabbit

リリースノート

  • 新機能

    • 週次リマインダー機能を有効化しました。
  • Chores

    • ドキュメント構成を整理・最適化しました。

…er enable

5 entries の stale cleanup と weekly review reminder の試験運用元 enable。

## Stale entry cleanup (5 件)

PR #202 / #215 で land 済だが docs/todo*.md に entry が残存していた
タスクを削除:
- 順位 147 (File length lint, todo9.md) — PR #202
- 順位 151 (PR diff lines check, todo9.md) — PR #202
- 順位 212 (PowerShell dispatch, todo10.md) — PR #215
- 順位 213 (parse_coderabbit_status test, todo10.md) — PR #215
- 順位 214 (parse_actionable_comments test, todo10.md) — PR #215

順位 215 (coding-style.md "Defensive State Reset" section 追加) は
PR #215 で todo entry を追加しただけで実装は未着手のため保持。
grep "Defensive State Reset" ~/.claude/rules/common/coding-style.md
で実体確認済。

## weekly_review_reminder の試験運用元 enable

.claude/hooks-config.toml [session_start.weekly_review_reminder] を
enabled = false → true に変更。

ADR-031 (週次レビュー pipeline) は 2026-06-01 に本採用化済みだが、
Phase E 観測で「reminder は実発火していない」状態が継続し最後の実行から
21 日経過 (2026-06-01 → 2026-06-23) していたため、試験運用元では明示的に
enable する運用に切替。派生プロジェクト deploy 時の default は
ADR-039 § 1 opt-in 契約に従い OFF 維持。

本変更は PR-3 (layered config: [features].enabled allow-list 移行) で
真の opt-in 切り替えになるまでの暫定。toml に rationale comment block を
明記済み。

## PR 計画における位置

PR-1 (本 PR) → PR-3 (layered config) → PR-2 (Stop hook todo cleanup check)
の 3 PR plan の 1 件目。PR-3 で本 PR の `enabled = true` は
`[features].enabled` allow-list 登録に置き換わる。
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

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: 84f91925-f880-4122-8eea-03c38d8b702d

📥 Commits

Reviewing files that changed from the base of the PR and between bddf6f2 and 6596319.

📒 Files selected for processing (4)
  • .claude/hooks-config.toml
  • docs/todo-summary.md
  • docs/todo10.md
  • docs/todo9.md
💤 Files with no reviewable changes (3)
  • docs/todo10.md
  • docs/todo-summary.md
  • docs/todo9.md

📝 Walkthrough

Walkthrough

hooks-config.tomlweekly_review_reminderenabled: false から true に切り替えた。合わせて docs/todo9.mddocs/todo10.md から移行済みタスクエントリを計252行削除し、docs/todo-summary.md の優先度表を5行削除・再配置した。

Changes

週次リマインダー有効化と TODO 整理

Layer / File(s) Summary
weekly_review_reminder の有効化
.claude/hooks-config.toml
enabledfalse から true に変更し、運用前提・切替経緯のコメントを追加。
移行済みタスクエントリの削除と優先度表の再配置
docs/todo9.md, docs/todo10.md, docs/todo-summary.md
todo9.md から「File length lint」「PR diff lines check」エントリを削除、todo10.md から powershell-destructive-write-block エントリ(155行)を削除、todo-summary.md の優先度表から対応する5行を削除・再配置。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • aloekun/claude-code-hook-test#184: hooks-config.tomlsession_start.weekly_review_reminder セクションを導入しデフォルト opt-in を設定した PR であり、本 PR の enabled: false → true 切替の直接的な前提となっている。
  • aloekun/claude-code-hook-test#215: 本 PR が docs/todo10.md から削除した powershell-destructive-write-block preset の TODO エントリを実装した PR であり、同一機能領域で直接連動している。
  • aloekun/claude-code-hook-test#173: 本 PR が docs/todo9.md から削除した「File length lint」「PR diff lines check」などの仕組み化バンドル TODO を同じく再編・追跡しており、同一 TODO 内容の移動/整理で直接つながっている。
🚥 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 プルリクエストのタイトルは、主な変更内容(stale todo エントリの削除とweekly_review_reminder の有効化)を具体的に反映しており、変更セットの主要な目的を明確に要約しています。
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.

@aloekun
aloekun merged commit e74fd72 into master Jun 22, 2026
1 check passed
@aloekun
aloekun deleted the cleanup-stale-todo-weekly-enable branch June 22, 2026 18:51
aloekun added a commit that referenced this pull request Jun 23, 2026
… 違反解消) (#217)

* docs(todo): 順位 216-219 採用 (PR #216 post-merge-feedback T1-1/T3-1/T3-2/T3-3)

PR #216 (cleanup-stale-todo-weekly-enable) の post-merge-feedback で 6 提案中
4 件 (T1-1 / T3-1 / T3-2 / T3-3) をユーザー承認 (2026-06-23) し
docs/todo-summary.md + docs/todo10.md に entry 化:

- 順位 216 (🔧 Tier 2、Bundle 216-217): `no-workstream-seq-names-in-config`
  lint rule 追加 — config comment 内 `PR-[0-9]+` ephemeral workstream
  sequence の機械的検出。analyzer Tier 1 分類は memory
  feedback_tier_classification に従い project Tier 2 (mechanical = T2) に再分類。

- 順位 217 (💎 Tier 3、Bundle 216-217): coding-style.md § Cross-File
  Reference Lifecycle に config file comments の permanent artifact 扱い明記 +
  workstream sequence 禁止例追加 (順位 216 の文書層補完、2 層防御)。

- 順位 218 (💎 Tier 3): ADR-039 § Bounded Lifetime + patterns.md に
  provisional `enabled` 変更時の todo entry 必須化を追加
  (config comment-only tracking の silent aging 防止)。

- 順位 219 (💎 Tier 3): development-workflow.md § 設計 doc/実装の同期チェック
  に「commit description 言及 ≠ 実装完了」明文化 (PR #216 cleanup での
  順位 215 救出事例を inline cite、analyzer naïve assumption の構造的予防)。

採用されなかった T2-1 / T2-2 (analyzer cross-check / provisional auto-detect) は
🤔 様子見継続。Frequency Low 初観測 + Effort M + takt test infra 未調査のため、
2 PR 以上の再観測後に Tier 1 昇格を再評価する方針。

ファイル変更:
- docs/todo-summary.md: table に 4 rows 追加 (順位 215 直後、lines 89-92)
- docs/todo10.md: 詳細 entry 4 件追加 ("## 既知課題" 直前、lines 512/568/620/674)

* refactor(hooks): hooks-session-start / hooks-pre-tool-validate / hooks-post-tool-linter を module 分割

3 hook crate の main.rs を coding-style.md § File Organization (800 行 max) 内に収まる module 構成に分割。behavior 不変な mechanical refactor で、各関数の signature / export 関係は維持し、test も co-located mod tests として各 module に分散する。

PR-3 (layered config refactor) の前置 PR (PR-3a)。順位 147 (file_length lint) が PR #202 で land、本 PR-3a で 3 hook の touch-trigger ratchet 違反を解消することで PR-3b (layered config) を clean state で進められる。

対象:
- src/hooks-session-start/src/main.rs (1611 行) → 6-7 module
- src/hooks-pre-tool-validate/src/main.rs (2914 行) → 5-7 module
- src/hooks-post-tool-linter/src/main.rs (3316 行) → 6-8 module

完了基準:
- 全 module ファイルが 800 行以下
- cargo clippy --workspace -- -D warnings clean
- cargo test --workspace pass (behavior 不変)
- PostToolUse comment-lint-rust の file_length lint 0 件

* fix(hooks): takt-fix iter 3 — CR Critical/Major findings 解消 (PR-3a follow-up)

PR #217 (pr3a-hooks-module-split) の CodeRabbit review で検出された
Critical / Major / Minor findings を takt post-pr-review の 3 iter fix で
解消した変更を land。

## 修正内容 (CR severity 別)

### Critical (1 件 / 採用)
- docs/todo10.md: 順位 216 (no-workstream-seq-names-in-config rule) の
  test_coverage 宣言で拡張子カバレッジ欠落と test 命名不一致を修正
  (other_ext_tests に jsonc test を追加、main_ext_tests の test 名を
  TOML schema 規約と整合)

### Major (3 件 / 採用)
- src/hooks-pre-tool-validate/src/todo_staleness.rs: run_jj_with_timeout
  で child stdout をブロッキング待機していたパイプバッファ枯渇デッド
  ロックを修正。spawn_stdout_drainer + poll_child_with_deadline 関数を
  抽出してバックグラウンド drain に変更 (ADR-016 subprocess safety pattern)
- src/hooks-session-start/src/jj_helpers.rs: 同型の deadlock 修正
  (spawn_stdout_drainer + poll_child_with_deadline 抽出)。両 module で
  identical pattern を共有
- src/hooks-session-start/src/reaper.rs: .failed marker の atomic file
  creation を File::create_new() で保証 (TOCTOU window 解消)

### Minor (2 件 / 採用)
- docs/todo10.md: line 532 markdown 引用符の閉じ括弧不一致を修正
- src/check-ci-coderabbit/src/rate_limit.rs + src/hooks-session-start/
  src/reaper.rs: parse_iso8601_to_unix で Z suffix を strip_suffix で
  validate (trim_end_matches では invalid timestamp も accept していた)

### Minor (1 件 / 却下)
- src/hooks-pre-tool-validate/src/config.rs: TODO_STALENESS_DEFAULT_BRANCH
  を "master" → "main" 提案。本リポジトリは master を default branch
  として運用しているため却下。他 module の "main" 参照は aspirational /
  transitional な記述で、本 module の "master" が正しい。

## 検証

- cargo test --workspace: 437 tests pass (本 PR 関連: 71 + 221 + 145、
  rate_limit.rs 周辺は別 crate test で cover)
- cargo clippy --workspace -- -D warnings: clean
- takt post-pr-review: 3 iterations / 39m 32s / approved (structured_output)

* fix(todo): 順位 216 entry の extensions から plain `json` 削除 (CR Critical L530 採用)

CR Critical L530 で「Task 216 の test_coverage 宣言に拡張子カバレッジ欠落」
として指摘された不整合を解消:

- extensions = ["toml", "yaml", "yml", "jsonc", "json"] のうち plain
  `json` は comment 構文を持たず本 rule (`no-workstream-seq-names-in-config`)
  の対象外 = test 未定義状態だった
- jsonc が JSON-with-comments を cover するため json は rule scope から除外
- extensions = ["toml", "yaml", "yml", "jsonc"] に縮小

なお同 thread 内で指摘された「`no_workstream_seq_skips_github_pr_number` が
main_ext_tests.toml に配置されている」点は coverage.rs の実装 (positive/negative
semantic を強制しない、宣言 test 名の存在のみ check) と rule⑫ 既存 pattern
との整合により現状維持。CR Major (path → workspace dep) と CR Minor
(master → main) は rejection 理由を thread reply で記録済。
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