fix: preserve branch follower stage intervals

This commit is contained in:
Codex
2026-07-04 16:13:12 +00:00
parent 1cd7846daf
commit d9dab2da89
7 changed files with 224 additions and 128 deletions
+5 -1
View File
@@ -106,6 +106,7 @@ if (existing) {
}
const startedAt = Date.now();
const startedAtIso = new Date(startedAt).toISOString();
const deadline = startedAt + timeoutSeconds * 1000;
let polls = 0;
let latest = await getJob();
@@ -123,6 +124,7 @@ const failed = condition(latest, "Failed");
const logs = await logsTail();
const summary = parseLastJsonSummary(logs);
const timedOut = !complete && !failed;
const finishedAt = Date.now();
const output = {
ok: Boolean(complete) && !timedOut,
completed: Boolean(complete),
@@ -134,7 +136,9 @@ const output = {
jobName,
namespace,
polls,
elapsedMs: Date.now() - startedAt,
elapsedMs: finishedAt - startedAt,
startedAt: startedAtIso,
finishedAt: new Date(finishedAt).toISOString(),
conditionReason: complete?.reason || failed?.reason || null,
conditionMessage: complete?.message || failed?.message || null,
logsTail: logs || null,