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

CWE-117 fix: add stderr parameter to sanitize_agent_error with _sanitize_for_external helper. Also fixes wrong test assertion in test_sanitize_agent_error_stderr_and_exc (exc class IS the tag: Agent error (ValueError): rate limit exceeded).

CWE-117 fix: add stderr parameter to sanitize_agent_error with _sanitize_for_external helper. Also fixes wrong test assertion in test_sanitize_agent_error_stderr_and_exc (exc class IS the tag: Agent error (ValueError): rate limit exceeded).
infra-runtime-be added 2 commits 2026-05-11 18:19:02 +00:00
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>
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>
core-devops closed this pull request 2026-05-11 18:21:28 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#533
No description provided.