From 85e8c51b8a396fe03d60a50f197acaf6304a8f74 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 12 Oct 2026 07:40:54 -0400 Subject: [PATCH] Tests: the MCP resources test also ignores Purge All's disabledReason #3740 added disabledReason/needsDocument to the command list. For edit.purge.all they flip with `enabled` while other tests in the binary fill and purge the caches, so ignore them alongside `enabled`. Co-Authored-By: Claude Opus 5.5 --- crates/automation/tests/mcp.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/automation/tests/mcp.rs b/crates/automation/tests/mcp.rs index af5459af..4ba51f9d 100644 --- a/crates/automation/tests/mcp.rs +++ b/crates/automation/tests/mcp.rs @@ -1236,11 +1236,16 @@ async fn convention_resources_are_live_json() { assert_eq!(read("photocraft://document").await["width"], 8); // Edit › Purge › All is enabled while the process-wide effect, mask and stack caches hold // anything, and the other tests in this binary fill and purge those caches concurrently, so - // its `enabled` flag can flip between the two reads. Every other field must match exactly. + // its `enabled` flag (and the `disabledReason` that goes with it) can flip between the two + // reads. Every other field must match exactly. let stable = |mut v: Value| { for c in v.as_array_mut().into_iter().flatten() { - if c["id"] == "edit.purge.all" { - c.as_object_mut().map(|o| o.remove("enabled")); + if c["id"] == "edit.purge.all" + && let Some(o) = c.as_object_mut() + { + for k in ["enabled", "disabledReason", "needsDocument"] { + o.remove(k); + } } } v