fix(capture): bound cleanup and force exit so a wedge fails loudly - #36
Conversation
…stead of eating the test budget
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab07c55923
ℹ️ 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".
|
|
||
| export const cleanupCaptureResources = async ({ browser, fixture, restores }) => { | ||
| const settledRestores = await Promise.allSettled(restores.map(async (restore) => restore())); | ||
| phase('cleanup'); |
There was a problem hiding this comment.
Preserve the capture phase before entering cleanup
When any capture phase fails normally, the catch stores that error and then calls cleanupCaptureResources, which unconditionally replaces currentPhase with cleanup. Consequently, the rejection handler always reports Last capture phase: cleanup even when cleanup succeeds and the actual failure occurred during fixture-boot, compile-error, or another named phase. Preserve the phase associated with the primary failure and report cleanup only when cleanup itself is what failed or wedged.
Useful? React with 👍 / 👎.
commit: |
Summary
runtime-playground-capture.test.tstiming out at its full 600s with zero output — the capture script never exited. Fixture boot and cleanup (fixture.close(),browser.close()) were unbounded, and any lingering handle kept the process alive even after the capture settled.Test plan
pnpm rslintandnode --checkcleanruntime-playground-capture.test.tspasses locally with the reworked script (2/2)