fix: suppress routine ssh timing noise

This commit is contained in:
Codex
2026-05-25 16:24:00 +00:00
parent fcc3ce125a
commit 5cca0546a0
5 changed files with 13 additions and 9 deletions
+4 -2
View File
@@ -1626,6 +1626,7 @@ export function sshRuntimeTimingHint(options: {
}
export function formatSshRuntimeTimingHint(hint: SshRuntimeTimingHint): string {
if (!hint.slow) return "";
return `UNIDESK_SSH_TIMING ${JSON.stringify(hint)}\n`;
}
@@ -1836,12 +1837,13 @@ export async function runSsh(config: UniDeskConfig, providerId: string, args: st
restore();
const hint = sshFailureHint(invocation.providerId, parsed, exitCode, stderrTail);
if (hint !== null) process.stderr.write(formatSshFailureHint(hint));
process.stderr.write(formatSshRuntimeTimingHint(sshRuntimeTimingHint({
const timingHint = formatSshRuntimeTimingHint(sshRuntimeTimingHint({
invocation,
transport: "backend-core-broker",
exitCode,
startedAtMs,
})));
}));
if (timingHint) process.stderr.write(timingHint);
resolve(exitCode);
};
child.on("error", (error) => {