Repository navigation
fix(autopilot): do not block a worker that returns hitl without a reason (#2632) - #2634
Open
smalruby3-editor-bot[bot] wants to merge 1 commit into
Open
smalruby3-editor-bot[bot] wants to merge 1 commit into
smalruby3-editor-bot[bot] wants to merge 1 commit into
Conversation
A worker returning signal=hitl without reason was marked invalid and Blocked. readResultFile now fills the reason from the summary (normalizeResult) before validation. The contract and the phase prompts state that reason is required, with an example for the Bot token failure case. Closes #2632 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
🤖 autopilot status
Linked issue #2632. Maintained by autopilot (single writer); do not edit. |
Author
|
🤖 敵対的レビュー(round 1): 指摘 3 件(Must 0 / Question 0 / FYI 3) FYI
直してほしい指摘は、モニターの「AI に直してもらう」で指示を書くか、Request changes で ID を指定してから |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
worker が
signal: "hitl"を返したのにreasonを書き漏れると、validateResultが結果を不正として daemon が Blocked にしていた(#2621 の review の worker が、Bot のトークンが取れないときに実際に起きた)。人間がモニターで見ると「止まった」になり、何をすればよいか分かりにくい。Changes Made
tools/autopilot/src/contract.js: 純粋関数normalizeResultを足し、readResultFileが検証の前に呼ぶ。signal=hitlでreasonが無い・空のとき、summaryがあればそれを理由として受ける(人間待ちになり、Blocked にしない)。summaryも空なら従来どおり不正。文字列でないreasonは補わない。validateResult自体は厳しいまま。docs/autopilot/autonomous-contract.md§2.3:reasonは必ず書くこと・書き漏れたときの扱いを表に書き、Bot のトークンが取れないとき(hitlKind: "environment"・reasonに再ログインの手順)の例を足した。reasonを必ず書くことと、トークンが取れないときの書き方を足した。Test Coverage
tools/autopilot/test/contract.test.jsに 3 件(normalizeResultの補う・補わない場合、readResultFileが reason 無しの hitl を受ける)。修正前に落ち、修正後に通ることを確かめた。contract/ask/resolve-conflict/phases/resend/state-machineのテスト、bin/lint-changed。マージのあとは daemon の再起動が要る(プロンプト・コードは起動時のスナップショット)。
Closes #2632
🤖 Generated with Claude Code