docs(adr): ADR-041 Test Isolation Patterns + 順位 78 placeholder 化 (順位 139 land)#169
Conversation
…lation Patterns for Multi-Condition Guards) 新規追加 PR #168 post-merge-feedback の Tier 3 #2 採用結果として、複合 guard test の test isolation pattern を project-level ADR で codify する task を順位 139 として登録。ADR 番号は順位 135 codified placeholder policy に従い land 時 PR で確定する運用 (現状 ADR-NNN placeholder、PR #120 W-001 + PR #168 の 2 PR 横断 Frequency Medium で採用判断)。
… (順位 139 land) — 順位 78 番号 placeholder 化
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough複合ガード関数のテスト分離パターンを ADR-041 として新規定義し、CLAUDE.md に登録。todo ドキュメント群の ADR 参照を統一し、ADR 番号の hardcode 回避と land 時の採番確定運用方針を明文化しました。 ChangesADR-041 定義と登録
ADR 番号付与プロセスと参照整備
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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 358-369: The checklist heading "#### 作業計画 (本 PR で完了)" is
inconsistent with the unchecked item "- [ ] PR description で
`docs/adr/adr-041-test-isolation-patterns.md` への link ..." — either mark that
checkbox as completed ("- [x]") if the PR description already contains the
link/summary, or change the heading to something like "作業計画 (本 PR での進捗)" to
reflect mixed completion; update the line containing the unchecked item or the
heading accordingly in docs/todo8.md so the checklist state matches the header.
🪄 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: 12320979-1f14-4726-8509-ef4990ababe3
📒 Files selected for processing (5)
CLAUDE.mddocs/adr/adr-041-test-isolation-patterns.mddocs/todo-summary.mddocs/todo5.mddocs/todo8.md
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…_MERGEABLE signal (順位 140 entry 追加) (#170) * docs(todo): 順位 140 新規追加 — PR #169 T3-#2 採用 (順位 135 codified placeholder policy を ADR 昇格) PR #169 post-merge-feedback の Tier 3 #2 採用結果として、順位 135 「ADR 番号 hardcode 撤廃 placeholder policy」を正式 ADR に昇格する task を 順位 140 として登録。PR #111/#132/#169 の 3 PR で適用実証済 (特に PR #169 で 順位 78 が ADR-038 → 041 → NNN の 3 段振り直し dogfood を完了) で、現在は ephemeral todo entry 内の codify 限り = 派生プロジェクトへの transferability 不足を解消する目的。ADR 番号は順位 135 policy 自身に従い ADR-NNN placeholder で登録 (= self-dogfood)、land 時 PR で確定する。 * docs(todo): 順位 141 新規追加 — CR rate-limit detection bug 修正 (shortcut 追加案: fix_push_time 固定 + 早期 merge 判断 signal) PR #169 セッションで systemic 観測された CR rate-limit detection bug を順位 141 として登録。当初案 (defense-in-depth + 4 test) はユーザーから「処理時間が増える可能性」 の指摘を受け、shortcut 追加案 = 主軸 C (fix_push_time 固定) + 早期 merge 判断 signal (mergeable CLEAN なら 5-10 分で人間判断) の 2 機能に絞った最小実装に書き換え。 feedback_pipeline_over_rules.md 適用 = ルール codify ではなくパイプライン側の機械的 修正で Claude 判断介入を排除する原則の最初の実装事例。既存 auto-retry path は維持し、 ユーザーが「待つ」を選んだ場合は通常 flow に合流する設計で、wall clock (rate-limit reset 38 分 + retry 最大 2.5 時間) と手間軽減のバランスを取る。 * feat(cli-pr-monitor): 順位 141 実装 — fix_push_time 固定 + RATE_LIMIT_BUT_MERGEABLE signal (CR rate-limit detection bug 修正)
Summary
~/.claude/rules/common/code-review.mdchecklist (順位 84 land 済 global rule) を project-level rationale + 具体実装例 (poll.rs 2 variant) + history で補完する layer として位置づけ。ADR-NNN (採番未確定)で entry 登録 → 本 PR でADR-041確定取得 → 順位 78 (旧 ADR-041 予約) をADR-NNNに再 placeholder 化 (= 同一 entry がADR-038 → 041 → NNNの 3 段番号変更を経た実証)。Background
PR #120 W-001 で
enrich_with_classifier_skips_when_disabledテストが OR-guard (if !config.enabled || state.findings.is_empty() { return; }) の責務混在 = vacuous assertion 問題 (classified_findingsが空のまま → 早期 return 由来か他経路由来か判別不能) を抱えていた。PR #168 で sentinel pattern + 直交 precondition setup により構造的解決。本 PR は、2 PR 横断で観測された pattern を project ADR として永続化する。global checklist (
code-review.md順位 84) は要件を 1 行で示すが、本 ADR は問題の具体例・設計原則・実装例 (poll.rs 2 variant の抜粋コード)・適用範囲・既存資料との関係を記述し、将来の複合 guard test 実装者が独立して参照できる reference layer になる。Files changed
docs/adr/adr-041-test-isolation-patterns.mdCLAUDE.mddocs/todo-summary.mddocs/todo5.mdADR-NNNに書き戻し + 番号 history コメント追加docs/todo8.md差分規模: +170 / -25 = 145 net 行 (docs-only PR)。
Test plan
grep github.com/aloekun docs/adr/で no match、advisor 指摘の 2 箇所を plain inline code に修正済)~/.claude/rules/common/code-review.mdは plain code text、src/cli-pr-monitor/src/stages/poll.rsは実在 file)Notes
Summary by CodeRabbit