fix(workspace): restore _sanitize_for_external and stderr param + fix test assertion #533

Closed
infra-runtime-be wants to merge 2 commits from fix/test-sanitize-agent-error-stderr-exc into main

2 Commits

Author SHA1 Message Date
0230d47344 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 <noreply@anthropic.com>
2026-05-11 18:07:07 +00:00
46b618e1bf fix(workspace): include ~1KB sanitized stderr in A2A error responses
Adds an optional `stderr` parameter to sanitize_agent_error(). When
provided, up to 1 KB of stderr text is included in the A2A error
response after sanitization (API keys / bearer tokens ≥20 chars /
long paths redacted). The existing generic form is preserved when
stderr is absent. Updates both the main a2a_executor and the google-adk
adapter.

Closes: roadmap item — SDK executor stderr swallowing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 18:07:07 +00:00