docs(pipeline+adr): Bundle a 拡張 (#D-1 + #D-3 統合) + ADR-034 起案#100
Conversation
PR #99 セッション末のユーザー判断を反映: - 旧 Bundle Z2 (#D-1 + #D-4) を再構成 - #D-1 (gh CLI 規則) + #D-3 (check-ci-coderabbit --list-findings) を Bundle a に統合 - #D-2 は #D-3 で代替のため取り下げ - #D-4 は思考連続性低下リスクで保留 (Bundle Z Phase 2/3 完了後に再評価) 更新内容: docs/pipeline-token-efficiency.md: - #D-1〜#D-4 の status マーキング - 採用判定 table 改訂、Bundle 編成 table で Bundle Z2 retire + Bundle a 追加 - 期待効果 table の二段化 (#D-1+#D-3 と #D-4 保留) - 統合効果試算改訂、進捗管理 table の status 更新 docs/todo.md: - 順位 44 (#D-1) + 順位 45 (#D-3) を推奨実行順序サマリーに追加 - Bundle a 戦略段落を 2 Sub-PR 分割に拡張 docs/todo4.md: - 2 entry 追加 (ADR-033 template 準拠、別セッション実装の前提情報を網羅) docs/adr/adr-034-coderabbit-auto-monitoring.md (新規): - CodeRabbit 監視・対話の自動化戦略 - 別セッション実装を前提に「実装に必要な情報」セクションで関連コンポーネント / ADR / memory / todo entry を一括参照 - #D-4 再評価条件と Bundle a 着手時の reality check も明記 CLAUDE.md: - ADR-034 リンクを Architecture Decisions リストに追加 別セッションで Bundle a の Sub-PR 1 (#D-1 + #D-3) → Sub-PR 2 (cli-pr-monitor rate-limit auto-retry + ADR-018 改訂) の順で実装する想定。
📝 WalkthroughWalkthroughPR は ADR-034(CodeRabbit 監視・対話の自動化戦略)を新規定義し、rate-limit 自動検出・再トリガー、token 削減対策、 ChangesADR-034 と実装計画の統合
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (4)
docs/adr/adr-034-coderabbit-auto-monitoring.md (2)
95-101: ⚡ Quick winJSON schema の具体例が有用
--list-findingsの出力 JSON schema 例 (lines 95-101) は実装の明確化に貢献しています。この schema が context snippet 3 (src/cli-pr-monitor/src/state.rs のupdate_state_from_check_result) で消費される際、rate_limit_unlock_atやscheduled_retry_postフィールドも同 JSON に含めるべきかを明記すると、Sub-PR 1 と Sub-PR 2 の API contract が明瞭になります。現状の schema 例には findings 配列のみですが、実装セクション (lines 77-79) で言及されている rate-limit 関連フィールドが含まれるかどうかが不明です。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/adr/adr-034-coderabbit-auto-monitoring.md` around lines 95 - 101, The JSON example for `--list-findings` only shows a findings array but omits the rate-limit fields consumed by update_state_from_check_result; update the example JSON (the block at lines 95-101) to include top-level optional fields rate_limit_unlock_at and scheduled_retry_post (with their expected types/format, e.g. ISO8601 timestamp or null) so the API contract between the CLI and src/cli-pr-monitor/src/state.rs::update_state_from_check_result is explicit; mention in the doc that these fields are optional and how they are interpreted by update_state_from_check_result.
77-79: ⚡ Quick winSchema 拡張フィールド名の不整合を確認
ADR では
rate_limit_unlock_at(ISO 8601) とscheduled_retry_post(bool) の追加を記述していますが、context snippet (src/cli-pr-monitor/src/state.rs) には既存のrate_limit_last_retriggered_atが確認できます。新フィールドが既存のrate_limit/rate_limit_retries/rate_limit_last_retriggered_atとどう共存するか、実装時の整合性を確保するため、context snippet 1 の既存スキーマとの統合方針を本セクションに明記することを推奨します。例: 「
rate_limit_unlock_atはRateLimitState構造体内に追加するか、PrMonitorStateの top-level フィールドとして追加するかを実装時に確定」等の補足があると、実装者が迷わずに済みます。Based on learnings: context snippet 1 shows existing rate-limit tracking fields in PrMonitorState and RateLimitState structs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/adr/adr-034-coderabbit-auto-monitoring.md` around lines 77 - 79, The ADR mentions adding `rate_limit_unlock_at` and `scheduled_retry_post` but doesn't explain how they coexist with existing fields like `rate_limit`, `rate_limit_retries`, and `rate_limit_last_retriggered_at` seen in src/cli-pr-monitor/src/state.rs; update the ADR section to explicitly state the chosen integration strategy (e.g., whether `rate_limit_unlock_at` will be added into the existing `RateLimitState` struct or as a top-level field on `PrMonitorState`, and how `scheduled_retry_post` maps to retry logic and `rate_limit_retries`), reference the exact symbols `RateLimitState`, `PrMonitorState`, `rate_limit_last_retriggered_at`, `rate_limit_retries`, `rate_limit_unlock_at`, and `scheduled_retry_post`, and include a short note describing expected invariants and migration/compatibility behavior for existing state files.docs/todo4.md (2)
435-436: ⚡ Quick winSession 超え recovery 機構選定の検討ポイントが適切
「詰まっている箇所」で session 超え auto-trigger の機構選定 (cli-pr-monitor 自身の long sleep vs SessionStart hook recovery) を挙げていますが、ADR-034 (lines 75-81) では SessionStart hook recovery を前提とした設計になっています。
この「詰まっている箇所」記載は実装時の最終確認として有用ですが、ADR-034 が既に方針を示している点を明記すると、着手時の迷いが減ります。例: 「ADR-034 では SessionStart hook 経由の recovery を推奨しているが、実装時に運用パターンを再評価」等。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/todo4.md` around lines 435 - 436, Update the note about session-over auto-trigger decisions to state ADR-034 prefers SessionStart hook-based recovery (i.e., use SessionStart hook + state file for recovery) while still keeping the original evaluation step — mention cli-pr-monitor long-sleep vs SessionStart hook as an implementation-time re-evaluation and reference existing rate-limit logic (handle_rate_limit_retry / PR `#97` Phase 4) for considering extension vs replacement.
421-421: ⚡ Quick winSchema 拡張フィールドの記載を確認
Line 421 で
.claude/cli-pr-monitor-state.jsonschema 拡張としてrate_limit_unlock_at, scheduled_retry_post 等を言及していますが、ADR-034 (line 77-79) ではrate_limit_unlock_at(ISO 8601) とscheduled_retry_post(bool) が明記されています。「等」という表記が他のフィールドも追加する可能性を示唆していますが、ADR-034 では 2 フィールドのみです。実装時の混乱を避けるため、「等」を削除して具体的なフィールド名のみを列挙することを推奨します。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/todo4.md` at line 421, Update the TODO line to remove the vague "等" and explicitly list only the two fields defined in ADR-034: rate_limit_unlock_at (ISO 8601) and scheduled_retry_post (bool) for the `.claude/cli-pr-monitor-state.json` schema so the item matches ADR-034 and avoids implying additional unspecified fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/adr/adr-034-coderabbit-auto-monitoring.md`:
- Around line 95-101: The JSON example for `--list-findings` only shows a
findings array but omits the rate-limit fields consumed by
update_state_from_check_result; update the example JSON (the block at lines
95-101) to include top-level optional fields rate_limit_unlock_at and
scheduled_retry_post (with their expected types/format, e.g. ISO8601 timestamp
or null) so the API contract between the CLI and
src/cli-pr-monitor/src/state.rs::update_state_from_check_result is explicit;
mention in the doc that these fields are optional and how they are interpreted
by update_state_from_check_result.
- Around line 77-79: The ADR mentions adding `rate_limit_unlock_at` and
`scheduled_retry_post` but doesn't explain how they coexist with existing fields
like `rate_limit`, `rate_limit_retries`, and `rate_limit_last_retriggered_at`
seen in src/cli-pr-monitor/src/state.rs; update the ADR section to explicitly
state the chosen integration strategy (e.g., whether `rate_limit_unlock_at` will
be added into the existing `RateLimitState` struct or as a top-level field on
`PrMonitorState`, and how `scheduled_retry_post` maps to retry logic and
`rate_limit_retries`), reference the exact symbols `RateLimitState`,
`PrMonitorState`, `rate_limit_last_retriggered_at`, `rate_limit_retries`,
`rate_limit_unlock_at`, and `scheduled_retry_post`, and include a short note
describing expected invariants and migration/compatibility behavior for existing
state files.
In `@docs/todo4.md`:
- Around line 435-436: Update the note about session-over auto-trigger decisions
to state ADR-034 prefers SessionStart hook-based recovery (i.e., use
SessionStart hook + state file for recovery) while still keeping the original
evaluation step — mention cli-pr-monitor long-sleep vs SessionStart hook as an
implementation-time re-evaluation and reference existing rate-limit logic
(handle_rate_limit_retry / PR `#97` Phase 4) for considering extension vs
replacement.
- Line 421: Update the TODO line to remove the vague "等" and explicitly list
only the two fields defined in ADR-034: rate_limit_unlock_at (ISO 8601) and
scheduled_retry_post (bool) for the `.claude/cli-pr-monitor-state.json` schema
so the item matches ADR-034 and avoids implying additional unspecified fields.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 516187b6-3213-425d-8875-e425e4d715e0
📒 Files selected for processing (5)
CLAUDE.mddocs/adr/adr-034-coderabbit-auto-monitoring.mddocs/pipeline-token-efficiency.mddocs/todo.mddocs/todo4.md
…101) * docs(todo): Bundle a Sub-PR 2 integration test entry + 順位 46 を実行順序に追加 PR #100 post-merge-feedback で生成された Sub-PR 2 follow-up エントリを反映: - 順位 46 を docs/todo.md 推奨実行順序に追加 (Bundle a Sub-PR 2 integration test) - docs/todo4.md に詳細エントリ追加 (cli-pr-monitor rate-limit auto-retry の test 計画) 設計根拠は ADR-034 参照。実装は Sub-PR 2 で着手予定。 * feat(check-ci-coderabbit): --list-findings Rust モード追加 (Bundle a Sub-PR 1 #D-3) ADR-034 Bundle a Sub-PR 1 の token 削減層。CodeRabbit インラインレビュー コメントを構造化 JSON `{"findings": [...]}` で出力する新モードを追加する。 - CliArgs に `--list-findings` フラグ + `--push-time` の epoch 0 fallback - ListedFinding struct (severity / file / line / summary / url) + 出力 envelope - parse_listed_findings: thread root のみ抽出 + `resolved:` reply による outdated filter - GhPullComment に id / in_reply_to_id / html_url を拡張 - run_list_findings: CI / rate-limit / status check を skip して findings のみ取得 - 単体テスト 16 件追加 (resolve filter / push_time / 非 CR 著者 / schema 検証 等) Sub-PR 2 (cli-pr-monitor の rate-limit auto-retry) で本 API を消費する想定。 gh CLI 規則 (#D-1) は global rule (~/.claude/rules/common/git-workflow.md) に 追記済 (リポ外)。 * fix(review): apply CodeRabbit fixes for #101 Resolved findings: - [Minor] src/check-ci-coderabbit/src/main.rs:666 `push_time` 境界を inclusive に揃えてください。 - [Major] src/check-ci-coderabbit/src/main.rs:1197 取得失敗を空配列に潰さないでください。
Summary
docs/pipeline-token-efficiency.mdの #D セクション全体に status マーキング、Bundle 編成 / 期待効果 / 進捗管理 table を改訂docs/todo.md推奨実行順序サマリーに 順位 44 (#D-1) + 順位 45 (#D-3) を追加、Bundle a 戦略段落を 4 component / 2 Sub-PR 分割に拡張docs/todo4.mdに 2 詳細 entry 追加 (ADR-033 template 準拠、別セッション実装の前提情報を網羅)Context
.claude/feedback-reports/99.mdの Tier 2 fix(hooks): Replace matcher追加 & deploy時のpermissions保持 #4 + Tier 3 refactor(deploy): 出力先へのテンプレート配布を廃止 #5 採用、ユーザー将来希望「rate-limit 確認 + 再 review 依頼 + ポーリング全自動化」、本セッションで実施した 4 シナリオ ユーザーストーリー検討Validation
verdict=APPROVE(1 iteration / 1m 40s, 2026-05-02 16:48 JST)順位 N表記なし)References
docs/pipeline-token-efficiency.md#D セクション (採用判定改訂).claude/feedback-reports/99.mdTier 2 fix(hooks): Replace matcher追加 & deploy時のpermissions保持 #4 / Tier 3 refactor(deploy): 出力先へのテンプレート配布を廃止 #5 (本 PR の起源)project_coderabbit_rate_limit_overlay.md(PR feat(hooks): Bundle Z Phase 1 - Rust comment lint hook + 計画書再編 #99 で実証された walkthrough overlay 仕様、本 ADR の検出ロジック根拠)Summary by CodeRabbit
リリースノート