fix(dream-cli): _compose_run_with_summary polish (SIGINT cleanup + zero-grep-match hint)
Consolidated from: #405 + #407
Scope
Two polish changes to the same function body (_compose_run_with_summary at dream-server/dream-cli:513-553):
Files
dream-server/dream-cli — _compose_run_with_summary function only
Rationale for merge
Literally the same function body, two consecutive edits in adjacent blocks. One PR, one review round. Merging avoids two back-to-back PRs stomping on identical diff territory.
Implementation notes
Discovery context
Filed during 23APR audit/fix cycle, both as PR-10 CG follow-ups. Both live scenarios exist: (a) user hits Ctrl-C mid-restart leaving orphaned /tmp/tmp.* compose logs, (b) docker compose fails with error messages that don't match error|unhealthy|failed|dependency (e.g. "no such service: X") producing a blank-body error banner — observed live during dream restart dream-does-not-exist test in the 23APR end-to-end verification.
Closes #405, #407. Labels: bug
fix(dream-cli): _compose_run_with_summary polish (SIGINT cleanup + zero-grep-match hint)
Consolidated from: #405 + #407
Scope
Two polish changes to the same function body (
_compose_run_with_summaryatdream-server/dream-cli:513-553):trap 'rm -f "$_compose_log"' INT TERMinside the helper so mktemp cleanup survives Ctrl-C during compose operations. Restore trap withtrap - INT TERMon normal exit (success and failure paths).grep | sed | headpipeline, check if any lines were emitted; if empty, print a fallback hint (e.g."(compose failed with no recognisable error lines — see full log below)") instead of leaving a blank gap between the "✗ failed:" banner and the log path.Files
dream-server/dream-cli—_compose_run_with_summaryfunction onlyRationale for merge
Literally the same function body, two consecutive edits in adjacent blocks. One PR, one review round. Merging avoids two back-to-back PRs stomping on identical diff territory.
Implementation notes
$_compose_logvariable capture at trap-set time (double-quote trap string) to avoid the persistence-leak pattern that bit PR-9 (dream status --json exits 1 on all platforms — RETURN trap leaks from cmd_status_json into cmd_status #413).[[ $(wc -l <<<"$_surfaced") -eq 0 ]]check after the pipeline, or refactor to capture grep output into a variable first.Discovery context
Filed during 23APR audit/fix cycle, both as PR-10 CG follow-ups. Both live scenarios exist: (a) user hits Ctrl-C mid-restart leaving orphaned
/tmp/tmp.*compose logs, (b) docker compose fails with error messages that don't matcherror|unhealthy|failed|dependency(e.g. "no such service: X") producing a blank-body error banner — observed live duringdream restart dream-does-not-existtest in the 23APR end-to-end verification.Closes #405, #407. Labels: bug