Skip to content

Commit e0d9d71

Browse files
feat: Add config analysis lifecycle guarantees
Stainless-Generated-From: 3a35e0b87b6364867c5a45f32039f9448f234afd
1 parent b0d5628 commit e0d9d71

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/kernel/types/analysis.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ class Analysis(BaseModel):
1717
created_at: datetime
1818
"""Time the analysis was created."""
1919

20+
expires_at: datetime
21+
"""Deadline after which a still-running analysis becomes expired."""
22+
2023
failure: Optional[ErrorModel] = None
21-
"""Present for failed or canceled analyses.
24+
"""Present for failed, canceled, or expired analyses.
2225
2326
Messages contain safe retry guidance rather than internal workflow errors.
2427
"""
2528

2629
finished_at: Optional[datetime] = None
2730
"""Time the analysis reached a terminal status. Null while it is running."""
2831

29-
status: Literal["running", "completed", "failed", "canceled"]
32+
status: Literal["running", "completed", "failed", "canceled", "expired"]
3033
"""Lifecycle status of a background analysis."""

src/kernel/types/recommendation_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class RecommendationSummary(BaseModel):
1414
analysis_id: str
1515
"""ID of the most recently requested analysis for this exact target."""
1616

17-
analysis_status: Literal["running", "completed", "failed", "canceled"]
17+
analysis_status: Literal["running", "completed", "failed", "canceled", "expired"]
1818
"""Lifecycle status of the most recently requested analysis for this exact target."""
1919

2020
last_requested_at: datetime

0 commit comments

Comments
 (0)