diff --git a/scripts/src/cicd-branch-follower.ts b/scripts/src/cicd-branch-follower.ts index 8345e3d2..e8ef288e 100644 --- a/scripts/src/cicd-branch-follower.ts +++ b/scripts/src/cicd-branch-follower.ts @@ -2577,8 +2577,10 @@ function runControllerReconcileJob(registry: BranchFollowerRegistry, options: Pa exitCode: result.exitCode, timedOut: result.timedOut, message: result.exitCode === 0 ? "reconcile job completed" : redactText(tailText(result.stderr || result.stdout, 800)), - stdoutTail: redactText(tailText(result.stdout, options.full ? 4000 : 1000)), - stderrTail: redactText(tailText(result.stderr, options.full ? 2000 : 800)), + stdoutBytes: Buffer.byteLength(result.stdout, "utf8"), + stderrBytes: Buffer.byteLength(result.stderr, "utf8"), + stdoutTail: options.full || result.exitCode !== 0 ? redactText(tailText(result.stdout, options.full ? 4000 : 400)) : "", + stderrTail: options.full || result.exitCode !== 0 ? redactText(tailText(result.stderr, options.full ? 2000 : 400)) : "", }; }