fix(mcp): apply review fixes to HTTP/SSE transport (PR #5 follow-up) #10

Closed
infra-runtime-be wants to merge 1 commits from runtime/http-mcp-review-fixes into main

1 Commits

Author SHA1 Message Date
a4b172c9b8 fix(mcp): apply review fixes to HTTP/SSE transport
Some checks failed
ci / mirror-guard (pull_request) Failing after 6s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
Four corrections to PR #5 (fix/hermes-mcp-platform-tools):

1. **Remove dead code** — `_sse_broadcaster` was defined but never
   called. The POST handler pushes directly via the lock; this function
   only confused the reader.

2. **Full UUID for connection IDs** — `conn_id = str(uuid.uuid4())[:8]`
   truncates to 8 chars, increasing collision risk across concurrent
   connections. Use the full UUID instead; the logger/telemetry can
   still truncate if needed.

3. **Fix heartbeat data format** — `data: {}` emits a Python dict repr,
   not valid JSON. Change to `data: null` (SSE event data field) which is
   correct JSON and semantically meaningful (no payload, just keepalive).

4. **Unify serverInfo.name** — HTTP transport returned
   `"a2a-delegation"` while stdio returns `"molecule"`. Both now use
   `"molecule"` for consistency across transport modes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 10:47:00 +00:00