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 <noreply@anthropic.com>
This commit is contained in:
Molecule AI · core-devops 2026-05-11 17:25:03 +00:00 committed by Molecule AI Infra-Runtime-BE
parent 303cc4623e
commit 7f90630f98

View File

@ -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():