Repository navigation
Run SDK PGlite unit tests in separate processes on Linux - #394
Merged
Merged
Conversation
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-sdk-unit-pglite-void-cloud.voidzero-docs.workers.dev (commit c67b6c6)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
Node 24 on Linux can abort with a V8 fatal check in ThreadIsolation::UnregisterWasmAllocation while it frees PGlite's Wasm code after a file finishes in a worker thread. The abort kills the shared Vitest process with exit code 132, so the CI unit job shows no summary and no failing test. The SDK unit project still runs its four PGlite files on threads. Move them into a sibling unit-pglite project that uses forks on Linux and threads elsewhere, with the same scheduling group, worker limit and Windows timeout as unit. CI, test:unit, the affected runner's --unit selection and TESTING.md now name the new project, and the existing SDK unit assignment test includes it. Also drop the PGlite placement check from test-projects.test.ts. It tested the test configuration rather than product behavior. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Brooooooklyn
force-pushed
the
fix/sdk-unit-pglite
branch
from
October 8, 2026 10:09
9c462e7 to
c67b6c6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c67b6c6a4c
ℹ️ 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".
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
The CI
test (ubuntu-latest, unit)job can die on Linux with exit code 132, and no test fails. This is the same Node 24 V8 abort that #393 fixed forplatform-unit:The SDK
unitproject runs 4 PGlite files in worker threads:packages/void/test/unit/db-export-roundtrip.test.tspackages/void/test/unit/platform-database-lock.test.tspackages/void/test/unit/platform-database-migrations.test.tspackages/void/test/unit/runner-pg.test.tsSeen twice on Oct 8, both with
vp test run --project unit --project cli-uniton Node 24.21.0:platform-database-lock(2.5 s before)runner-pg(8.6 s before)No other Wasm runs in that job.
cli-unithas no PGlite file. The SDK integration PGlite test already runs in forks.Fix
Move the 4 files into a new project,
unit-pglite. It uses forks on Linux and threads on other platforms. All other options matchunit: the scheduling group, the worker limit, and the Windows timeout.unit-pglite: the CI unit shard,test:unit, the affected runner's--unitlist, andTESTING.md.unit-pglite.test-projects.test.tsis removed. It tested the test configuration, not product behavior.Testing
vp test run --project unit --project unit-pglite --project cli-unit(the CI command): 394 files, 7585 tests passed.vp test run --project unit-pglite --pool forks: 4 files, 28 tests passed.vp test list: the 4 files are only in[unit-pglite], and no file runs twice.unit-pglite, and macOS and Windows select threads.🤖 Generated with Claude Code