deerflow2/backend/packages/harness/deerflow/persistence
Nan Gao 926406e0d6
fix(channels): make runtime provider state authoritative (#3580)
* fix(channels): make runtime provider state authoritative

* make format

* fix(channels): close runtime provider config races and status gaps

Address review findings on the runtime-provider-state change:

- configure/disconnect now re-read the live app.state.channels_config
  after the worker await and mutate only the affected provider key in
  place, so a concurrent mutation for a different provider is no longer
  clobbered by a stale pre-await snapshot.
- disconnect revokes DB connection rows before committing the store and
  cache, so a repo failure cannot leave the store/cache "disconnected"
  while the DB keeps "connected" rows a later re-configure would
  silently reactivate.
- _provider_response preserves non-connected statuses (e.g. revoked)
  when the provider is unavailable, only masking a stale "connected"
  row as not_connected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 07:45:46 +08:00
..
channel_connections fix(channels): make runtime provider state authoritative (#3580) 2026-06-17 07:45:46 +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(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
run fix: harden run finalization persistence (#3155) 2026-05-23 00:09:06 +08:00
thread_meta feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +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