Repository navigation
test(acp): keep the delayed fake agent alive until its exit delay is up - #1648
Merged
okwasniewski merged 2 commits intoNov 9, 2026
Merged
okwasniewski merged 2 commits into
okwasniewski merged 2 commits into
Conversation
The session-removal tests need an agent that takes 1.5 s to stop after SIGTERM. Teardown closes stdin and stdout around the signal, and on Linux CI the agent was sometimes gone within 500 ms. The fixture now holds the delayed agent until the delay is up, starts the delay at SIGTERM or stdin's end, logs errors instead of dying, and the tests print the agent's log when it is gone early.
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
okwasniewski
deleted the
kacper/eng-1185-acp-flaky-executor-test-the-fake-agent-is
branch
November 9, 2026 16:47
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.
The acp test "retries the session directory removal after the agent exits when the first try fails" has failed 12 Linux CI jobs since #1626 (Node 22, 22.22.3, and 24):
kill ESRCHattests/executor.test.ts:522, because the fake agent, which should take 1.5 s to stop after SIGTERM, was gone within 500 ms. It blocks unrelated PRs such as #1647.packages/acp/src/session.ts) closes the agent's stdin and stdout pipe right before the SIGTERM. A process whose only other hold is a signal listener can exit on stdin's EOF before the signal handler runs, and a late write can hit EPIPE.ACP_EXIT_DELAY_MS) now holds the event loop until its delay is up. Once it is stopping, it logs a stdout error, an uncaught error, or a rejection instead of dying on it; before that, an error still ends it at once with code 1, so a real failure fails the test fast.Verified
Ran it locally: yes
node:22.22.3,node:24, non-root, 1 and 2 CPUs), so the CI logs above are the evidence for the race.pnpm --filter @e2e-dev/acpexecutor tests pass on macOS, and the full acp suite passed 15 times in anode:22.22.3container as a non-root user (the test skips as root).checkrun hit an unrelated web-engine timeout (locator-frame.e2e.ts) and passed on rerun.Tracked in ENG-1185.