Fix Windows test failures by removing .cmd fixtures and adding test bridge injection#364
Merged
mmprotest merged 1 commit intoMay 29, 2026
Conversation
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.
Motivation
spawn EINVALbecause test fixtures generated.cmdwrappers or wrote batch text to files named*.exe, which Node cannot spawn withshell: falseand are not real executables.spawn(..., { shell: false })).Description
.cmd/shell-wrapper test fixtures with temporary Node bridge modules andCommandSpecusage inintegrations/pi-villani/src/process.test.tsso tests invokeprocess.execPathdirectly; updated file:process.test.ts.integrations/pi-villani/src/index.ts(bridgeStarter+__setBridgeStarterForTests) so tests can inject a mock starter while production defaults tostartVillaniBridgeProcess.integrations/pi-villani/src/extension.test.tsto install a mock bridge starter that launches the temporarybridge.mjsviaprocess.execPath, to avoid creating.cmdwrappers; ensure injected starters/prompters are restored in everyfinallyblock and add awaitForConditionhelper for synchronization.villani-code.exe).spawnoptions (still usesshell: false).integrations/pi-villani/src/index.ts,integrations/pi-villani/src/process.test.ts,integrations/pi-villani/src/extension.test.ts.Testing
cd integrations/pi-villani && npm test; result: test suite passed (38 tests, 38 passed, 0 failed).cd integrations/pi-villani && npm run build; result: TypeScript build succeeded.cd integrations/pi-villani && pi install .in this environment butpiis not installed here, so it could not be executed (not run).Codex Task