MCP: the auto-save recovery tests look for the JSON-quoted path

automation autosave_is_durable_before_reply_and_queries_do_not_rotate
and the CLI's mcp_autosave_survives_kill_and_restart_without_touching_
desktop_settings asserted that the initialize instructions contain the
previous session's auto-save path as raw text. The instructions embed
the auto-save info as JSON, so on Windows the path's backslashes are
escaped and the raw match can never succeed (both failed on every
Windows run; the server's reply is right). They now look for the path
as serde_json prints it, which also matches on Linux and macOS.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Jeremy YaoandClaude Fable 5.1 committed 2026-10-10 09:37:00 -04:00
1 parent a91952dadc
commit 2a404f6226
2 files changed
+6 -2

No files matched your search

+3 -1
View File
@@ -373,7 +373,9 @@ fn mcp_autosave_survives_kill_and_restart_without_touching_desktop_settings() {
assert_eq!(manifest["ended"], false);
let mut restarted = McpChild::start(&config, true);
let init = restarted.rpc("initialize", json!({}));
assert!(init["instructions"].as_str().unwrap().contains(path));
// The instructions embed the auto-save info as JSON, so the path appears JSON-quoted (on
// Windows with its backslashes escaped).
assert!(init["instructions"].as_str().unwrap().contains(&json!(path).to_string()));
assert_eq!(init["_meta"]["effectcraftAutoSave"]["previousSessions"][0]["autosave"], path);
restarted.tool("open_project", json!({"path":path}));
let comp = restarted.tool("get_comp", json!({"comp":"Survives restart"}));