Skip to content

fix(commons-gateway): pin vitest to 4.x for vitest-pool-workers compatibility - #77

Merged
kalisam merged 1 commit into
mainfrom
fix/commons-gateway-vitest-pin
Oct 28, 2026
Merged

kalisam merged 1 commit into
mainfrom
fix/commons-gateway-vitest-pin

Conversation

@kalisam

@kalisam kalisam commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Root cause

#69 (c6a1f8b, merged 2026-10-01) raised vitest to ^5.0.3 in workers/commons-gateway. @cloudflare/vitest-pool-workers (0.22.0, and 0.23.0, the latest) declares peer vitest ^4.1.0, so npm ci cannot resolve the tree.

Evidence: Workers Builds 67c454cb… (#43) and 053a4309… (#73) both fail at Installing project dependencies: npm clean-install with npm error Cannot read properties of null (reading 'edgesOut'), which is how npm 10.9.2 reports this peer conflict. npm 11 on the same tree prints ERESOLVE … peer vitest@"^4.1.0" from @cloudflare/vitest-pool-workers@0.22.0. npm ci fails the same way on main, #43, and #73.

Why main looked green: the "Deploy non-production branches" trigger excludes main, so main never runs this check. #41 passed only because its branch predates #69.

Change

  • Restore vitest ^4.1.9 and the commons-gateway lockfile from before chore(deps): bump vitest from 4.1.9 to 5.0.3 in /workers/commons-gateway #69.
  • Bump @cloudflare/workers-types from ^4 to ^5.20261025.1. Once the vitest conflict is gone, npm 10.9.2 reports a second one: wrangler 4.124.0 declares an optional peer of workers-types ^5.20260815.1.
  • .github/dependabot.yml: ignore vitest >=5 for /workers/commons-gateway until pool-workers accepts it. The rest of the config is unchanged.

Verification (node 24 + npm 10.9.2, matching the Cloudflare build image)

  • npm ci: ok
  • vitest run: 12/12
  • tsc --noEmit: ok
  • wrangler deploy --dry-run: ok

After merge

#43 and #73 (and any branch with #69) need updating from main to get Workers Builds green again.

Summary by CodeRabbit

  • Chores
    • Updated maintenance settings for the gateway’s development tools. Future automated updates will remain within the configured version range.

…tibility

#69 bumped vitest to ^5.0.3, but @cloudflare/vitest-pool-workers (0.22.0,
and 0.23.0, the latest) declares peer vitest ^4.1.0. npm ci cannot resolve
that, so every Workers Builds run on a branch carrying #69 failed at the
install step (npm 10.9.2 reports it as "Cannot read properties of null
(reading 'edgesOut')"). main never ran the check: the non-production
trigger excludes main, so the breakage went unseen.

Restore vitest ^4.1.9 and its lockfile from before #69. With that fixed,
npm 10.9.2 surfaced a second peer conflict: wrangler 4.124.0 wants
@cloudflare/workers-types ^5.20260815.1 (peerOptional) while we pinned ^4.
Move workers-types to ^5.20261025.1.

Tell Dependabot to ignore vitest >=5 here until pool-workers accepts it.

Verified with node 24 + npm 10.9.2 (Cloudflare's build image): npm ci ok,
vitest 12/12, tsc --noEmit ok, wrangler deploy --dry-run ok.
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
floss Ready Ready Preview, v0 Oct 25, 2026 2:48am UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 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-25T02:49:38.360199Z 4053aff 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.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65510292-26a8-47a0-87a5-0f68c5a5ce20
Commits

Reviewing files that changed from the base of the PR and between be80224 and 4053aff.

Files ignored due to path filters: 1
  • workers/commons-gateway/package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 2
  • .github/dependabot.yml
  • workers/commons-gateway/package.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The Commons Gateway updates its Workers types and Vitest dependencies. Dependabot is configured to ignore Vitest versions >=5.0.0.

Changes: Commons Gateway dependencies

Layer / File(s) Summary
Dependency versions and update policy
.github/dependabot.yml, workers/commons-gateway/package.json
The package manifest upgrades @cloudflare/workers-types to ^5.20261025.1 and changes Vitest to ^4.1.9. Dependabot ignores Vitest versions >=5.0.0.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Merge Risk: Minimal · up to 4053a

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the root cause, changes, verification results, and post-merge actions. However, it omits most required template sections, including Scope, Truth status, Prior art and reuse, t… Update the description to use the repository template. Add the missing sections and complete the required checkboxes, test result, truth-status evidence, scope, reuse decision, documentation impact, blast radius, and rollback plan.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: pinning Vitest to 4.x in commons-gateway for vitest-pool-workers compatibility.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Full details: Description check

Explanation

The description explains the root cause, changes, verification results, and post-merge actions. However, it omits most required template sections, including Scope, Truth status, Prior art and reuse, the required Tests checklist and result, Docs and registries, and Risk.

Resolution

Update the description to use the repository template. Add the missing sections and complete the required checkboxes, test result, truth-status evidence, scope, reuse decision, documentation impact, blast radius, and rollback plan.

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
floss 4053aff Commit Preview URL

Branch Preview URL
Oct 25 2026, 02:48 AM

@kalisam
kalisam merged commit 6469735 into main Oct 28, 2026
19 checks passed
@kalisam
kalisam deleted the fix/commons-gateway-vitest-pin branch October 28, 2026 13:06

This branch was successfully deployed

1 active deployment
Preview — 4053aff6 Deployed Oct 25, 2026 by vercel[bot]
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