From b9ef35592c22cdca048474959750ec542c08df0a Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sat, 21 Nov 2026 08:34:04 -0700 Subject: [PATCH] test(mcp): the tree digest names files with / on every system handles_from_before_a_close_do_nothing_after_the_book_is_open_again adds the planted stray file to the digest as uploads/stray.bin, but the walk keyed the same file by the system's path, uploads\stray.bin on Windows, so the two maps could never be equal there. The helper now keys with / everywhere; the assertion (an old handle changes no file) is untouched. Co-Authored-By: Claude Fable 5.2 --- crates/ledger-mcp/src/local.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ledger-mcp/src/local.rs b/crates/ledger-mcp/src/local.rs index d767ab6f..18dc51df 100644 --- a/crates/ledger-mcp/src/local.rs +++ b/crates/ledger-mcp/src/local.rs @@ -5418,8 +5418,14 @@ mod tests { if path.is_dir() { walk(base, &path, out); } else if let Ok(bytes) = std::fs::read(&path) { + // Keyed with `/` between parts on every system (the + // test names files so), not the system's separator. out.insert( - path.strip_prefix(base).unwrap().display().to_string(), + path.strip_prefix(base) + .unwrap() + .display() + .to_string() + .replace('\\', "/"), bytes, ); }