From a35f6da339ba4fe80f0afd5e7897cd25c6c2b38e Mon Sep 17 00:00:00 2001 From: Molecule AI Infra-Runtime-BE Date: Mon, 11 May 2026 17:42:21 +0000 Subject: [PATCH] fix(tests): correct assert in test_sanitize_agent_error_stderr_and_exc The exc class IS the tag when stderr is provided: "Agent error (ValueError): rate limit exceeded" Fixes the incorrect assertion added in PR #517. Co-Authored-By: Claude Opus 4.7 --- workspace/tests/test_executor_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/tests/test_executor_helpers.py b/workspace/tests/test_executor_helpers.py index a3b0367b..0aa0c991 100644 --- a/workspace/tests/test_executor_helpers.py +++ b/workspace/tests/test_executor_helpers.py @@ -761,7 +761,7 @@ def test_sanitize_agent_error_stderr_and_exc(): """exception + stderr: exc type is the tag, stderr is the body.""" err = ValueError("this should not appear") out = sanitize_agent_error(exc=err, stderr="rate limit exceeded") - assert "ValueError" not in out # exc class is overridden by stderr + assert "ValueError" in out # exc class IS the tag when stderr is provided assert "rate limit exceeded" in out