Repository navigation
Cancel the hide-ai fakes once their turn is running, not after a fixed time - #528
Merged
Merged
Conversation
…d time The fake CLIs create a marker once a slow turn is waiting, and the cancel tests raise the cancel only after it appears, so a running child is what is cancelled every time. The ownership test reads the fake's child directly, since the fake starts it before answering, and its survivor check polls through a named helper.
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.
Refs #437
Summary
hide-aitest의 #437 allow 4개를 없앱니다. 제품 코드는 바뀌지 않았습니다.claude_cli.rs2개,codex_app_server.rs1개): 300ms 뒤에 취소하던 것을, fake CLI가 느린 turn에 들어가 기다리기 시작할 때 만드는 marker 파일(FAKE_STARTED_FILE, usage 읽기는usage-started)을 본 뒤 취소하는 것으로 바꿨습니다. 그래서 매번 "돌고 있는 child를 죽인다"를 확인합니다. 이전에는 부하에서 300ms가 child 시작보다 짧으면 시작 전 취소 경로를 대신 지났습니다.process_ownership.rs: fake는thread/start에 답하기 전에 자기 child를 띄우고, owner는 그 답 뒤에야 출력하므로, child를 한 번에 읽습니다(100ms polling 제거). kill 뒤 생존 확인은 이름 붙은 polling helpersurvivors_after로 옮겼습니다(test의 child가 아닌 프로세스라 끝을 알리는 것이 없음).wait_for_start,wait_for_turnpolling helper입니다.Review
fake-claude.py,fake-app-server.py)가 env로 marker 경로를 받아 만듭니다. env를 쓰는 다른FAKE_*와 같이with_mode의 lock 안에서만 세우고 지웁니다.hide-ai/tests/claude_cli.rs- marker 경로를 test마다 지우고 시작합니다. 남은 marker가 있으면 시작 전에 취소할 수 있기 때문입니다.Evidence
Cancelled대신Timeout으로 실패. 되돌리면 통과.verify-cargo.sh clippy -p hide-ai --all-targets -D warnings,fmt,hide-aitest 통과(macOS).yes4개 +taskpolicy -b, 수정 전과 후 binary를 번갈아 30번씩):claude_cli취소 2개 30/30 대 30/30,codex_app_server취소 30/30 대 30/30,process_ownership30/30 대 30/30.