sched: remediate R4 ownership, identity-match, dispatch-mark, and pending atomicity

This commit is contained in:
lda
2026-09-08 10:51:20 +07:00 Verified
parent f1dbe54f61
commit 5be3f82253
4 changed files with 83 additions and 21 deletions
+8 -1
View File
@@ -188,7 +188,14 @@ class WorkflowRunApi:
trace_range: TraceRangeLike | None,
) -> RunResult:
trace_values = _trace_range_values(trace_range)
record, stopped_run = restore_interrupted_run(self._run_store(), run_id)
store = self._run_store()
pre_attempt = store.get_resume_attempt(run_id)
if pre_attempt is not None and pre_attempt.state == "ACTIVE":
raise ValueError(
f"workflow run {run_id!r} has an ambiguous active resume attempt; "
"recovery must fail it closed before retry"
)
record, stopped_run = restore_interrupted_run(store, run_id)
environment = record.environment
diagnostics = validate_pinned_resume_environment(
record=record,