#23142: fix(test): Windows CI — use path.join for XDG path assertions in qmd-manager
size: XS
Cluster:
Windows Compatibility Fixes
## Summary
- **Problem:** `qmd-manager.test.ts` fails on Windows CI because XDG path assertions use hardcoded forward slashes (`/agents/main/qmd/xdg-config`), which don't match Windows backslash paths (`\agents\main\qmd\xdg-config`).
- **Why it matters:** This causes intermittent CI failures on the `checks-windows` job for every PR.
- **What changed:** Replaced hardcoded `/`-separated path fragments with `path.join()` calls in two assertions (lines 988-989).
- **What did NOT change:** No production code modified. Test-only fix, 1 file, 2 lines changed.
## Change Type (select all)
- [x] Bug fix
## Scope (select all touched areas)
- [x] CI/CD / infra
## Linked Issue/PR
- Fixes intermittent `checks-windows` CI failures across all PRs
## User-visible / Behavior Changes
None.
## Security Impact (required)
- New permissions/capabilities? `No`
- Secrets/tokens handling changed? `No`
- New/changed network calls? `No`
- Command/tool execution surface changed? `No`
- Data access scope changed? `No`
## Evidence
Before (fails on Windows):
```typescript
expect(spawnOpts?.env?.XDG_CONFIG_HOME).toContain("/agents/main/qmd/xdg-config");
expect(spawnOpts?.env?.XDG_CACHE_HOME).toContain("/agents/main/qmd/xdg-cache");
```
After (works on all platforms):
```typescript
expect(spawnOpts?.env?.XDG_CONFIG_HOME).toContain(path.join("agents", "main", "qmd", "xdg-config"));
expect(spawnOpts?.env?.XDG_CACHE_HOME).toContain(path.join("agents", "main", "qmd", "xdg-cache"));
```
The production code in `qmd-manager.ts` (line 149-150) already uses `path.join()` correctly — only the test assertion was using hardcoded separators.
## Human Verification (required)
- Verified: Test passes locally on macOS
- Edge cases: `path.join` produces `\` on Windows, `/` on macOS/Linux — assertion works on both
- What I did **not** verify: Cannot run Windows CI locally, but the fix is straightforward
## Compatibility / Migration
- Backward compatible? `Yes`
- Config/env changes? `No`
- Migration needed? `No`
## Failure Recovery (if this breaks)
- Revert this single commit
- Zero risk — test-only change
## Risks and Mitigations
None.
Made with [Cursor](https://cursor.com)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Replaced hardcoded forward-slash path separators with `path.join()` in two XDG path assertions to fix Windows CI failures. The production code in `qmd-manager.ts:149-150` already uses `path.join()` correctly — this change aligns the test assertions with the implementation, ensuring tests pass on both Windows (backslash paths) and Unix-like systems (forward slash paths).
<h3>Confidence Score: 5/5</h3>
- Safe to merge — test-only fix with zero risk to production code
- The change is a minimal, focused fix that only affects test assertions (2 lines in 1 test file). It correctly uses `path.join()` to generate platform-appropriate path separators, matching the pattern already used in the production code. The `path` module is already imported, and the fix directly addresses the documented Windows CI failures without introducing any new logic or edge cases.
- No files require special attention
<sub>Last reviewed commit: b171982</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#23480: fix(test): use path.join for cross-platform XDG path assertions in ...
by hydro13 · 2026-02-22
92.5%
#13848: fix(test): normalize paths in source-display test for windows
by gengmao · 2026-02-11
79.4%
#22178: test(web): allow fixture roots in media local file tests
by Kansodata · 2026-02-20
78.7%
#19931: Config: merge PATH env vars and bootstrap Windows bins
by Kemalau · 2026-02-18
78.1%
#22074: Fix/windows fstat dev mismatch
by anillBhoi · 2026-02-20
77.2%
#20330: Fix SSH tunnel startup on Windows by resolving ssh from PATH
by graysurf · 2026-02-18
77.2%
#10714: fix: handle Windows PATH case-sensitivity in node register invoke
by Yida-Dev · 2026-02-06
77.2%
#10708: fix: handle Windows PATH case-sensitivity in exec environment
by Yida-Dev · 2026-02-06
77.0%
#7507: test(ci): make tests cross-platform (Windows) + add basic sanitizat...
by ThinkIbrokeIt · 2026-02-02
76.6%
#5496: Fix: Windows path separators stripped in Gateway scheduled task
by giuliozelante · 2026-01-31
76.1%