fix(test): use path.sep in qmd-manager XDG assertions for Windows compat#23128
Closed
dashed wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(test): use path.sep in qmd-manager XDG assertions for Windows compat#23128dashed wants to merge 1 commit intoopenclaw:mainfrom
dashed wants to merge 1 commit intoopenclaw:mainfrom
Conversation
36cbae4 to
e52609c
Compare
Contributor
Author
|
Closing — upstream main already includes a fix for this same issue (using a |
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
Fixes the Windows CI failure in
src/memory/qmd-manager.test.tsintroduced by #19617 (commit 3317b49).The test "passes manager-scoped XDG env to mcporter commands" asserts
toContain("/agents/main/qmd/xdg-config")with hardcoded Unix forward slashes. On Windows,path.joinproduces backslash-separated paths (\agents\main\qmd\xdg-config), so the assertion fails.Root Cause
The source code (
qmd-manager.ts:145) correctly usespath.join(this.qmdDir, "xdg-config"), which produces OS-native separators. The test assertion at line 988 uses a hardcoded forward-slash string that doesn't match on Windows.Changes
src/memory/qmd-manager.test.ts— Usepath.sepfor cross-platform assertions:pathis already imported in the test file.path.sepis/on Unix and\on Windows, matching the output ofpath.joinused in the source.Impact
checks-windows (node, test)job is currently failing on main (run 22268115588)Greptile Summary
Fixed Windows test failure by using
path.sepin XDG path assertions. The test now correctly matches OS-native path separators produced bypath.joinin the source code (qmd-manager.ts:149-150).["agents", "main", "qmd", "xdg-config"].join(path.sep)XDG_CONFIG_HOMEandXDG_CACHE_HOMEassertionspathmodule already imported; no additional dependencies neededConfidence Score: 5/5
path.septo match the behavior ofpath.joinin the source code, making the test assertions platform-agnostic. No logic changes, no security implications, and the fix directly resolves the failing Windows CILast reviewed commit: 36cbae4