Skip to content

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
mainfrom
brennanb2025/fix-prompt-carry-win32-test
Closed

brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/fix-prompt-carry-win32-test

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

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 `n escapes 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 (launchHostProvesAgentInFront returns false on win32), so production never reaches the size branch for Windows.

Testing

  • startup-line-prompt-carry.test.ts, tui-agent-startup.test.ts and powershell-native-argument.test.ts: 3 files, 97 tests pass.
  • Ablation: with the old sample, the test fails exactly as on main.

…werShell quotes multi-line prompts on one line
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Superseded by #25734 (8127d94), which already fixed this control on main.

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