fix(cli): keep script run waiting on long jobs and flaky log streaming (#11766)

* fix(cli): keep script run waiting on long jobs and flaky log streaming

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): back off job result polling after an error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): keep skipped jobs successful and color early completions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): fall back to the polled result when the final job fetch fails

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-10-14 13:04:01 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent cd7813e354
commit a2ee052e03
2 changed files with 64 additions and 57 deletions
+3 -1
View File
@@ -135,8 +135,10 @@ export async function pollJobWithQueueLogging(
);
}
// Errors back off to the slow interval: at the fast one, the consecutive
// error budget would be spent on a ~1s blip.
const delayMs =
Date.now() - startedAt < fastPollDurationMs
consecutiveErrors === 0 && Date.now() - startedAt < fastPollDurationMs
? fastPollIntervalMs
: slowPollIntervalMs;
await new Promise((resolve) => setTimeout(resolve, delayMs));