fix: compact sentinel trigger closeout output

This commit is contained in:
Codex
2026-07-08 08:30:18 +02:00
parent 78eb3a1e20
commit 82ae5bdef3
@@ -717,6 +717,72 @@ export function renderControlPlaneResult(result: Record<string, unknown>): strin
const recoveryNext = record(result.recoveryNext);
const next = record(result.next);
const warnings = Array.isArray(result.warnings) ? result.warnings : [];
const observedGitops = record(observed.gitops);
const observedArgo = record(observed.argo);
const observedRuntime = record(observed.runtime);
const runtimeDeployment = record(record(observedRuntime.probe).deployment);
const observedCadence = record(observed.cadence);
if (result.ok === true && Object.keys(blocker).length === 0 && Object.keys(statusDiagnosis).length === 0) {
const publishPayload = record(publish.payload);
const flushJob = record(flush.job);
const flushNext = record(flush.next);
const publicExposureCaddyStatus = record(publicExposureApply.caddy);
return [
String(result.command),
"",
table(["NODE", "LANE", "STATUS", "MODE", "SOURCE_COMMIT", "PIPELINERUN", "PIPELINERUN_STATUS"], [[
result.node,
result.lane,
"ok",
result.mode,
source.commit ?? "-",
result.pipelineRun,
publish.phase ?? publishPayload.status ?? "-",
]]),
"",
table(["SOURCE", "AUTHORITY", "STAGE_REF", "IMAGE", "DIGEST"], [[
`${source.repository ?? "-"}@${source.branch ?? "-"}`,
source.sourceAuthority ?? "-",
short(source.stageRef),
image.ref,
short(publishPayload.digestRef ?? record(record(observed.registry).probe).digest),
]]),
"",
table(["GITOPS_PATH", "GITOPS_REV", "ARGO_APP", "ARGO", "RUNTIME_READY", "RUNTIME_IMAGE", "CADENCE"], [[
gitops.path,
short(observedGitops.revision ?? observedArgo.revision ?? publishPayload.gitopsCommit),
argo.applicationName,
`${observedArgo.syncStatus ?? "-"}/${observedArgo.healthStatus ?? "-"}`,
`${runtimeDeployment.readyReplicas ?? "-"}/${runtimeDeployment.desiredReplicas ?? "-"}`,
short(runtimeDeployment.image),
observedCadence.ok === true ? "ok" : observedCadence.skipped === true ? `skipped:${text(observedCadence.reason)}` : "blocked",
]]),
"",
table(["SOURCE_SYNC_MS", "PUBLISH_MS", "FLUSH", "RUNTIME_SECRETS", "PUBLIC_ROUTE_HTTP", "ARGO_APPLY", "WARNINGS"], [[
sourceMirrorSync.elapsedMs ?? "-",
publish.elapsedMs ?? "-",
flush.mode === "async-job" ? `async:${flushJob.id ?? "-"}` : flush.ok === true ? "ok" : "blocked",
runtimeSecretsApply.ok === true ? "ok" : Object.keys(runtimeSecretsApply).length === 0 ? "-" : "blocked",
publicExposureCaddyStatus.routeProbeHttpStatus ?? "-",
argoApply.ok === true ? "ok" : Object.keys(argoApply).length === 0 ? "-" : "blocked",
warnings.length,
]]),
"",
flush.mode === "async-job" ? `ASYNC_FLUSH_STATUS\n ${flushNext.status ?? "-"}` : "ASYNC_FLUSH_STATUS\n-",
"",
"NEXT",
` pac-closeout: ${next.pacCloseout ?? "-"}`,
` pac-status: ${next.pacStatus ?? "-"}`,
` pac-history: ${next.pacHistory ?? "-"}`,
` pipeline-run: ${drillDown.pipelineRunStatus ?? "-"}`,
` status: ${next.controlPlaneStatus ?? next.status ?? "-"}`,
` post-deploy-dashboard: ${next.dashboardVerify ?? "-"}`,
"",
"DISCLOSURE",
" compact success view keeps CI/CD closeout fields below the global stdout guard.",
" blocked results still expand diagnostics, recovery and drill-down details.",
].join("\n");
}
return [
String(result.command),
"",