sched: add durable resume-attempt marker with store-backed identities (T09)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user