From 64b075b7b82b4355e0e977ea744e31e7b5910607 Mon Sep 17 00:00:00 2001 From: lawrencecchen <54008264+lawrencecchen@users.noreply.github.com> Date: Wed, 4 Nov 2026 14:44:25 +0000 Subject: [PATCH] test(acpmux): background task updates and the process list carry the Bash call's description #34845 sends a background shell's `description` (Claude's Bash `description`) in its `background_task_update` and keeps it on the process row (docs/background-processes.md), so a client that never loaded the call still names it. The hub_integration background_task and processes tests still expected the rows without it and went red on feat; they now expect the fake's descriptions ("Run npm run dev", "Run cargo test", "Build"). --- .../acpmux/tests/hub_integration/background_task.rs | 9 ++++++--- .../crates/acpmux/tests/hub_integration/processes.rs | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cmux-tui/crates/acpmux/tests/hub_integration/background_task.rs b/cmux-tui/crates/acpmux/tests/hub_integration/background_task.rs index e689d8c31990..805880e00840 100644 --- a/cmux-tui/crates/acpmux/tests/hub_integration/background_task.rs +++ b/cmux-tui/crates/acpmux/tests/hub_integration/background_task.rs @@ -37,9 +37,11 @@ async fn a_claude_background_shell_reports_how_it_ended() { ends(&hub, &id), vec![ json!({"sessionUpdate": "background_task_update", "taskId": "b1", "toolCallId": "toolu_bg1", - "command": "npm run dev", "state": "stopped", "reason": "Stopped by the agent"}), + "command": "npm run dev", "description": "Run npm run dev", "state": "stopped", + "reason": "Stopped by the agent"}), json!({"sessionUpdate": "background_task_update", "taskId": "b2", "toolCallId": "toolu_bg2", - "command": "cargo test", "state": "completed", "summary": "Tests passed"}), + "command": "cargo test", "description": "Run cargo test", "state": "completed", + "summary": "Tests passed"}), ] ); hub.shutdown_all().await; @@ -104,7 +106,8 @@ async fn a_shell_moved_to_the_background_reports_how_it_ended() { c.request(method::SESSION_PROMPT, prompt).await.unwrap(); let want = vec![json!({"sessionUpdate": "background_task_update", "taskId": "m1", "toolCallId": "toolu_mv", "command": "npm run build", - "state": "completed", "summary": "Build finished"})]; + "description": "Build", "state": "completed", + "summary": "Build finished"})]; assert_eq!(ends(&hub, &id), want); hub.shutdown_all().await; let _ = std::fs::remove_dir_all(&root); diff --git a/cmux-tui/crates/acpmux/tests/hub_integration/processes.rs b/cmux-tui/crates/acpmux/tests/hub_integration/processes.rs index a03e428b331f..481a0ebc8a70 100644 --- a/cmux-tui/crates/acpmux/tests/hub_integration/processes.rs +++ b/cmux-tui/crates/acpmux/tests/hub_integration/processes.rs @@ -151,11 +151,11 @@ async fn process_list_shows_how_each_shell_ended() { list, vec![ with(json!({"id": format!("{id}/b1"), "toolCallId": "toolu_bg1", "taskId": "b1", - "command": "npm run dev", "state": "killed", "reason": "agent", - "detail": "Stopped by the agent"})), + "command": "npm run dev", "description": "Run npm run dev", "state": "killed", + "reason": "agent", "detail": "Stopped by the agent"})), with(json!({"id": format!("{id}/b2"), "toolCallId": "toolu_bg2", "taskId": "b2", - "command": "cargo test", "state": "exited", "reason": null, - "detail": "Tests passed"})), + "command": "cargo test", "description": "Run cargo test", "state": "exited", + "reason": null, "detail": "Tests passed"})), ] ); let moved = chat(&mut c, "bg-moved").await;