fix(036): timedelta import + emit_terminal status mapping + C5 decision memory
This commit is contained in:
@@ -166,10 +166,12 @@ class RunTracker:
|
||||
error_code: str | None = None,
|
||||
error_detail: str | None = None,
|
||||
) -> None:
|
||||
"""Mark the run as COMPLETED, FAILED, or CANCELLED."""
|
||||
"""Mark the run as completed, failed, or cancelled.
|
||||
Maps run-level status to lowercase event status for Pydantic validation."""
|
||||
status_map = {"COMPLETED": "completed", "FAILED": "failed", "CANCELLED": "skipped"}
|
||||
await self.append_event(
|
||||
event_type="terminal",
|
||||
status=status,
|
||||
status=status_map.get(status, "completed"),
|
||||
payload={"error_code": error_code, "error_detail": error_detail},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user