Skip to content

The agent that grows with you

fix(kanban): coerce text timestamps when loading tasks

magicbluesmoke956c8106a380
diff --git a/hermes_cli/kanban_db.py b/hermes_cli/kanban_db.py
index 69d948e179b..ec02fd72daf 100644
--- a/hermes_cli/kanban_db.py
+++ b/hermes_cli/kanban_db.py
@@ -673,6 +673,7 @@ class Task:
skills_value = [str(s) for s in parsed if s] if isinstance(parsed, list) else None
return cls(
**{col: _lossy_text(row[col]) for col in _TASK_REQUIRED_COLUMNS},
+ **{col: _to_epoch(row[col]) for col in _TASK_EPOCH_COLUMNS}, # INTEGER, but outside writers may store ISO text
**{col: g(col) for col in _TASK_OPTIONAL_COLUMNS},
**{col: g(col) or None for col in _TASK_EMPTY_IS_NULL_COLUMNS},
# Pre-migration fallbacks (spawn_failures / last_spawn_error) are only
@@ -686,10 +687,9 @@ class Task:
# Columns every schema version has (KeyError if the SELECT omitted them).
-_TASK_REQUIRED_COLUMNS = (
- "id", "title", "body", "assignee", "status", "priority", "created_by", "created_at",
- "started_at", "completed_at", "workspace_kind", "workspace_path", "claim_lock", "claim_expires",
-)
+_TASK_REQUIRED_COLUMNS = ("id", "title", "body", "assignee", "status", "priority", "created_by",
+ "workspace_kind", "workspace_path", "claim_lock", "claim_expires")
+_TASK_EPOCH_COLUMNS = ("created_at", "started_at", "completed_at")
# Later-added columns read as NULL when absent from the row.
_TASK_OPTIONAL_COLUMNS = (
"branch_name", "project_id", "tenant", "result", "idempotency_key", "worker_pid",