fix(vscode): use JSON IPC for the rstest worker so it survives VS Code 1.139 - #69
Merged
Merged
Conversation
…e 1.139 VS Code 1.139 ships Electron 43 (V8 15.0), whose V8 serializer writes format version 16. Released Node versions only read up to version 15, so with `serialization: 'advanced'` the worker crashed on the first message from the extension host and no tests were discovered. Switch the worker channel to the default JSON serialization, pass `testNamePattern` as a string instead of a RegExp, and carry thrown errors through birpc as plain fields that are rebuilt on the receiving side. Port of web-infra-dev/rstest#1888.
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. |
fi3ework
enabled auto-merge (squash)
September 23, 2026 09:41
fi3ework
disabled auto-merge
September 23, 2026 09:51
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.
Summary
VS Code 1.139 ships Electron 43 (V8 15.0). Its V8 serializer writes format version 16, which released Node (22 / 24 / 26) cannot read. The test stack spawned its worker with
serialization: 'advanced', so the worker crashed withUnable to deserialize cloned data due to invalid or unsupported versionon the first message from the extension host, and no Rstest tests were discovered.This ports the upstream fix into
stacks/test:testNamePatternas a string (core wraps a string inRegExp);WorkerInitOptionstypes it asstringso aRegExpcannot be sent again.rpcErrorCodec, spread into bothcreateBirpccalls, so errors thrown across the channel still arrive asErrorinstances (project.tsrelies onerror instanceof Errorfor config-evaluation failures). As before, onlyname/message/stackcross; the worker-side not-installed classification is unchanged.packages/vscode/AGENTS.mdrecords this as a targeted port that is not yet merged upstream.Validation:
pnpm lint,pnpm test:unit(including a new JSON round-trip test for the codec), andVSCODE_CLI=1 pnpm test:e2e rsteston VS Code 1.139.0 all pass. For comparison, the same E2E slice onmainfails 12 tests on 1.139.0.Related Links
Checklist