Repository navigation
fix(agent): ポートが使われていたら 2 で終わり、選局の途中で閉じられても元の失敗を返す - #2793
Merged
Merged
Conversation
適合テストの「止まれの合図を受けたとき」で、立てたエージェント (:40882) が 応答しないまま 10 秒で落ちることがあった (CI の 2026-11-08 と 11-14。 #2768 より前から起きている)。待ち受けるポートが使われていると、 エージェントは例外のまま SIGABRT で落ちる。Bun の exitCode はシグナルで 落ちると null のままなので、テストは落ちたことに気づかず応答を待っていた。 - 待ち受けるポートが使われていたら、理由をログに出して終了コード 2 で終わる - 適合テストは signalCode も見て、起動できなかったときはエージェントの出力を添える - 適合テストのポートを Linux のエフェメラルポートより下 (28881〜) に移す 止めるときに It930xDevice.Shutdown が選局の途中で USB を閉じると、 選局の失敗の後始末 (給電の取り下げ・中継を閉じる書き込み) が閉じた USB に 書き、ObjectDisposedException で元の失敗が消えていた。 - 閉じた機材には給電の取り下げを書かず、後始末の ObjectDisposedException は捨てて元の失敗を返す - 閉じた USB に書いて失敗した選局は、止めたことが分かる IOException にする Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8TqVbtN2Hp8wNmqBX8pzT
|
Claude finished @5ym's task in 35s —— View job レビュー結果指摘する不具合はありません。要確認が 2 点、軽い指摘が 1 点あります。 確認したこと
要確認
軽い指摘
確かめていないこと
|
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.
何を直したか
適合テストの「止まれの合図を受けたとき」で、立てたエージェントが応答しない
PR #2785 の CI (run 43565456686) で、
:40882 のエージェントが応答しませんで 2 件落ちた。同じ失敗は #2768 より前の 2026-11-08 (run 42456322190) にもある。どちらも落ちたのは、止まれの合図を送る前の
spawnAgentの中 (組めるまで待つready) で、#2768 の止める手順は通っていない。exitCodeは、シグナルで落ちたプロセスでは null のまま (signalCodeに入る。確かめた)。readyはexitCodeしか見ないので、落ちたのに 10 秒待っていた直したこと:
AGENT_PORT・CARD_SHARE_PORT)。適合テストを足したreadyはsignalCodeも見る。spawnAgentはエージェントの出力を読み続け、起動できなかったときに添える選局の途中で止めるために閉じられると、元の失敗が ObjectDisposedException に変わる
It930xDevice.Shutdownは選局が終わるのを待たない。選局の後始末 (給電の取り下げ、CXD2856 の中継を閉じる書き込み、TC90522 の電源を切る書き込み) が閉じた USB に書くと ObjectDisposedException になり、元の失敗が消えていた。Closed) には給電の取り下げを書かない。後始末の ObjectDisposedException は捨てて元の失敗を返すDisposedThrowsを足し、テストを 2 つ足した (直す前のコードでは 2 つとも落ちる)確かめたこと
[::1]に繋ぐ 2 件 (同じ理由) のほかは通るbun run format・lint・check、単体テスト一式確かめていないこと
🤖 Generated with Claude Code
https://claude.ai/code/session_01T8TqVbtN2Hp8wNmqBX8pzT