Files
Peter Steinberger f2d344df0c fix(crabbox): keep the setup failure reason and name its phase (#130425)
A Crabbox cloud-worker setup failure could report none of the reason it
failed. crabboxCommandDetail kept the first ~254 and last ~253 characters
and dropped the middle, but Crabbox always prints a fixed ~250-character
run-context banner first, so head preservation spent half the budget on
boilerplate. In a live machine0 failure the actionable line sat at
collapsed index 2570 and was deleted; the operator saw a banner and a
Node stack tail that read like a workspace-lock problem.

Keep the tail instead: a failing command's diagnosis is last, and the
capture layer in src/process/exec-output.ts already retains each stream's
suffix. Join [stdout, stderr] so stderr occupies the retained window
rather than being pushed out by a chatty stdout. The 512-character budget
is unchanged and stays inside core's 1024-unit bound.

Profile, desktop, and node enrollment setup also all failed as
"Crabbox setup failed", so the message never said which phase broke.
Each now carries its own label, matching the shared SSH bootstrap in
src/gateway/worker-environments/bootstrap.ts.

Net -4 production lines.
2026-08-26 15:06:05 -07:00
..