deerflow2/backend/packages/harness/deerflow/persistence
Xinmin Zeng 31513c2ccb
fix(persistence): emit tz-aware timestamps from SQLite-backed stores (#3130)
SQLAlchemy's DateTime(timezone=True) is a no-op on SQLite (the backend
has no native tz type), so values round-tripped through the DB come
back as naive datetimes. The four SQL _row_to_dict helpers were calling
.isoformat() directly on those naive values, shipping timezone-less
strings like "2026-05-20T06:10:22.970977" out of the API. The browser's
new Date(...) then parses them as local time, shifting recent threads
in /threads/search by the local UTC offset (about 8h in Asia/Shanghai).

Route the four call sites through coerce_iso() instead — it already
normalizes naive values as UTC and emits "+00:00" so the wire format
always carries tz. No data migration is needed; existing SQLite rows
read back via the corrected serializer.

PostgreSQL deployments are unaffected because timestamptz preserves
tzinfo end-to-end.

Closes #3120
2026-05-21 16:22:09 +08:00
..
feedback fix(persistence): emit tz-aware timestamps from SQLite-backed stores (#3130) 2026-05-21 16:22:09 +08:00
migrations fix the lint error of backend 2026-04-26 22:16:04 +08:00
models feat(persistence):Unified persistence layer with event store, feedback, and rebase cleanup (#2134) 2026-04-26 11:09:55 +08:00
run fix(persistence): emit tz-aware timestamps from SQLite-backed stores (#3130) 2026-05-21 16:22:09 +08:00
thread_meta fix(persistence): emit tz-aware timestamps from SQLite-backed stores (#3130) 2026-05-21 16:22:09 +08:00
user feat(auth): release-validation pass for 2.0-rc — 12 blockers + simplify follow-ups (#2008) 2026-04-26 11:08:11 +08:00
__init__.py feat(persistence): add unified persistence layer with event store, token tracking, and feedback (#1930) 2026-04-26 11:05:47 +08:00
base.py feat(persistence): add unified persistence layer with event store, token tracking, and feedback (#1930) 2026-04-26 11:05:47 +08:00
engine.py fix(scripts): preserve uv extras across make dev restarts (#2754) (#2767) 2026-05-10 22:28:29 +08:00
json_compat.py perf(harness): push thread metadata filters into SQL (#2865) 2026-05-12 23:21:22 +08:00