Skip to content

fix(vscode): use JSON IPC for the rstest worker so it survives VS Code 1.139 - #69

Merged
fi3ework merged 1 commit into
mainfrom
fix-test-json-ipc
Sep 23, 2026
Merged

fi3ework merged 1 commit into
mainfrom
fix-test-json-ipc

Conversation

@fi3ework

Copy link
Copy Markdown
Member

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 with Unable to deserialize cloned data due to invalid or unsupported version on the first message from the extension host, and no Rstest tests were discovered.

This ports the upstream fix into stacks/test:

  • Use the default JSON serialization for the worker IPC channel, which does not depend on either side's V8 version.
  • Pass testNamePattern as a string (core wraps a string in RegExp); WorkerInitOptions types it as string so a RegExp cannot be sent again.
  • Add rpcErrorCodec, spread into both createBirpc calls, so errors thrown across the channel still arrive as Error instances (project.ts relies on error instanceof Error for config-evaluation failures). As before, only name / message / stack cross; the worker-side not-installed classification is unchanged.

packages/vscode/AGENTS.md records 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), and VSCODE_CLI=1 pnpm test:e2e rstest on VS Code 1.139.0 all pass. For comparison, the same E2E slice on main fails 12 tests on 1.139.0.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

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

chatgpt-codex-connector Bot commented Sep 23, 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-09-23T09:45:14.133961Z 3f1ed8f 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.

@fi3ework
fi3ework enabled auto-merge (squash) September 23, 2026 09:41
@fi3ework
fi3ework disabled auto-merge September 23, 2026 09:51
@fi3ework
fi3ework merged commit ca908e6 into main Sep 23, 2026
3 checks passed
@fi3ework
fi3ework deleted the fix-test-json-ipc branch September 23, 2026 09:52
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