Repository navigation
Give real cf subprocess tests a budget for loading cf - #391
Merged
Merged
Conversation
Tests that spawn the pinned cf CLI wait while cf loads its bundle: about half a second when idle and several seconds on a busy machine. Without a budget of their own they ran under Vitest's 5s default and timed out. Add REAL_CF_TIMEOUT_MS (15s, or 20s on Windows as the project already allows) and use it for every test here that spawns the real cf and had no budget: the SDK draft read, the missing-Worker provider code and uploader diagnostic, the API-origin revision refusal, the large version list, both --version tests, the terminated cf diagnostics cases, and the Workflow trigger transport. Tests that already set 15s or 30s keep them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-cf-version-runner-timeout-void-cloud.voidzero-docs.workers.dev (commit b8b9074)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
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.
Problem
Tests in
packages/void/test/unit/cf-version-runner.test.tsthat start the realcfsubprocess time out on a busy machine.Each real
cfstart loads the fullcfbundle before it does any work. The load takes about half a second when the machine is idle. When the full suite runs in parallel, it takes several seconds. A test that startscfonce or twice can then pass the 5 s default.Fix
REAL_CF_TIMEOUT_MS: 15 s, or 20 s on Windows. Use it for every test that starts the realcf.cfprocesses. It takes 5–9 s on an idle machine and timed out at 15 s under load.The test logic does not change. Most of the diff is the formatter wrapping each
it(...)to add the budget. Usegit diff -wto see the real change.Testing
vp test run packages/void/test/unit/cf-version-runner.test.ts: 71 passed.🤖 Generated with Claude Code