Repository navigation
test: keep the last argument out of the test-integration.bat help block - #345947
Merged
Aaron Munger (amunger) merged 1 commit intoNov 4, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the script-name handling fix, though the Windows CI proof run is still pending.
No open issues 🎉
What changed in this PR
Fixes Windows Agent Host E2E startup failures caused by argument parsing changing %0, allowing parentheses in the last argument to break the help block.
Changes:
- Captures the script filename before
shiftprocesses arguments. - Uses the saved filename in help usage and examples, also correcting
--helpoutput.
No actionable findings remain. The Windows CI proof run is pending per the PR description.
| File | Description |
|---|---|
scripts/test-integration.bat |
Saves SCRIPT_NAME before argument parsing and uses it throughout the help block. |
Review effort: Balanced
Aaron Munger (amunger)
marked this pull request as ready for review
November 4, 2026 00:07
Aaron Munger (amunger)
enabled auto-merge (squash)
November 4, 2026 00:08
Aaron Munger (amunger)
approved these changes
Nov 4, 2026
shift also shifts %0, so after the argument loop %~nx0 is the last argument. Since #345871 the Agent Host E2E runner passes --tfs values such as "Integration Tests Copilot (1/2) full", which made %~nx0 "2) full". cmd parses the whole help block even when it does not run it, so the ")" ended the block and every two-process suite failed with "full was unexpected at this time." on Windows. Save the script name before parsing instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bryan Chen (bryanchen-d)
force-pushed
the
copilot/vscode/test-integration-bat-script-name
branch
from
November 4, 2026 00:14
1603bc5 to
351aa03
Compare
Aaron Munger (amunger)
deleted the
copilot/vscode/test-integration-bat-script-name
branch
November 4, 2026 00:27
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.
Fixes the Windows x64 Agent Host E2E failure in main CI since #345871, first seen in 492607. All 8 two-process suites exit 255 right away with
full was unexpected at this time., and the single-process suites run normally.Cause:
scripts\test-integration.batparses its arguments withshift, which shifts%0too, so after the loop%~nx0is the last argument. In ADO the Agent Host E2E runner appends the suite label and profile to--tfs, so for the new two-process suites the last argument isIntegration Tests Copilot (1/2) full, and%~nx0becomes2) full. cmd parses theif defined SHOW_HELP ( ... )block even when it doesn't run it, soecho Usage: 2) full [options]ends the block at that). GitHub PR CI doesn't pass--tfs, so it never hit this.Fix: save
%~nx0inSCRIPT_NAMEbefore parsing, the same waySCRIPT_DIRalready is, and use it in the help text. This also corrects--help, which used to printUsage: --help [options].Validation:
child.ps1launch path withtest.batandnodestubbed, using CI's argument order (--run … --testShard 1/2 --build --tfs "Integration Tests Copilot (1/2) full"). Before the fix:full was unexpected at this time., exit 255. After the fix: the arguments reachtest.batunchanged and it exits 0, forCopilot OTel,Copilot (1/2)andCodex (2/2).--helpprintsUsage: test-integration.bat [options].Run Agent Host E2E tests (Electron)succeeded. All 8(1/2)and(2/2)processes plus the 2 single-process suites ran their tests, with 0 failing.