Commit 752be42
committed
fix(test): redact cwd path in ParsePlanRequest on Windows
The previous attempt unconditionally replaced `\\` with `\` on Windows
to unescape Debug-formatted paths, but this also collapsed the `\\?\`
verbatim prefix in Display-formatted paths used by other errors
(e.g. `ambiguous package name`), breaking those snapshots.
Instead, fix the root cause: format `cwd` with Display (`{cwd}`)
rather than Debug (`{cwd:?}`) in `ParsePlanRequest`. Display uses
`Path::display()` which emits raw backslashes on Windows, so the
existing raw `workspace_root_str` redaction works uniformly. Keep
the surrounding double quotes explicitly in the format string so
the existing `"<workspace>/"` snapshot stays exactly as-is.
Revert the test-side `\\` → `\` unescape now that it is no longer
needed and was breaking previously passing tests.
https://claude.ai/code/session_01RyEZx6J2a3SodaA5fzrwk61 parent e592bf1 commit 752be42
2 files changed
+3
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 275 | + | |
| 276 | + | |
284 | 277 | | |
285 | 278 | | |
286 | 279 | | |
| |||
0 commit comments