Repository navigation
#648 [test] headless SIGINT を実要求開始の合図後に送る - #653
Merged
Merged
Conversation
The headless SIGINT test slept 100ms after the run-evidence file appeared, which does not prove the SIGINT handler or the provider call had started. Hold a mock Ollama endpoint, wait for the real POST /api/chat request, keep that response body open so the call is still in flight, and only then send the real SIGINT. Bound the ready and exit waits, diagnose an early child exit and an incomplete HTTP request, and reclaim the child, its pipes, and the server thread on every failure path. 判断: the mock answers the target chat with 200 headers and then holds the body open instead of completing it, so the issue's "return the needed startup response and signal that the target chat started" keeps the provider call in flight for the real SIGINT. 判断: GET /api/tags is answered defensively for the startup probe; the --prompt path does not currently probe ollama. 本文に無い指摘: the child handles SIGINT through its own signal_hook installation (src/lib.rs DirectCommandCompletionGuard::start_inner) before the provider call, so kill(SIGINT) does not rely on the parent's SIGINT disposition and an inherited SIG_IGN from a backgrounded harness cannot suppress it; the test intentionally does not reset the child's signal state. 本文に無い指摘: the acceptance criterion for 2-checkout concurrent runs is a future verification plan per the issue's 共通制約 and needs leader coordination; this change was verified with 3 sequential runs plus the full cargo test suite. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
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.
概要
headless の SIGINT のテストで、SIGINT を送る時機を、実際の provider の要求が始まった合図の後にします。これまでは、証跡のファイルと 100 ms の sleep で時機を推し量っていました。
変更
tests/headless_summary.rs(+239 −27)だけを変えました。製品コードは変えていません。POST /api/chatの要求を最後まで読んだら、channel で親に合図します。kill(SIGINT)を送ります。証跡のファイルと 100 ms の sleep はやめました。Drop)が、失敗の経路でも、子の kill と wait、mock の thread の停止と join を行います。検証
commandmate verifyの 15 ゲート(fmt・clippy-D warnings・cargo testの全体を含む)は、developc98bdc7cの上の HEAD8435de32で 15/15 pass でした。runner.rs・loop_run.rs・baseline)は変えていません。確かめてほしい点
src/lib.rsのDirectCommandCompletionGuard::start_inner)。そのため、テストは子の signal の状態を戻していません。親から SIG_IGN を継いだ状態での pass は確かめていません。--promptの経路は到達確認をしないので、この形で起きません。レビュー
テストの変更なので、merge 前レビューは行いません(利用者承認済み)。
Refs #648
🤖 Generated with Claude Code