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 <noreply@anthropic.com>
This commit is contained in:
Andrea AlteaandClaude Opus 5.5 committed 2026-11-27 14:15:04 +01:00
1 parent 17a7469bab
commit 6bcd6d1925
1 file changed
+7 -1
+7 -1
View File
@@ -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();