test(bash-tools): fix Windows CI path prepend assertion#26049
Closed
drvoss wants to merge 1 commit intoopenclaw:mainfrom
Closed
test(bash-tools): fix Windows CI path prepend assertion#26049drvoss wants to merge 1 commit intoopenclaw:mainfrom
drvoss wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Windows CI runners inject extra directories (e.g. PowerShell 7) at the start of PATH before the test-prepended entries. Use indexOf to locate where the custom prepend entries begin rather than assuming position 0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Feb 25, 2026
This comment was marked as spam.
This comment was marked as spam.
Contributor
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
Fix a pre-existing Windows CI test failure in
bash-tools.test.ts. The test for "prepends configured path entries" assumed the custom prepend entries would be at positions 0-N of the PATH, but Windows CI runners inject additional directories (e.g.C:\Program Files\PowerShell\7) before the test-managed entries.The fix uses
indexOfto locate where our custom entries start, then verifies they appear contiguously before the base PATH entry.This failure affected every PR that runs the Node test suite on Windows.
Change Type
Scope
Linked Issue
N/A — pre-existing test environment issue
User-visible Changes
No user-visible changes.
Security Impact (required)
No security impact. Test file only.
Repro + Verification
pnpm test src/agents/bash-tools.test.tson a Windows machine where PowerShell 7 is installed and in PATH.AssertionError: expected ["C:\\Program Files\\PowerShell\\7", "C:\\custom\\bin"] to deeply equal ["C:\\custom\\bin", "C:\\oss\\bin"]Evidence
CI log from multiple PRs (#25140, #25152) showing identical failure:
Human Verification (required)
Compatibility
No compatibility impact. Test-only change.
Failure Recovery
N/A
Risks
Low. Test-only change.
Greptile Summary
Fixed Windows CI test failure in
bash-tools.test.tswhere the PATH prepend assertion assumed custom entries would start at index 0. Windows CI runners inject additional paths (likeC:\Program Files\PowerShell\7) before test-managed entries. The fix usesindexOfto locate custom prepend entries and verifies they appear contiguously before the base PATH entry.Confidence Score: 5/5
Last reviewed commit: 386b60a