docs(llm-offload): Phase E — ADR-038 採用昇格 + 4 ephemeral 計画書 retire#156
Conversation
Phase A〜D dogfood (累積 6 PR / 9 data points、fallback 11%、verdict variance 3 経路すべて) で ADR-038 採用条件を充足したため試験運用 → 採用へ昇格 (2026-05-15)。docs-governance §Retirement Workflow に従い ephemeral 計画書 4 ファイルを retire、permanent value は ADR-038 + ADR-040 に migrate。
主な変更:
- ADR-038 ステータス: 試験運用 → 採用、採用判定 section (累積 metrics + 実装最終構成 + 実装層選択 cost-aware + Known failure modes 3 件) を追加
- 順位 99 (cost-aware + attention dilution codify) / 順位 126 (hallucinate failure mode codify) を ADR-038 へフォルドイン land
- 4 ファイル削除: docs/local-llm-offload-{analysis,history,phase-d-outcomes,phase-d-guide}.md (計 1431 行 retire)
- ADR-039 (bounded lifetime example) / ADR-040 (analysis.md retire 反映) 更新
- Rust source / config / test fixture / pr-monitor-config.toml の参照を ADR-038 へ更新
- todo8.md に PR #119 marker (~7 日経過 stale) を既知課題として記録 (本 PR scope 外)
検証: cargo check pass / lint_screen_evals 20 pass / md_no_docs_relative 7 pass / markdownlint 0 error
📝 WalkthroughWalkthroughこのPRはADR-038をPhase E完了(2026-05-15)で本採用へ昇格させ、ローカルLLM分類判定の運用仕様を確定します。Ollama連携のリスク、昇格条件、実装構成、既知failure modeを詳細化し、関連ADR・検証スイート・ロードマップの参照体系をADRベース構成に移行する文書更新です。 ChangesADR-038採用昇格とローカルLLM分類の本採用確定
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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. ✨ Finishing Touches📝 Generate docstrings
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.
🧹 Nitpick comments (1)
docs/todo8.md (1)
339-343: ⚡ Quick win
/nonexistent/...前提は cross-platform ではありませんLine 342 の「(c) は Windows でも reliable」という説明は不正確です。
/nonexistent/...依存だと OS ごとに挙動がぶれるため、テスト計画としては「親パスを通常ファイルにしてその配下へ作成を試みる」など、OS 非依存で必ず失敗する注入方法に置き換えるのが安全です。🤖 Prompt for 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. In `@docs/todo8.md` around lines 339 - 343, Update the docs text to remove the claim that option (c) using a "/nonexistent/..." path is reliable on Windows and instead recommend an OS-independent failure injection: create a normal file at the intended parent path (e.g., touch/create a regular file) and then pass a child path under that file as `output_path` so `create_dir_all` must fail; revise the recommendation text replacing "(c) — cross-platform、追加 dep なし、Windows でも reliable" and the related assertion guidance to describe this parent-as-file approach and note that tests should capture `log_stage` output or mock `log_stage`.
🤖 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.
Nitpick comments:
In `@docs/todo8.md`:
- Around line 339-343: Update the docs text to remove the claim that option (c)
using a "/nonexistent/..." path is reliable on Windows and instead recommend an
OS-independent failure injection: create a normal file at the intended parent
path (e.g., touch/create a regular file) and then pass a child path under that
file as `output_path` so `create_dir_all` must fail; revise the recommendation
text replacing "(c) — cross-platform、追加 dep なし、Windows でも reliable" and the
related assertion guidance to describe this parent-as-file approach and note
that tests should capture `log_stage` output or mock `log_stage`.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4ca7b348-1796-4690-8757-dde5354f5991
📒 Files selected for processing (15)
docs/adr/adr-038-local-llm-finding-classification.mddocs/adr/adr-039-experimental-feature-standard-pattern.mddocs/adr/adr-040-local-llm-context-size.mddocs/local-llm-offload-analysis.mddocs/local-llm-offload-history.mddocs/local-llm-offload-phase-d-guide.mddocs/local-llm-offload-phase-d-outcomes.mddocs/todo-summary.mddocs/todo6.mddocs/todo8.mdpr-monitor-config.tomlsrc/cli-finding-classifier/evals/lint-screen-evals.jsonsrc/cli-finding-classifier/tests/lint_screen_evals.rssrc/hooks-post-tool-linter/src/main.rssrc/lib-ollama-client/src/lib.rs
💤 Files with no reviewable changes (5)
- docs/local-llm-offload-history.md
- docs/local-llm-offload-analysis.md
- docs/local-llm-offload-phase-d-guide.md
- docs/local-llm-offload-phase-d-outcomes.md
- docs/todo6.md
…#157) PR #156 (Phase E land) post-merge-feedback で採用判断された 3 件を todo8.md / todo-summary.md に登録。 - 順位 132 (Tier 1, S): lint_screen.rs magic-number 検出ルールで git diff metadata (`similarity index NN%` 等) を FP 除外 既存 順位 130 と root cause 同一、本エントリは「実装側の前処理 filter に確定」した具体策で supersede 可能 - 順位 133 (Tier 3, XS): docs-governance.md §Retirement Workflow に「diff context 由来 false alarm 防止 = grep hit は実ファイル Read で確認」明記 PR #156 で 5 件以上の false alarm を実観測したのが採用根拠 - 順位 134 (Tier 3, S): ADR-035 に docs-only PR 評価の適用外基準リスト追加 (mutation / DRY / YAGNI / function length / test coverage / magic-number 等) ADR-035 の分類基準 vs 適用外基準の空白を埋める、reviewer 誤適用による開発体験劣化を構造的に防止 🤔 様子見の 4 件 (T2 #1 link checker / T2 #2 prompt injection test / T3 #3 OS 非依存 failure injection / T3 #4 Phase 5 injection risk ADR) は本 PR scope 外、Frequency / Phase 進捗で再評価。
… diff metadata strip + silent failure baseline cleanup (#159) Bundle l 3 サブ変更を bundled で land (順位 129 + 131 + 132、todo-summary.md table 4 行整理含む)。 共通テーマ: cli-push-runner lint-screen stage の堅牢化 + I/O write 関数の silent failure 構造的防止。 順位 132 (Tier 1 / S): cli-push-runner/src/stages/lint_screen.rs に strip_diff_metadata_lines 前処理関数を追加し、similarity index NN% / index <hex> / file mode / rename 系の diff metadata 行を LLM 入力前に決定論的に除去。PR #155-#156 で 5 観測された mistral:7b の magic-number FP を構造的に解消。unit test 7 件 (各 metadata 系列 + content 保持 + substring 誤検出回避)。 順位 130 (prompt 改修 or 前処理 filter のいずれか) を本実装で前処理 filter に確定して supersede、 table から 130 行も削除。 順位 129 (Tier 1 / S): .claude/custom-lint-rules.toml に rule⑩ (no-write-result-discard、 pattern let\s+_\s*=\s+write_\w+\(、extensions=["rs"]、severity=error) を追加。 hooks-post-tool-linter に 8 件 unit test を追加 (positive x3 / negative x4 / dogfood x1)。 dogfood test (deployed_src_rust_passes_no_write_result_discard_rule) は src/**/*.rs を再帰走査して clean baseline を強制。本 PR の completeness criteria に合わせて既存違反 5 件を fix: - cli-pr-monitor/src/stages/poll.rs: 3 箇所の let _ = write_state(...) を if let Err(e) = ... { log_info(...) } に置換 (非 fatal 進行 + 観測可能性回復) - cli-merge-pipeline/src/feedback.rs: FailedMarkerGuard::drop 内の write_failed_marker と feedback::run の write_pending_marker を log 化、後者は write_pending_marker_logged helper に抽出して fn run の 50 行ガイドライン超過を回避 (lint_screen.rs の write_skip_report_logged と同 pattern) 順位 131 (Tier 2 / M): write_skip_report_logged の error path regression test を 3 件追加。 parent が regular file な path に書込を試みて create_dir_all 失敗を確定的に誘発する方式 (Unix/Windows 両方で reliable、追加 dep 不要)。write_skip_report の Err 返却 + write_skip_report_logged の no-panic + writable path success の 3 段で seal、将来 refactor での silent drop 回帰を機械検出。 副次: src/cli-push-runner/Cargo.toml に tempfile dev-dep を追加 (順位 131 test 用)、 todo8.md から 129/130/131/132 detail entry を削除 (Cross-File Reference Lifecycle 整合)。 検証: cargo test 全 workspace pass / pnpm build:all 成功 / 変更 crate 3 つ (cli-push-runner / hooks-post-tool-linter / cli-pr-monitor) で cargo clippy --all-targets -- -D warnings clean。
…検出 hook 2 段構え) ## 順位 39 削除 順位 39 (takt workflow `model` フィールド必須化 lint rule) は PR #150 で `takt-workflow-persona-without-model` rule として実装済のため、todo-summary.md table 行と todo4.md 詳細 entry を削除。 調査の過程で、stale entry 候補 3 件のうち以下 2 件は既に削除済と判明: - 順位 104 (ADR-007 amendment): PR #161 で既削除 - 順位 126 (ADR-038 hallucinate codify): PR #156 (Phase E) で ADR-038 migrate + 詳細 entry 削除済 ## 順位 136 新規追加 (Tier 1) 本セッション (PR cleanup-stale-rank-39 作業中) で実証された failure mode: local working copy が stale parent (master と sibling) のまま docs/todo*.md を 読み込み、master 上で既に削除済の entry 2 件を「stale entry として削除する」と 誤判定。memory rule `feedback_verify_task_not_already_done.md` は強制力ゼロで 再発確実 (memory rule 全般の限界、`feedback_no_unenforced_rules.md` 原則の 自己事例)。Claude Code Web との並列セッション運用前提下では構造的再発確実。 structural defense として 2 hook 二段構え: - 案 A (予防層): SessionStart hook で `jj git fetch` + master との lineage を additional context として AI 出力 - 案 B (最終 backstop): PreToolUse hook で stale parent 時の docs/todo*.md edit を hard block `feedback_no_unenforced_rules.md` 例外条件 = 2 つの hook で機械強制可能。 ADR-039 experimental pattern 適用予定。
…検出 hook 2 段構え) (#162) ## 順位 39 削除 順位 39 (takt workflow `model` フィールド必須化 lint rule) は PR #150 で `takt-workflow-persona-without-model` rule として実装済のため、todo-summary.md table 行と todo4.md 詳細 entry を削除。 調査の過程で、stale entry 候補 3 件のうち以下 2 件は既に削除済と判明: - 順位 104 (ADR-007 amendment): PR #161 で既削除 - 順位 126 (ADR-038 hallucinate codify): PR #156 (Phase E) で ADR-038 migrate + 詳細 entry 削除済 ## 順位 136 新規追加 (Tier 1) 本セッション (PR cleanup-stale-rank-39 作業中) で実証された failure mode: local working copy が stale parent (master と sibling) のまま docs/todo*.md を 読み込み、master 上で既に削除済の entry 2 件を「stale entry として削除する」と 誤判定。memory rule `feedback_verify_task_not_already_done.md` は強制力ゼロで 再発確実 (memory rule 全般の限界、`feedback_no_unenforced_rules.md` 原則の 自己事例)。Claude Code Web との並列セッション運用前提下では構造的再発確実。 structural defense として 2 hook 二段構え: - 案 A (予防層): SessionStart hook で `jj git fetch` + master との lineage を additional context として AI 出力 - 案 B (最終 backstop): PreToolUse hook で stale parent 時の docs/todo*.md edit を hard block `feedback_no_unenforced_rules.md` 例外条件 = 2 つの hook で機械強制可能。 ADR-039 experimental pattern 適用予定。
Summary
変更ファイル
Diff stats: +224 / -1541 across 15 files (net -1317)
既知課題 (本 PR scope 外、todo8.md に記録)
.failedmarker (~7 日経過 stale): merge pipeline の長期化 / abrupt 終了が原因と推定、systemic 再発を確認するまで実装側の改修は scope 外。Bundle c-1 (PR feat(post-merge-feedback): Bundle c-1 (D-7) — L1 Drop guard + L2 orphan reaper + ADR-030 spec #154、L1/L2 recovery) で機構は実装済のため、本 marker は reaper 投入前の取り残された artifact として扱うTest plan
cargo check --workspacepasscargo test -p cli-finding-classifier --test lint_screen_evals20 pass / 1 ignoredcargo test -p hooks-post-tool-linter md_no_docs_relative7 pass (更新済 fixture を含む)pnpm lint:md0 errorgrep -rn 'local-llm-offload-(analysis|history|phase-d-outcomes|phase-d-guide)'で残存 4 件はすべて retire-aware historical reference (broken link なし)関連
Summary by CodeRabbit
リリースノーツ