sched: record resumed stopped results live and idempotently (B3)

This commit is contained in:
lda
2026-09-09 17:27:36 +07:00 Verified
parent ada0239a1c
commit b094385077
5 changed files with 357 additions and 3 deletions
+12
View File
@@ -320,6 +320,18 @@ class WorkflowRunApi:
updated_at=cleared_at,
)
)
# Live occurrence history for scheduled resumes: record the resumed
# stopped result now (completion, failure, or re-interruption each
# carry their own checkpoint id, so each records exactly once and
# repeats dedup). Manual runs and scheduler-off resumes skip
# quietly — restart recovery reconciles those instead.
gate = self.resume_slot_gate
if gate is not None:
gate.note_resumed_result(
run_id,
status_value=run.status.value,
checkpoint_id=next_record.latest_checkpoint_id,
)
return _run_payload(
deployment=environment.deployment,
artifact=environment.root_artifact,