Repository navigation
[codex] remove avoidable slow test waits - #347
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef8f9a5b3f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (aborted) { | ||
| return result.value; | ||
| } | ||
| return waitForExit(toLogStreamEnv(env), jobId); |
There was a problem hiding this comment.
Keep aborts active while polling for wrapped exits
When a caller supplies an AbortSignal, this branch waits for the wrapper process to finish and then calls waitForExit without any abort signal. If the exit artifact is missing or delayed after handle.result resolves, a later cancellation can no longer interrupt the polling loop, so runPoeCommand can hang indefinitely instead of honoring the caller's abort; the previous implementation kept the exit wait abortable while polling.
Useful? React with 👍 / 👎.
What changed
clone.integration.test.ts, while copying isolated source/bare repositories per test.Root cause
runPoeCommandread wrapper exit files through a polling API even for synchronous executions whose completed wrapper process guarantees the exit file has been published.Impact
packages/agent-harness-tools/src/run-poe-command.test.tstest work dropped from approximately1.78sto32msin focused profiling.packages/agent-eval/src/run/clone.integration.test.tstest work dropped from approximately5.12sto2.65sin focused profiling.Validation
npx vitest run packages/agent-eval/src/run/clone.integration.test.ts packages/agent-harness-tools/src/run-poe-command.test.ts packages/agent-harness-tools/src/log-stream.test.ts --maxWorkers=1 --reporter=dotnpm test -w @poe-code/agent-evalnpm run build -w @poe-code/agent-evalnpm run test:unit -w @poe-code/agent-harness-toolsnpm run build -w @poe-code/agent-harness-toolsnpm run lint:eslintnpm run lint:types