Repository navigation
test: fix main's red win32 prompt-carry control after PowerShell one-line quoting (#23672 × #24257) - #25745
Closed
brennanb2025 wants to merge 1 commit into
Closed
test: fix main's red win32 prompt-carry control after PowerShell one-line quoting (#23672 × #24257)#25745brennanb2025 wants to merge 1 commit into
brennanb2025 wants to merge 1 commit into
Conversation
…werShell quotes multi-line prompts on one line
Contributor
Author
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.
What broke
Main's unit tests fail on every PR at
src/shared/startup-line-prompt-carry.test.ts→ "on a host that cannot prove the launched agent is in front › carries a multi-line prompt on the launch line". The control assertion expected a Windows multi-line prompt NOT to be carried on the launch line, and it now is.Why
Two merges crossed. #24257 added this test. #23672 then changed how a multi-line PowerShell argument is quoted: it now becomes one physical line with
`nescapes instead of raw line breaks, which #23672 pins in its own test. #23672's CI ran on a base that did not have #24257's test yet.With one line and no control bytes, the 204-byte sample prompt now fits under the 512-byte launch-line budget. So the control that was meant to show "the in-front proof alone decides" no longer tells the two cases apart. The code is right by the module's own rule. Only the test's sample was too short.
The change (test only)
The multi-line sample grows from 5×40 to 5×120 characters (about 617 bytes once quoted). That puts it past the budget again, so the proof flag flips the outcome as the control intends. Platform and proof flag are unchanged, so it stays a one-variable control.
User-facing change: none. Windows launches always report that they cannot prove the agent is in front (
launchHostProvesAgentInFrontreturns false on win32), so production never reaches the size branch for Windows.Testing
startup-line-prompt-carry.test.ts,tui-agent-startup.test.tsandpowershell-native-argument.test.ts: 3 files, 97 tests pass.