fix: summarize job status output

This commit is contained in:
Codex
2026-06-21 18:09:40 +00:00
parent 9e8499824f
commit 674b59db76
2 changed files with 74 additions and 2 deletions
+7 -2
View File
@@ -2,7 +2,7 @@ import { readConfig } from "./src/config";
import { debugDispatch, debugHealth, debugSshPool, debugTask, isDebugDispatchCommand, type DebugDispatchCommand } from "./src/debug";
import { isRebuildableService, rebuildService, restartService, stackLogs, stackStatus, startStack, stopStack, unsupportedRebuildService, unsupportedRestartService } from "./src/docker";
import { emitError, emitJson, emitText, isRenderedCliResult } from "./src/output";
import { cancelJob, jobWithTail, listJobs, listJobsSummary, readJob, runJob } from "./src/jobs";
import { cancelJob, jobWithTail, listJobs, listJobsSummary, readJob, renderJobStatusSummary, runJob } from "./src/jobs";
import { checkHelp, parseCheckOptions, runChecks, runRecoveryGuardrailsCheck } from "./src/check";
import { runSsh } from "./src/ssh";
import { autoRemoteCiPublishUserServiceDryRunPlan, extractRemoteCliOptions, runRemoteCli } from "./src/remote";
@@ -551,7 +551,12 @@ async function main(): Promise<void> {
}
if (sub === "status") {
const id = third === "latest" || third === undefined ? latestJobId() : third;
emitJson(commandName, { job: jobWithTail(readJob(id), boundedNumberOption("--tail-bytes", 12000, 500_000)) });
const job = jobWithTail(readJob(id), boundedNumberOption("--tail-bytes", 12000, 500_000));
if (args.includes("--full") || args.includes("--raw")) {
emitJson(commandName, { job });
return;
}
emitText(renderJobStatusSummary(job).renderedText, commandName);
return;
}
if (sub === "cancel") {