From 5625ba597b1477a3ff1f1f2684176a25b1758bb7 Mon Sep 17 00:00:00 2001 From: bellman Date: Thu, 14 May 2026 18:26:48 +0900 Subject: [PATCH] omx(team): auto-checkpoint worker-1 [1] --- rust/crates/tools/src/lib.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/rust/crates/tools/src/lib.rs b/rust/crates/tools/src/lib.rs index 6221b6fe..38beee0a 100644 --- a/rust/crates/tools/src/lib.rs +++ b/rust/crates/tools/src/lib.rs @@ -9062,6 +9062,23 @@ mod tests { assert_eq!(background_output["noOutputExpected"], true); } + #[test] + fn bash_tool_classifies_test_timeout_as_hung_with_provenance() { + let timeout = execute_tool( + "bash", + &json!({ "command": "sleep 1 # cargo test slow_case", "timeout": 10 }), + ) + .expect("bash timeout should return output"); + let timeout_output: serde_json::Value = serde_json::from_str(&timeout).expect("json"); + assert_eq!(timeout_output["interrupted"], true); + assert_eq!(timeout_output["returnCodeInterpretation"], "test.hung"); + assert_eq!(timeout_output["structuredContent"][0]["event"], "test.hung"); + assert_eq!( + timeout_output["structuredContent"][0]["data"]["provenance"], + "bash.timeout" + ); + } + #[test] fn bash_workspace_tests_are_blocked_when_branch_is_behind_main() { let _guard = env_lock()