Skip to content

fix(autopilot): stuck 検知が EPIC Decomposed を誤 Block する (#856)#860

Merged
takaokouji merged 1 commit into
developfrom
topic/autopilot-856
Jul 1, 2026
Merged

fix(autopilot): stuck 検知が EPIC Decomposed を誤 Block する (#856)#860
takaokouji merged 1 commit into
developfrom
topic/autopilot-856

Conversation

@smalruby3-editor-bot

Copy link
Copy Markdown

Summary

stuck 検知(#816 isStuckCandidate)が、decompose 完了済みの EPIC
Status=In Progress / AI Status=EPIC Decomposed)を誤って stuck 扱いし
Blocked にしていた不具合を修正する。

EPIC Decomposed は decompose が正常終了した EPIC の resting 状態(子の実装待ち)で、
実行中の run を持たなくて当然。Self-Reviewing と同様に「run が無くて当然の状態」として
stuck 検知から除外する。

Changes Made

  • tools/autopilot/src/phases.js: isStuckCandidate の除外 AI Status を
    STUCK_EXEMPT_AI_STATUSES Set にまとめ、EPIC Decomposed を追加。
    Decomposing / Implementing 等の実行中 AI Status は引き続き stuck 検知の対象。
  • tools/autopilot/test/phases.test.js: EPIC Decomposed が false になるケースを追加。

Test Coverage

  • cd tools/autopilot && node --test → 140 tests pass(RED → GREEN 確認済み)。
  • isStuckCandidate({status:'In Progress', aiStatus:'EPIC Decomposed'}) が false。
  • Decomposing / Implementing は引き続き true(回帰なし)。

Related Issues

Closes #856

decompose 完了済み EPIC の resting 状態 (AI Status=EPIC Decomposed) は子の実装待ちで run を

持たなくて当然。isStuckCandidate がこれを一律 stuck 扱いし誤 Blocked にしていた (#856)。

Self-Reviewing と同じく除外リストに追加。Decomposing/Implementing 等の実行中 AI Status は

引き続き stuck 検知の対象に残す。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@smalruby3-editor-bot smalruby3-editor-bot Bot added the 🤖 autopilot autopilot(AI)が管理する PR/Issue(AI処理対象) label Jul 1, 2026
@smalruby3-editor-bot

smalruby3-editor-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Author

🤖 autopilot status

field value
Status Review
AI Status
HITL Yes
Size small

Linked issue #856. Maintained by autopilot (single writer); do not edit.

@smalruby3-editor-bot

Copy link
Copy Markdown
Author

🤖 autopilot 敵対的レビュー完了

差分(tools/autopilot/src/phases.js +7/-4, test/phases.test.js +3)を批判的観点でレビューし、自動修正が必要な指摘なしと判断しました。人間レビューへ渡します。

確認した観点

  • 正確性: 除外文字列 'EPIC Decomposed'autopilot-decomposenextAiStatus:"EPIC Decomposed")および docs/autopilot/README.md の正規値と完全一致。phaseForItem は In Progress を Self-Reviewing のみ再 dispatch するため、EPIC Decomposed は resting のまま留まり、今回の除外で stuck 誤検知も解消される(両関数が整合)。
  • 回帰なし: Decomposing / Implementing は引き続き stuck 対象(テスト済み)。本当に止まった decompose(feat(tutorial): Phase 3 - Block チュートリアル 4 シリーズ (書籍プロモーション) #680/feat(tutorial): Phase 4 - DNCL チュートリアル (基礎 + アルゴリズム + 共通テスト対策) #681Decomposing 中断・0 サブ)は従来どおり検知される。
  • 設計: 除外 AI Status を STUCK_EXEMPT_AI_STATUSES Set に集約したのは可読性・拡張性の面で妥当な最小改善。
  • セキュリティ: 純粋関数・内部ツールで I/O / 入力なし → 影響なし。
  • テスト: EPIC Decomposed → false ケース追加。cd tools/autopilot && node --test で 140 tests green を再確認。
  • 規約 / ドキュメント: tools/autopilot はルートの lint/prettier 対象外。バグ修正で挙動が「あるべき姿」に戻るのみのため docs 更新不要(README は除外リストを列挙していない)。

受け入れ条件

  • isStuckCandidate({status:'In Progress', aiStatus:'EPIC Decomposed'}) が false
  • Decomposing / Implementing 等は引き続き true(回帰なし)
  • node:test 追加、node --test 緑(140 pass)

@smalruby3-editor-bot smalruby3-editor-bot Bot added the 🙋 HITL 人間の対応待ち(レビュー/判断/マージ) label Jul 1, 2026
@smalruby3-editor-bot smalruby3-editor-bot Bot marked this pull request as ready for review July 1, 2026 10:14
@takaokouji takaokouji merged commit 59e354d into develop Jul 1, 2026
2 checks passed
@takaokouji takaokouji deleted the topic/autopilot-856 branch July 1, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 autopilot autopilot(AI)が管理する PR/Issue(AI処理対象) 🙋 HITL 人間の対応待ち(レビュー/判断/マージ)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(autopilot): stuck 検知が decompose 完了済み EPIC (EPIC Decomposed) を誤 Block する

1 participant