Skip to content

bug: a2a isAlive treats HTTP 500 as alive #4

@Ridgeio

Description

@Ridgeio

Summary

A2ATransport.isAlive() in src/a2a-transport.ts treats a non-2xx agent-card response as a reason to fall back to a bare HEAD, then returns true for any resolved HEAD response regardless of status. An A2A endpoint returning persistent 500 is therefore reported as alive, while network-unreachable is reported as dead.

Evidence

  • src/a2a-transport.ts:29 — HEAD path does not check resp.ok / status code.

Impact

  • swarm members and the lazy-reap path (new in PR Lazy reap on join conflict + swarm reap CLI #1) both treat a broken-but-responding A2A agent as alive, so swarm join <name> for a dead-but-5xx A2A agent is blocked even though delivery will fail.
  • Real-world messages fail silently downstream instead of being cleanly rejected at lookup.

Fix sketch

In isAlive(), require resp.ok (or at least non-5xx) on both the agent-card and HEAD fallback paths before returning true.

Context

Surfaced by codex challenge during review of PR #1 (lazy-reap). Out of scope for that PR — filing here per Lead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritybugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions