Skip to content

Give real cf subprocess tests a budget for loading cf - #391

Merged
Brooooooklyn merged 1 commit into
mainfrom
fix/cf-version-runner-timeout
Oct 8, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
fix/cf-version-runner-timeout

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

Problem

Tests in packages/void/test/unit/cf-version-runner.test.ts that start the real cf subprocess time out on a busy machine.

test starts ──► node loads cf's bundle ──► cf does the work ──► assertions
                 ~0.5 s idle                 short
                 2–6.5 s under load
                         │
                         ▼
            Vitest default budget: 5 s  ──►  timeout

Each real cf start loads the full cf bundle 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 starts cf once or twice can then pass the 5 s default.

Fix

  • Add one shared budget, REAL_CF_TIMEOUT_MS: 15 s, or 20 s on Windows. Use it for every test that starts the real cf.
  • Raise the "API-origin upload" test to 30 s on all platforms. It starts several cf processes. It takes 5–9 s on an idle machine and timed out at 15 s under load.
  • Do not change tests that use a fake child or that already have 30 s.

The test logic does not change. Most of the diff is the formatter wrapping each it(...) to add the budget. Use git diff -w to see the real change.

Testing

  • vp test run packages/void/test/unit/cf-version-runner.test.ts: 71 passed.

🤖 Generated with Claude Code

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T08:24:28.819854Z b8b9074 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 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 deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://099fef08-void-cloud.voidzero-docs.workers.dev b8b9074 2026-10-08T08:23:59.868Z Visit the dashboard ↗

@Brooooooklyn
Brooooooklyn merged commit 7497c8a into main Oct 8, 2026
20 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/cf-version-runner-timeout branch October 8, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant