windows: refresh PATH and assert required tools in scenario run scripts#68
Merged
Merged
Conversation
The HOBL RPC service on the DUT captures PATH at boot. When a scenario prep script installs tools via winget, those tools land in the Machine PATH but the RPC service's inherited PATH is stale, so pwsh sessions spawned afterward cannot find them. Combined with prep_status persistence skipping prep on subsequent runs, this caused net_aspire to fail with cryptic 'dotnet not recognized' errors. Fix: - net_aspire_run.ps1 / net_aspire_teardown.ps1: add Machine+User PATH refresh plus a fallback C:\\Program Files\\dotnet PATH prepend (this is the actually-broken script). Bump prep_version 8 -> 9. - All other Windows run scripts already had the PATH refresh but invoked tools blindly. Add a Get-Command assertion block right after the refresh that lists each required tool, logs a single clear ERROR line and PATH dump on miss, and exits 1 instead of letting the shell emit a chain of 'term not recognized' messages. Affected scenarios (assertion + prep_version bump): net_aspire (8->9), foundrylocal (6->7), ollama (5->6), llvm (7->8), nodejs (6->7), opencv_build (5->6), vscode (7->8), pytorch_inf (12->13), fast_api (4->5) Skipped (no PATH-resolved external tools to assert): mlperf (uses absolute path to mlperf-windows.exe), spring_petclinic (uses local .\\mvnw.cmd and locates JDK via Get-ChildItem)
jewilder
approved these changes
May 12, 2026
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.
The HOBL RPC service on the DUT captures PATH at boot. When a scenario prep script installs tools via winget, those tools land in the Machine PATH but the RPC service's inherited PATH is stale, so pwsh sessions spawned afterward cannot find them. Combined with prep_status persistence skipping prep on subsequent runs, this caused net_aspire to fail with cryptic 'dotnet not recognized' errors.
Fix:
net_aspire_run.ps1 / net_aspire_teardown.ps1: add Machine+User PATH refresh plus a fallback C:\Program Files\dotnet PATH prepend (this is the actually-broken script). Bump prep_version 8 -> 9.
All other Windows run scripts already had the PATH refresh but invoked tools blindly. Add a Get-Command assertion block right after the refresh that lists each required tool, logs a single clear ERROR line and PATH dump on miss, and exits 1 instead of letting the shell emit a chain of 'term not recognized' messages.
Affected scenarios (assertion + prep_version bump):
net_aspire (8->9), foundrylocal (6->7), ollama (5->6), llvm (7->8), nodejs (6->7), opencv_build (5->6), vscode (7->8), pytorch_inf (12->13), fast_api (4->5)
Skipped (no PATH-resolved external tools to assert):
mlperf (uses absolute path to mlperf-windows.exe), spring_petclinic (uses local .\mvnw.cmd and locates JDK via Get-ChildItem)