Repository navigation
Slai Agent Runtime: Preserve verbatim stop-parsing argument passing - #28162
Slai.life (huong8373tt-beep) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
Pre-marker array arguments can still be constructed using non-legacy rules and passed incorrectly.
1 open finding
What changed in this PR
Updates Windows native-command invocation so --% selects legacy argument passing, addressing #18664.
Changes:
- Tracks whether
--%was encountered during binding. - Selects legacy process arguments on Windows.
- Adds regression coverage for escaped quotes.
| File | Description |
|---|---|
NativeCommandArguments.Tests.ps1 |
Tests escaped quotes after --%. |
NativeCommandProcessor.cs |
Selects legacy argument dispatch. |
NativeCommandParameterBinderController.cs |
Exposes marker detection. |
NativeCommandParameterBinder.cs |
Records marker presence. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| /// <param name="filePath"></param> | ||
| private bool UseSpecialArgumentPassing(string filePath) => | ||
| NativeParameterBinderController.ArgumentPassingStyle switch | ||
| (Platform.IsWindows && NativeParameterBinderController.HasVerbatimArgumentMarker) |
There was a problem hiding this comment.
Thanks — addressed in a8d7868. The binder now detects --% before any parameter formatting and applies the effective Legacy style across the full Windows native-command argument construction. Added regression coverage for the mode-sensitive array case before the marker (testexe -echoargs 1, 2 --% tail) under Standard and Windows modes.
|
Addressed in a8d7868. The binder now detects |

Summary
--%stop-parsing marker.--%before parameter formatting so the effective Legacy style applies consistently to arguments both before and after the marker.--%and for a mode-sensitive array argument before it, under bothStandardandWindowsargument-passing modes.Fixes #18664.
Validation
StandardorWindowsargument passing,--% /p:Category=\"CI,Nightly\"reached a native test executable with extra escaping.win7-x64Debug product locally.NativeCommandArguments.Tests.ps1with Pester 4.10.1 against the built executable: 66 passed, 0 failed, 1 skipped.git diff --checkpassed.AI assistance disclosure
This issue was discovered while Slai Agent Runtime was operating in a Windows environment. The developer authorized this contribution after the issue was reproduced and the fix was validated. Slai Agent Runtime assisted with reproduction, implementation, and test execution; the account owner is responsible for this submission.