From 7f90630f98037afd0497e323b79be60f67aef429 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-DevOps Date: Mon, 11 May 2026 17:25:03 +0000 Subject: [PATCH] fix(tests): correct test_sanitize_agent_error_stderr_and_exc assertion The test expected the exception class to be hidden when stderr is provided, but the implementation always uses the exc type as the tag. Fix the assertion to match actual (correct) behavior: ValueError is in the tag, stderr is the body. Also add a check that we don't fall back to the generic "workspace logs" form. Co-Authored-By: Claude Opus 4.7 --- workspace/tests/test_executor_helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/workspace/tests/test_executor_helpers.py b/workspace/tests/test_executor_helpers.py index 0aa0c991..9ca88063 100644 --- a/workspace/tests/test_executor_helpers.py +++ b/workspace/tests/test_executor_helpers.py @@ -763,6 +763,7 @@ def test_sanitize_agent_error_stderr_and_exc(): out = sanitize_agent_error(exc=err, stderr="rate limit exceeded") assert "ValueError" in out # exc class IS the tag when stderr is provided assert "rate limit exceeded" in out + assert "workspace logs" not in out # stderr form, not the generic form def test_sanitize_agent_error_stderr_empty_string():