Repository navigation
Add guarded Windows command execution wrapper - #835
Merged
Merged
Conversation
Provide parse-before-launch, isolated child TEMP/TMP, no-clobber console and marker outputs, and hash/exit metadata for a single PowerShell script. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ab63a795-3de3-4dc6-ae00-6e86639f5856 Signed-off-by: Colin Neilens <coneilen@microsoft.com>
coneilen
force-pushed
the
coneilen-standard-run-wrapper
branch
from
October 16, 2026 02:40
46469d7 to
05720f4
Compare
8 tasks
coneilen
marked this pull request as ready for review
October 16, 2026 04:02
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.
Summary
Adds a guarded Windows PowerShell wrapper for one script, with parse-before-launch, isolated child TEMP/TMP, no-clobber outputs, and exit/hash metadata. Registers its plain-PowerShell contract in the Windows runner.
Changes
Tools\windows\Invoke-AgentCommand.ps1with string-array forwarding, redirectable streams 1–6 capture, per-run TEMP/TMP, and a derived.exit.jsonmarker.ValidationRunner.Tests.ps1; existingTools/windows/*classification selects Windows CI.Test plan
RED: pwsh -NoProfile -File C:\Users\coneilen\AppData\Local\Temp\graphcode-agent-command-missing-api-d61cb32c7f4940c38456d0542d17a68b\Tools\windows\Tests\Invoke-AgentCommand.Tests.ps1 -> exit 1; MISSING-API control: wrapper path absent in test-only tree; The term 'C:\Users\coneilen\AppData\Local\Temp\graphcode-agent-command-missing-api-d61cb32c7f4940c38456d0542d17a68b\Tools\windows\Invoke-AgentCommand.ps1' is not recognized as a name of a cmdlet, function, script file, or executable program.
GREEN: pwsh -NoProfile -File Tools\windows\Tests\Invoke-AgentCommand.Tests.ps1 -> exit 0; PASS; executed=6; cases=argument-stream-marker,zero-arguments,existing-console,existing-marker,parse-failure,child-nonzero
REGRESSION: pwsh -NoProfile -File Tools\windows\Tests\Invoke-AgentCommand.Tests.ps1 -> same GREEN run; exit 0; six cases passed, including argument fidelity and no-clobber/parse/nonzero negative controls
The RED result is MISSING-API only: the isolated test-only tree omitted the wrapper after implementation was already written. It is not behavioral RED evidence and does not establish test-first development. GREEN and REGRESSION refer to the same one local invocation, run with process-only TEMP/TMP set to
C:\Users\coneilen\AppData\Local\Temp\graphcode-agent-command-green-2b0e48ebe9c4454bac649de0c27af886\temp; its passing test scratch was removed.The six cases are argument-stream-marker, zero-arguments (omitted and explicit-empty subcontrols), existing-console, existing-marker, parse-failure, and child-nonzero. The full ValidationRunner,
make test,make check, and PR CI were not run locally; PR CI will exercise the registered runner contract.Checklist
git commit -s) per the DCOmake test)make check)The test-first checkbox remains unchecked because the only RED control was MISSING-API after implementation existed; full local
make testandmake checkwere not run.