Show CI log command failures with context #652

Merged
barrettruth merged 1 commit from fix/639-log-buffer-command-failures into main 2026-05-06 21:58:19 +00:00
Owner

Closes #639

Summary

  • Routes CI log and summary buffer command failures through the shared command-failure formatter.
  • Replaces bare stderr/stdout and generic empty-output lines with contextual buffer messages.
  • Keeps bounded secondary command output as an unlabeled follow-up line when stderr and stdout both contain useful detail.
  • Adds focused log/system tests for stderr failures, secondary output, and empty command output.

Messaging

Before After
authentication failed failed to fetch CI log: authentication failed + next line request id abc123
authentication failed failed to fetch CI summary: authentication failed + next line request id abc123
no log output / no output failed to fetch CI log: no command output / failed to fetch CI summary: no command output

The wording keeps the stack decision: human-facing buffers get context plus detail, without raw command disclosure, without (exit 1), and without stdout/stderr label syntax.

Repro

  • Before: system nvim with vim.pack + lz.n showed only LOG_LINES=authentication failed and SUMMARY_LINES=authentication failed, dropping the available request id abc123 output.
  • After: same system nvim/vim.pack/lz.n repro shows LOG_LINES=failed to fetch CI log: authentication failed | request id abc123 and SUMMARY_LINES=failed to fetch CI summary: authentication failed | request id abc123.

Verification

  • just test spec/log_spec.lua
  • just test spec/system_spec.lua
  • nix develop .#ci --command just ci
Closes #639 ## Summary - Routes CI log and summary buffer command failures through the shared command-failure formatter. - Replaces bare stderr/stdout and generic empty-output lines with contextual buffer messages. - Keeps bounded secondary command output as an unlabeled follow-up line when stderr and stdout both contain useful detail. - Adds focused log/system tests for stderr failures, secondary output, and empty command output. ## Messaging | Before | After | |---|---| | `authentication failed` | `failed to fetch CI log: authentication failed` + next line `request id abc123` | | `authentication failed` | `failed to fetch CI summary: authentication failed` + next line `request id abc123` | | `no log output` / `no output` | `failed to fetch CI log: no command output` / `failed to fetch CI summary: no command output` | The wording keeps the stack decision: human-facing buffers get context plus detail, without raw command disclosure, without `(exit 1)`, and without `stdout`/`stderr` label syntax. ## Repro - Before: system nvim with vim.pack + lz.n showed only `LOG_LINES=authentication failed` and `SUMMARY_LINES=authentication failed`, dropping the available `request id abc123` output. - After: same system nvim/vim.pack/lz.n repro shows `LOG_LINES=failed to fetch CI log: authentication failed | request id abc123` and `SUMMARY_LINES=failed to fetch CI summary: authentication failed | request id abc123`. ## Verification - `just test spec/log_spec.lua` - `just test spec/system_spec.lua` - `nix develop .#ci --command just ci`
Show CI log command failures with context
All checks were successful
quality / Format (pull_request) Successful in 18s
quality / Lint (pull_request) Successful in 21s
quality / Test (pull_request) Successful in 21s
c4e980e29c
barrettruth force-pushed fix/639-log-buffer-command-failures from c4e980e29c
All checks were successful
quality / Format (pull_request) Successful in 18s
quality / Lint (pull_request) Successful in 21s
quality / Test (pull_request) Successful in 21s
to 1bdf666add
All checks were successful
quality / Test (pull_request) Successful in 17s
quality / Format (pull_request) Successful in 20s
quality / Lint (pull_request) Successful in 21s
2026-05-06 21:53:13 +00:00
Compare
barrettruth deleted branch fix/639-log-buffer-command-failures 2026-05-06 21:58:19 +00:00
Sign in to join this conversation.
No description provided.