fix: address telemetry review issues from PR #39

Merged
AN
8mo ago
+153-29

Summary

Fixes remaining issues from Surya's multi-model code review on #39:

  • #1 (Critical): Error message truncation standardized to 500 chars in processor.ts (was 1000), matching docs and other call sites
  • #3 (Major): ALTIMATE_TELEMETRY_DISABLED env var now checked in telemetry init() — docs already documented this but code didn't implement it
  • #6 (Major): MCP disconnect now reports the correct transport type instead of hardcoded "stdio" — transport tracked in state on connect
  • #8 (Major): agent_outcome now produces "error" outcome when sessions end with errors (previously always reported "completed")
  • #11 (Minor): Auth events use Telemetry.getContext().sessionId || "cli" instead of hardcoded "cli"

Issues #2, #4, #5, #7, #10 were already fixed in jontsai's review round.

Test plan

  • tsc --noEmit — only pre-existing errors, no new type issues
  • bun test — 1413 pass, 0 fail across 85 files
  • Telemetry tests — 25 pass, 81 assertions

🤖 Generated with Claude Code