Skip to content

docs(adr): ADR-044 subprocess utility extraction の境界判定 — 順位 173 family close - #209

Merged
aloekun merged 2 commits into
masterfrom
173e-close
Jun 15, 2026
Merged

docs(adr): ADR-044 subprocess utility extraction の境界判定 — 順位 173 family close#209
aloekun merged 2 commits into
masterfrom
173e-close

Conversation

@aloekun

@aloekun aloekun commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

順位 173 family (subprocess utils 5 crate 重複の lib-subprocess extract) を完了 close する docs-only PR。

  • 2 commits 構成:
    1. docs(adr): ADR-044 subprocess utility extraction の境界判定 (順位 173e 評価結果)
    2. docs(todo): 順位 173 (subprocess utils extraction) 完了に伴い削除 (ADR-044 で評価結果 codify 済)

173e 評価結果

173a-d (PR #205-#208) で lib-subprocess への subprocess utility 集約が完了。173e は spec で「dogfood 後判断 (variant merge 検討)」と定義されており、本 PR で評価結果を ADR-044 として codify する。

結論: variant 共存維持、merge せず。

主な根拠:

  • wait_with_timeout_safe vs _basic: spec が明示した merge trigger (.takt/runs/ で zombie process 顕在化) が grep -rn で 0 件
  • drain_pipe_* / run_cmd_shell_*: bool flag で merge 可能だが、callsite 名 (_capped_reporting 等) で intent を表明する self-documenting 価値が bool flag 認知コストを上回る
  • PR refactor(lib): run_cmd を 2 variant で lib-subprocess に extract (順位 173d) #208 で発覚した CR Major (run_cmd_shell_capped の Err 経路 resource leak) は kill_and_join_err helper で構造的に解消済 = _basic variant 自体の問題ではない

ADR-044 の構造

将来同種の utility 重複が観測されたとき「lib に取り込むか / variant 維持か / merge か」を判定する 3 層基準:

判定対象
層 1 extract 対象の境界 (lib-subprocess に入れるか / crate 個別に残すか)
層 2 variant 維持の境界 (1 関数 vs 複数 variant)
層 3 variant merge の再評価 trigger (dogfood で zombie 顕在化 等)

順位 173 での 6 item の実績判定表 を ADR 内に inline 記録 (combine_output ✅ 共通化、run_cmd_direct ❌ 残置 等)。

変更ファイル

  • CLAUDE.md: ADR index に ADR-044 行を追加
  • docs/adr/adr-044-subprocess-utility-extraction-boundary.md: 新規 (148 行)
  • docs/todo-summary.md: 順位 173 行を削除
  • docs/todo11.md: 順位 173 section を削除 (123 行)

Test plan

  • docs-only changes、code 変更なし
  • markdownlint clean (ADR / CLAUDE.md / todo*.md 全て)
  • CLAUDE.md ADR index 順序整合 (ADR-043 → ADR-044)
  • CI green
  • CodeRabbit review (docs-only、ADR-035 doc evaluation policy 適用)

Summary by CodeRabbit

Release Notes

  • Documentation
    • アーキテクチャ設計に関するドキュメントを追加しました。内部プロセスのガイドラインを明文化し、今後の開発効率化を支援します。

@coderabbitai

coderabbitai Bot commented Jun 15, 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: b6ab6de9-7cc2-4240-8dfd-eeab530584a4

📥 Commits

Reviewing files that changed from the base of the PR and between 2eac556 and 88fa246.

📒 Files selected for processing (4)
  • CLAUDE.md
  • docs/adr/adr-044-subprocess-utility-extraction-boundary.md
  • docs/todo-summary.md
  • docs/todo11.md
💤 Files with no reviewable changes (2)
  • docs/todo11.md
  • docs/todo-summary.md

📝 Walkthrough

Walkthrough

subprocess utility extraction の境界判定を記録した ADR-044 を新規追加し、CLAUDE.md の ADR 一覧にそのエントリを追記。完了済みとなった順位173(lib-subprocess への extract)タスクブロックを docs/todo11.md および docs/todo-summary.md から削除。

Changes

ADR-044 追加と順位173タスク整理

Layer / File(s) Summary
ADR-044 新規作成と CLAUDE.md 登録
docs/adr/adr-044-subprocess-utility-extraction-boundary.md, CLAUDE.md
combine_output の extract、wait_with_timeout / drain_pipe / run_cmd_shell の variant 維持、run_cmd_direct / run_cmd_inherit の残置という順位173の判定実績を根拠に、extract 境界・variant 維持境界・再評価トリガの 3 層を定義した ADR-044 を新規追加。CLAUDE.md の Architecture Decisions 一覧に当該 ADR エントリを追記。
完了タスクエントリの削除
docs/todo-summary.md, docs/todo11.md
docs/todo-summary.md から順位173の subprocess utils 重複抽出エントリを削除。docs/todo11.md から lib-subprocess extract タスク全体(173a-d の進捗・完了基準・詰まっている箇所を含む約123行)を削除。

推定コードレビュー労力

🎯 1 (Trivial) | ⏱️ ~3 minutes

関連する可能性のある PR

  • aloekun/claude-code-hook-test#192: subprocess utils の抽出スコープ・タスクに関する docs 更新を含む同一ワークストリームの PR。
  • aloekun/claude-code-hook-test#206: 173b wait_with_timeout の実装と docs/todo11.md への記録を行っており、本 PR が削除したタスクブロックと直接対応する。
  • aloekun/claude-code-hook-test#208: run_cmd 系 variant 抽出(173d)を実装した PR で、ADR-044 が境界判定の根拠とする同一範囲の作業に紐づく。
🚥 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 プルリクエストのタイトルは、ADR-044の追加と順位173タスクのクローズという主要な変更を正確に反映しています。
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 2fce138 into master Jun 15, 2026
1 check passed
@aloekun
aloekun deleted the 173e-close branch June 15, 2026 08:43
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