core: ExecCommandEnd summary for concise failures

Resolved 💬 0 comments Opened Aug 12, 2025 by Xopoko Closed Nov 27, 2025

Adds an optional summary field to ExecCommandEndEvent and generates it centrally in core for non‑zero exit codes.

Why

  • Long tool timeouts and opaque errors slow down iteration.
  • A concise, structured summary (cwd + tail of stderr/stdout + truncation flags) makes failures actionable without spamming logs.

Proposal

  • Protocol: add ExecCommandEndEvent.summary: Option<ExecCommandSummary> (cwd, stdout_tail, stderr_tail, stdout_truncated_after_lines, stderr_truncated_after_lines).
  • Core: populate summary when exit_code != 0.
  • Clients: remain backward‑compatible (ignore unknown fields); no UI changes required.

Tests

  • Existing end‑to‑end exec tests still pass; optional unit test can assert serde compatibility for Some/None.

Compatibility

  • Backwards‑compatible wire change; consumers matching with .. remain unaffected.

Risks

  • Small increase in event size on failures (bounded tails). Secrets masking handled at log level.

View original on GitHub ↗