sched: add durable resume-attempt marker with store-backed identities (T09)

This commit is contained in:
lda
2026-09-08 10:46:02 +07:00 Verified
parent be8b40e184
commit d406c1c435
7 changed files with 237 additions and 3 deletions
+21
View File
@@ -127,4 +127,25 @@ class RunCheckpoint(BaseModel):
sequence: int = Field(ge=1)
reason: CheckpointReason
state: PersistedRunState | VersionedCheckpointState
attempt_id: int | None = Field(
default=None,
ge=1,
description=(
"Store-backed resume-attempt identity that produced this result. "
"Recovery matches result to the active attempt: fresh results are "
"resumable, stale results fail closed without retry."
),
)
created_at: datetime
class ResumeAttempt(BaseModel):
"""Durable resume-attempt marker persisted before re-execution."""
model_config = ConfigDict(extra="forbid")
run_id: str = Field(pattern=RUN_ID_PATTERN)
attempt_id: int = Field(ge=1)
state: Literal["ACTIVE", "DONE"]
created_at: datetime
updated_at: datetime