Repository navigation
fix(ci): keep the Vitest 5.1 suites green - #89
Merged
Merged
Conversation
Bump @cloudflare/vitest-plugin from 1.4.0 to 1.6.1. Vitest 5.1 enables its filesystem module cache by default, which 1.4.0 serves under a per-session cloudflare:test module id, so every workerd suite failed to read its cached module. 1.4.3 fixes that cache, and 1.6.1 fixes vi.mock factories under Vitest 5.1. Construct the platform-bun conformance failure with ConformanceFailed.make instead of new, which the Effect schema diagnostic refuses. Add a none intent: no published API changes, so no version bump.
Merge Protections🔴 2 of 4 protections blocking · waiting on 👀 reviews and 🙋 you
🔴 Merge authorityWaiting for any of
This rule is failing.A PR merges only after the review app approves it (phase 1) or the review bot's review-gate passes (phase 2). A Dependabot patch or minor bump skips the review gate; a major bump still needs it.
🔴 🚦 Auto-queueWaiting for any of
This rule is failing.When all merge protections are satisfied and these conditions match, this pull request will be queued automatically.
Show 2 satisfied protections🟢 Conventional PR titleThe squash commit takes the PR title, so the title must be a conventional commit.
🟢 Hold labelThe hold label keeps a PR out of the default branch.
|
Vitest 5.1's worker runtime breaks the platform-cloudflare delivery suites and its filesystem module cache overflows the pool WebSocket in workerd, independent of the Cloudflare plugin version: 5.1.0, 5.1.1 and 5.1.2 fail, 5.0.3 passes. The 5.1 line is only required by @systemfsoftware/vitest (peer ^5.1.0), which only platform-bun's gherkin suite uses. Restore the catalog to vitest 5.0.3 and @cloudflare/vitest-plugin 1.4.0, pin platform-bun's own vitest to 5.1.2, and drop the workspace-wide vitest override so that pin takes effect. Reverting the plugin bump too keeps the Cloudflare suites on the plugin version that was green before the bump.
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.
Main's CI is red after #84/#85. The first head of this PR fixed the typecheck error and bumped the Cloudflare plugin, but its CI still failed: this revision fixes the actual cause, and the evidence is below.
CI
build and pack—pnpm typecheckpackages/platform-bun/tests/__fixtures__/conformance-runner.ts(46,21): error TS377094: This Schema class is constructed with new. ConformanceFailed.make(...) can be used.It now uses
ConformanceFailed.make({ failures }), matching every other raise site.test cloudflare 1/2,2/2andtest rest#84 moved the workspace catalog from
vitest5.0.3 to 5.1.2. That bump breaks the Cloudflare packages in two ways that are independent of@cloudflare/vitest-plugin:fsModuleCacheby default, and itsfetchWarmModulessnapshot makes the pool inline the whole cached import graph of a test file into one pool WebSocket message. Under a sharded run that message passes workerd's WebSocket limit, and the worker dies withkj/compat/http.c++ … 1009; Message is too large; the earlierreadAll … node_modules/.vitest-cache/<hash>andnode:inspectorlines came from the same failed module load.platform-cloudflare'smessage-deliveryandprojectionsuites hold and release. The suites poll microtask turns; under 5.1 the state stayspending/unsettled even after 100,000 real-timer turns.Measured locally against the exact CI commands:
vitest5.1.0, 5.1.1 and 5.1.2 fail those suites, 5.0.3 passes; the plugin version makes no difference (1.4.0, 1.4.3, 1.6.1 and 1.10.3 all fail on 5.1.2). The 5.1 line is only required by@systemfsoftware/vitest(peervitest: ^5.1.0), which onlyplatform-bun's gherkin suite uses.So the bump is scoped instead of reverted: the catalog returns to
vitest5.0.3 and@cloudflare/vitest-plugin1.4.0 (the versions that were green before #84),platform-bunpins its ownvitestto 5.1.2, and the workspace-widevitestoverride is removed so that pin takes effect. No test, shard or job is disabled or loosened.The changeset is
none: no published API changes, so no version bump.Verified locally
pnpm -r --filter @systemfsoftware/agent-platform-cloudflare run test --shard=1/2— 18 files, 113 passed, 1 skipped.--shard=2/2— 17 files, 75 passed, 5 skipped.pnpm --filter @systemfsoftware/agent-storage-cloudflare run test— 11 files, 114 passed.pnpm --filter @systemfsoftware/agent run test(effect-agent) — 39 files, 165 passed.pnpm --filter @systemfsoftware/agent-storage-sqlite run test— passed.packages/platform-nodecrash matrix (test/crash/crash.test.ts) — passed; thetest restfailure in the previous run was that real-process-kill timing test, which also passes here.pnpm --filter @systemfsoftware/agent-platform-bun run teston its pinned 5.1.2 — 4 passed;effect-tsgo tsc -b— exit 0.pnpm install --frozen-lockfile— matches the committed lockfile.changeset-management check origin/main— "1 publishable package(s) changed, each accounted for — @systemfsoftware/agent-platform-bun".gritlint check .— clean, 1314 files;dprint check— clean.The full CI matrix passed on this head: run 47497209401,
checks / check: successwith every job green (lint,gritlint,build and pack, both Cloudflare shards,rest, both Postgres shards, both agent-testing shards).Release: one registry action no code change can perform
The Release run fails on
@systemfsoftware/agent-platform-bun@0.1.0withERR_PNPM_AUTH_TOKEN_EXCHANGE … (status code 404)followed byFailed to publish … (status 404 Not Found). npm cannot authenticate a package's first publish through OIDC trusted publishing: the trusted-publisher settings page exists only for a package that is already on the registry, so the exchange has nothing to bind and the registry answers 404 (npm/cli#8544). Every other package in this workspace was bootstrapped the same way.Publish 0.1.0 once with a granular token that may publish
@systemfsoftware:Then add the trusted publisher for later versions: npmjs.com →
@systemfsoftware/agent-platform-bun→ Settings → Trusted publishing → GitHub Actions, organizationsystemfsoftware, repositoryagent, workflowrelease.yml.Until 0.1.0 exists on npm, each main push re-attempts it and the Release workflow stays red on that step; CI itself is green after this change. The
noneintent leaves the next release cycle with no version bump, so 0.1.0 remains the version to bootstrap.