Skip to content

docs: ADR-038 textual fix + Bundle f task registration (post-PR #120 follow-up)#121

Merged
aloekun merged 1 commit into
masterfrom
feat/adr-038-textual-fix-bundle-f-registration
May 7, 2026
Merged

docs: ADR-038 textual fix + Bundle f task registration (post-PR #120 follow-up)#121
aloekun merged 1 commit into
masterfrom
feat/adr-038-textual-fix-bundle-f-registration

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented May 7, 2026

Summary

PR #120 (ADR-038 Phase 5 land) の事後整理を 1 PR に集約 (docs-only):

  1. ADR-038 line 61 textual fix (docs/local-llm-offload-analysis.md §8.C 該当): confidence=0.0action_confidence=0.0 に統一。実装の ClassifiedFinding.action_confidence schema 名称との整合
  2. PR feat(cli-pr-monitor): cli-finding-classifier 統合 + Finding C strict (ADR-038 Phase 5) #120 post-merge-feedback の採用 5 件登録 (Bundle f): cli-pr-monitor の wakeup state 遷移 / auto-retry path に関する dogfood signals
  3. docs/local-llm-offload-analysis.md の更新: §7 実装進捗ログ + §8 LANDED マーク + 優先度表現の中立化

Bundle f の内訳 (採用 5 件)

順位 Tier タスク Effort
80 🚀 Tier 1 rate-limit auto-retry wakeup 予約ロジック整理 M
81 🚀 Tier 1 CR 投稿エラー (Failed to post review comments) auto-retry 拡張 M
82 💎 Tier 3 ADR-018 update (transient failure auto-retry 設計の明文化) S
83 🔧 Tier 2 複合 AND guard の各条件を独立テストで検証 S
84 💎 Tier 3 code-review.md に「early-return guard テスト分離」checklist 追記 XS

運用方針: Bundle f は新規フィードバックのため、頻度が確認できるまで優先度は再観測を経て判断する (新規 = 即優先しない方針、本セッションで明文化)。

設計のポイント

  • docs-only PR (ADR-035 適用): コード変更なし、機能影響なし
  • B-2 削除: docs/local-llm-offload-analysis.md §8 から「B-2. Bundle f」エントリを削除し、Bundle f を「優先タスク」ではなく「記録 + 後日評価」の位置づけに変更
  • §7 prioritization 表現削除: 「先行 land を推奨」を削除し中立的な記録に書き換え

検証結果

  • quality_gate (lint/test/build/rust-test): PASS
  • takt pre-push-review: APPROVE (3 iter, 10m 15s、convergence_verdict: fully_resolved)
  • F-001 (typo) は本 PR 中で resolution 確認

scope 外 (本 PR では未対応)

  • Bundle f 自体の実装 (順位 80-84) は別 PR (頻度評価後に着手)
  • 提案 1 (lint screen facet, §8.E) / 提案 3 (PR body draft, §8.F) — 別途検討

Test plan

関連

Summary by CodeRabbit

  • Documentation
    • ローカルLLMを使用したFinding分類とissue要約正規化に関するアーキテクチャ設計ドキュメント(ADR-038)を追加
    • Phase 5実装状況と拡張計画に関する技術ドキュメントを更新
    • 今後の開発タスク計画(rate-limit対応、エラーハンドリング強化など)を整理

…follow-up)

PR #120 (ADR-038 Phase 5 land) の事後整理を 1 commit に集約 (docs-only):

1. ADR-038 line 61 textual fix (`docs/local-llm-offload-analysis.md` §8.C)
   - `confidence=0.0` → `action_confidence=0.0` に統一
   - 実装の `ClassifiedFinding.action_confidence` schema 名称との整合
   - 機能影響なし、永続 ADR の内部一貫性確保

2. PR #120 post-merge-feedback の採用 5 件を登録 (Bundle f)
   - 順位 80 (Tier 1, Bundle f): rate-limit auto-retry wakeup 予約ロジック整理
   - 順位 81 (Tier 1, Bundle f): CR 投稿エラー auto-retry 拡張
   - 順位 82 (Tier 3, Bundle f): ADR-018 update (transient failure auto-retry)
   - 順位 83 (Tier 2, 独立): 複合 AND guard 独立テスト
   - 順位 84 (Tier 3, 独立): code-review.md checklist 追記
   - 詳細エントリは docs/todo5.md 末尾、priority table は docs/todo.md
   - Bundle f は新規フィードバックのため、頻度が確認できるまで優先度は再観測を経て判断

3. docs/local-llm-offload-analysis.md の更新
   - §7 (実装進捗ログ) に Phase 5 land 記録 + Bundle f cross-reference 追加
   - §8 (次の作業候補) で A/B を ✅ LANDED にマーク
   - 「先行 land を推奨」等の prioritization 表現を削除し、頻度未確定の新規フィードバックを優先しない方針を明記
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 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: 12809cff-9372-4bfd-973b-6bf8c96f267e

📥 Commits

Reviewing files that changed from the base of the PR and between 3b6a847 and f435914.

📒 Files selected for processing (4)
  • docs/adr/adr-038-local-llm-finding-classification.md
  • docs/local-llm-offload-analysis.md
  • docs/todo.md
  • docs/todo5.md

📝 Walkthrough

Walkthrough

このPRは、ローカルLLM(Ollama)を用いたFinding分類機能の設計(ADR-038)と、その統合実装内容、および関連する後続タスク・エッジケース対応を記録する4つのドキュメントの更新である。

Changes

ローカルLLMオフロード機能の設計・実装・追跡ドキュメント

Layer / File(s) Summary
アーキテクチャ決定
docs/adr/adr-038-local-llm-finding-classification.md
Ollama API クライアント、Finding 分類器 CLI、失敗時フォールバック仕様を定義。action_confidence=0.0 の統一表記によりスキーマ整合性を明確化。
実装統合・観測分析
docs/local-llm-offload-analysis.md
PR #120(Phase 5)の実装詳細(cli-pr-monitor への classifier subprocess 統合、Finding C 正規化の strict 化)と、dogfood 期間に検出された post-pr-monitor edge case を記録。次の作業候補を LANDED 扱いに更新。
タスク優先順位・計画
docs/todo.md, docs/todo5.md
Bundle f(rate-limit auto-retry 整理、CR 投稿エラー retry 拡張、ADR-018 更新、テスト分離、ガイドライン追記)の 5 タスクを推奨実行順序表に登録。詳細な実装期待値・完了基準を todo5.md に追記。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 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 PRのタイトルは「docs: ADR-038 textual fix + Bundle f task registration (post-PR #120 follow-up)」であり、変更の主要な内容(ADR-038のテキスト修正とBundle fタスク登録)を明確に伝えており、ドキュメント更新のみの性質とも合致している。
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.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 6640dc7 into master May 7, 2026
1 check passed
@aloekun aloekun deleted the feat/adr-038-textual-fix-bundle-f-registration branch May 7, 2026 04:48
aloekun added a commit that referenced this pull request May 7, 2026
…ow-up) (#122)

PR #121 post-merge-feedback の採用 4 件 (Bundle g) 登録 + §8.A-2 (Phase 5 dogfood 計測計画) 策定を 1 commit に集約 (docs-only):

1. Bundle g 採用 4 件登録 (順位 85-88、PR #121 post-merge-feedback)
   - 順位 85 (Tier 1): cli-pr-monitor monitor state machine guard 強化 (`review_state: not_found && findings: []` を pending 据置)
     → 3 PR 連続観測 (PR #119/#120/#121) で頻度確認済 Tier 1 妥当性確定
   - 順位 86 (Tier 2): state transition test 網羅 (順位 85 の回帰テスト)
   - 順位 87 (Tier 3): Multi-PR chaining ベストプラクティス codify
     → PR #119#120#121 の連鎖を再利用可能化
   - 順位 88 (Tier 3): edge case 観測頻度 3 = Tier 1 昇格基準 codify
     → ユーザー方針 (新規フィードバックは頻度確認後優先) を明文化
   - 詳細エントリは docs/todo5.md 末尾、bundle commentary は docs/todo.md
   - Bundle f (順位 80-82) との関係: f = retry logic、g = verdict logic で別軸

2. §8.A-2 Phase 5 dogfood 計画 策定 (docs/local-llm-offload-analysis.md)
   - ADR-038 §試験運用→本採用の未達条件 1 (5 PR dogfood) + 3 (token 削減確認) を達成する計画
   - 構成: P-0 (config opt-in) + P-1〜P-5 (Tier 1 タスク優先で 5 PR)
   - Setup 手順 / 計測手順 / 判定基準 / 既知の注意事項 / session 跨ぎ運用ガイドを self-contained 形式で記載
   - 別セッションで再開可能な構造 (本 doc 1 ファイルで全手順把握可)

3. 整合更新
   - §7 § 効果実測の現状 を §8.A-2 参照に更新 (「未測定」を明示)
   - §8.E dependency を §8.A-2 完了 + 判定基準達成にリンク
aloekun added a commit that referenced this pull request May 7, 2026
…g + transition matrix tests (順位 85+86 / Bundle g-1) (#125)

§A-2 Phase 5 dogfood P-1 (Bundle g-1)。3 PR 連続観測 (PR #119/#120/#121) で
発覚した monitor の誤 approved 判定を fix。

順位 85 (Tier 1, T1-1):
- compute_verdict() に review_state guard 追加。CodeRabbit が未投稿
  (review_state: not_found) もしくは進行中 (pending) のときは findings
  の有無に関わらず判定保留。空 findings を 'no problems' と誤同一視する
  false negative を防止。

順位 86 (Tier 2, T2-4):
- mod tests に (action, review_state, findings) → verdict transition
  matrix を 12 unit test で網羅:
  - parked_rate_limit / parked_review_recheck (action 優先)
  - not_found + 空 / pending + 空 / not_found + findings (順位 85 fix)
  - success + 空 / minor / critical / high / major
  - skipped (skip_coderabbit 経路)
  - coderabbit field None (初期 state)
- 既存 should_resume_wakeup_* テスト 7 件と並存、no regression

build + deploy 済 (.claude/cli-pr-monitor.exe を release build で再生成)。
aloekun added a commit that referenced this pull request May 29, 2026
…der + facet P-1 fix (ADR-031) (#184)

* docs(todo): PR #183 post-merge-feedback 採用 3 件 (順位 170-172、Bundle DG-RULES)

採用: PR #183 post-merge-feedback Tier 3 #1/#2/#3 (2026-05-29 ユーザー承認):
- 順位 170 (T3-#1): git-workflow.md § Multi-PR chaining 拡張 — 1 PR 内 multi-commit + intent 明記
  Frequency High (PR #119/#120/#121 + #183 の 4 観測)、~/.claude/ global 編集、派生プロジェクトへ自動波及
- 順位 171 (T3-#2): docs-governance.md に Operational vs Pointer reference 区別 section 追加
  本 PR (#183) A01 修正で実適用した判定ロジックを codify、Bundle DG-RULES
- 順位 172 (T3-#3): CR ephemeral artifact Nitpick の統一 skip 基準を新 memory に codify
  本 PR で実施した Nitpick skip 判断 codify、Bundle DG-RULES、本リポジトリ専用

171 + 172 は Bundle DG-RULES として同 PR land 推奨 (docs/rule + memory の 2 層補強)。

メタ評価: 3 採用候補すべてが本セッション (#181-#183 chain) の dogfood で実体観測された
行動パターンの codify — Phase B 設計の self-reinforcing detection loop が機能した実例。

実装時の前提:
- 170/171 は ~/.claude/ global 編集のため feedback_global_config_backup 適用必須
- 172 は ~/.claude/projects/.../memory/ 編集、本リポジトリ専用 (派生展開なし)

* docs(todo): 順位 173 (S01) 追加 — PR #182 dry-run の combine_output dead-code finding

* feat(phase-c): /weekly-review skill + SessionStart hook reminder + facet P-1 fix (ADR-031 Phase C)

ADR-031 Phase C を実装。Phase B (PR #182) で land した takt workflow weekly-review を
オーケストレートする skill と、~7 日経過 / failed marker 残存時に additionalContext で
promote する SessionStart hook reminder + PR #182 pre-push P-1 finding (facet report_path
drift) の修正を bundle。

Component A: skill /weekly-review (本リポジトリ内では非追跡、~/.claude/skills/weekly-review/SKILL.md として配置)
  - Phase 0: pending JSON 先読み + failed marker 検出 (resume / new run 判別)
  - Phase 1: pnpm exec takt -w weekly-review 起動 + pre-state 書込
  - Phase 2: Report Directory → .claude/weekly-reviews/<date>.md + pending JSON 構築
  - Phase 3: AskUserQuestion (multiSelect, severity-grouped) で採否一括選択
  - Phase 4: 採用 finding を docs/todo.md 「## 現在進行中」配下に新セクション展開
  - Phase 5: pending JSON consume + last-run timestamp 書込 + failed marker cleanup
  - Phase 6: 完了サマリー表示
  - best-effort 失敗ポリシー (ADR-031 §): .failed marker で次セッション SessionStart promote

Component B: SessionStart hook の weekly_review_reminder sub-feature
  - src/hooks-session-start/src/main.rs に WeeklyReviewReminderConfig 追加
  - 2 nudge 経路: (1) last-run mtime > threshold_days (default 7)、(2) failed marker 残存
  - 両方該当時は 1 nudge にまとめて出力
  - 関数 50 行制約に対応するため build_*_lines helper を分離 (compute_weekly_review_reminder_nudge を 30 行に圧縮)
  - 6 新規 unit test (disabled / 失敗 marker 列挙 / staleness 発火 / failed 発火 / config parse / dir 不在)
  - .claude/hooks-config.toml に [session_start.weekly_review_reminder] section 追加 (enabled = true で opt-in、ADR-039 experimental pattern)

Component C: aggregate-weekly.md の report_path documentation drift (P-1) 解消
  - PR #182 pre-push simplicity reviewer Anomaly 1 (Medium / non-blocking) を Phase C 着手時に対応
  - findings JSON の report_path が指す .claude/weekly-reviews/<date>.md は Phase C skill が
    copy する canonical location である旨を facet instruction で明示
  - skill 未実装 (= Phase B のみ稼働) 時は dead pointer になるが Phase C land 後に realize される
    forward-pointing 記述として位置付けを明文化

ユーザー判断 (2026-05-29):
  - Q1 MVP scope: A (skill + hook + facet fix 3 component を同 PR で land)
  - Q2 failed marker recovery: A (含める、ADR-031 § 失敗ポリシー 完全実装)
  - Q3 Bundle CR-RL 先行: A (Phase C 先行、Bundle CR-RL = 順位 167-169 は別 PR)

Phase D (e2e 検証) / Phase E (試験運用 dogfood) は別 PR で carry-forward、docs/handoff-weekly-review-phase-c-onwards.md § 4 で trackable。

* docs(handoff): Phase B handoff retire + Phase C 以降向け 新規 handoff 作成

Phase B (PR #182) land により handoff-rank-8-weekly-review-phase-b.md の retirement
条件 (本 doc § 11) を満たしたため、Phase C 以降向けの carry-forward doc を
新規作成し、本 doc を物理削除する。

新ファイル: docs/handoff-weekly-review-phase-c-onwards.md
- Phase B 完了状況の summary table (carry-forward 用)
- 7 観点責務 mapping (Phase C/D/E でも適用)
- Phase C/D/E 工程計画 (旧 doc § 4 から carry-forward)
- 重要な設計判断 (旧 doc § 5 + 本セッションでの実証 update)
- Phase C 着手時の memory rule (旧 doc § 7 carry-forward)
- Phase C 着手前提として Bundle CR-RL (順位 167-169) land 推奨

旧ファイル削除: docs/handoff-rank-8-weekly-review-phase-b.md
- 永続価値 (7 観点 mapping、ユーザー判断記録、参照リソース) は新 doc に移管
- 残タスク (Phase C/D/E) は todo-summary.md 順位 8 で trackable + 新 doc § 4
- 永続参照リンクは grep -rn 'handoff-rank-8' で本 doc 自身のみ確認
- docs-governance.md § Retirement Workflow 4 step に整合

* fix(phase-c): CR Major auto-fix — weekly_review_last_run の fail-open 修正 (Missing vs Unreadable 分離) for #184

CodeRabbit Major (auto-fix mandate per memory feedback_review_severity_auto_fix):
src/hooks-session-start/src/main.rs:513 weekly_review_days_since_last_run の
失敗時 Option<u64>::None 経由で fail-open 方針と逆の挙動 (mtime 取得失敗が
staleness ヒット扱い、誤 nudge を毎回生成)。

修正:
- enum WeeklyLastRunState { Missing, ElapsedDays(u64), Unreadable } 導入で
  3 状態を明示分離
- Missing (= 未実行 / 初回) → reminder 発火 (初回利用ナビ)
- ElapsedDays(d) → d >= threshold で発火
- Unreadable (= 権限エラー等) → reminder 抑制 (fail-open、ユーザーを誤通知で煩わせない)

test 追加 (memory feedback_test_dry_antipattern 適用、各 variant 独立):
- weekly_review_staleness_hits_for_missing_state
- weekly_review_staleness_hits_for_elapsed_above_threshold
- weekly_review_staleness_skips_for_elapsed_below_threshold
- weekly_review_staleness_skips_for_unreadable_state (CR finding の fail-open 回帰防止)

検証: cargo test -p hooks-session-start で 58 tests pass (4 new + 54 existing)、
cargo clippy -p hooks-session-start --release -- -D warnings clean。

* fix(phase-c): CR Major M-2 + Minor N-1 auto-fix for #184

CodeRabbit re-review (commit 30f19f5 = 前 fix commit) で post された 2 件を修正:

M-2 (Major, ADR-039 違反): weekly_review_reminder の default を OFF に変更
  - .claude/hooks-config.toml line 36: enabled = true → enabled = false
  - 理由: ADR-039 experimental feature standard pattern (config opt-in 契約) に整合
  - opt-in = repo config で明示 enable する運用、source の default は OFF
  - memory feedback_review_severity_auto_fix 適用 (Major 無条件自動修正)

N-1 (Minor, docs 正確性): handoff doc に failed marker 経路を追記
  - docs/handoff-weekly-review-phase-c-onwards.md line 55-56
  - SessionStart reminder の 2 経路 (7 日経過 + failed marker 検出) を明示記述
  - 実装契約と docs の整合を確保、Phase C 以降の仕様理解ずれを構造的に防止

検証: cargo test -p hooks-session-start 全 58 tests pass (binary 変更なし、config のみ)、
markdownlint clean。
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