test(workspace): add 24-case coverage for builtin_tools/a2a_tools and send_message_wrapper (closes #367) #503

Closed
fullstack-engineer wants to merge 1 commits from fix/367-a2a-tools-coverage into staging

1 Commits

Author SHA1 Message Date
b095d34d67 test(workspace): add 24-case coverage for builtin_tools/a2a_tools and send_message_wrapper (closes #367)
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 9s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 11s
audit-force-merge / audit (pull_request) Has been skipped
Added 24 new test cases across three groups:

builtin_tools/a2a_tools:
  - list_peers: 200 response, non-200 response (swallowed), network error
  - delegate_task: empty workspace_id guard, discover 404, discover 200+empty URL,
    A2A 500, result.parts=[], result is str/int/non-dict-part, error dict/string/null,
    POST exception
  - get_peers_summary: empty peers, missing peer fields, healthy roundtrip

send_message_wrapper.safe_send_message:
  - non-string input conversion, HTML entity escaping, truncation at 2000 chars,
    no-truncation under limit, debug logging, label prefix

Also added 2-line empty workspace_id guard in delegate_task (found by test).

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