From 6bcd6d1925fc1ae6738e21b4e22fc7029cd96eb7 Mon Sep 17 00:00:00 2001 From: Andrea Altea Date: Fri, 27 Nov 2026 14:15:04 +0100 Subject: [PATCH] mcp: give the child-window test a fixture wide enough for compact JSON With compact output the 24-card one-level tree is smaller than the 1 KB envelope, so `limit > 2048` no longer held and the paged walk had no room. The test now builds its own wide fixture (48 children with longer names) instead of lowering the bound. Co-Authored-By: Claude Opus 5.5 --- crates/mcp/tests/it/inspect_fields.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/mcp/tests/it/inspect_fields.rs b/crates/mcp/tests/it/inspect_fields.rs index cba962ce2..c0ed4b895 100644 --- a/crates/mcp/tests/it/inspect_fields.rs +++ b/crates/mcp/tests/it/inspect_fields.rs @@ -130,7 +130,13 @@ fn fields_and_outline_survive_every_depth_retry() { #[test] fn compact_children_keep_window_markers_and_page_in_order() { let mut c = Client::new(); - let root = tree(|params| c.create(params)); + // Wide and one level deep: compact JSON makes `tree`'s 24 cards smaller than the 1 KB envelope, + // so these children carry enough text that the one-level tree still needs a child window. + let root = c.create(json!({"type": "frame", "name": "Product list", "width": 1200, "height": 2400})); + for i in 0..48 { + c.create(json!({"type": "frame", "parent": root, "name": format!("Product card {i}: synthetic product name"), + "width": 280, "height": 160})); + } let full = c.ok("get_node", json!({"id": root, "depth": 1, "fields": []})); let expected = full["children"].as_array().unwrap(); let wire = serde_json::to_string(&serde_json::to_string(&full).unwrap()).unwrap().len();