Commit 80e42a9
fix(harness): assert redacted tool path per host separator
The experiment runner test failed only on windows-latest, expecting
`<trial-root>/README.md` while the run emitted `<trial-root>\README.md`.
The fault was in the test, not the runner. Its fake executor builds
`input.path` with native `join(context.worktree, "README.md")`, and
`redactEvidenceValue` deliberately rewrites just the trial-root prefix and
leaves separators alone. Normalizing separators inside the runner would be
wrong: tool payloads are opaque host data, so a blanket backslash rewrite
would corrupt code content, regex literals, and Windows command lines.
Replace the stringified-blob `toContain` with a structural assertion on the
`tool-call-started` event's `input.path`, normalizing separators at that
boundary. This matches the existing precedent in compare.test.ts and asserts
on parsed event shape rather than on text that happens to contain it.
Also close a latent gap in the neighbouring leak guard: `JSON.stringify`
escapes backslashes, so `not.toContain(root)` could never match a leaked
native Windows root and passed vacuously there. It now also checks the
JSON-escaped form, which is equivalent to the raw check on POSIX.
Validated with the full harness package suite (172 tests, 20 files) and
`tsc --noEmit`. Since a local macOS pass is not Windows evidence, the
runner's redaction logic was also replayed against `path.win32` drive and
UNC roots plus posix; the win32 form reproduces the exact CI symptom and
normalizes correctly. The windows-latest job remains the authoritative
receipt.
Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>1 parent 684e727 commit 80e42a9
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
| |||
0 commit comments