refactor(session): unify model and display history storage (#6336)

* refactor(session): persist display history in SQLite

* fix(session): preserve new fork activity timestamps

* test(agent): use SQLite-owned model failure recovery fixture

* test(agent): isolate session slash routing from loop shutdown

Exercise the real inbound dispatcher and await its session worker. Keep response deadlines and behavioral assertions, while leaving full SQLite cleanup to the existing async fixture rather than an unrelated two-second shutdown deadline.

* fix(webui): admit direct deliveries to display history

* docs: clarify session history migration guidance
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-21 16:13:59 +08:00
1 parent d617b723aa
commit b32b1327ce
50 files changed
+2123 -3235

No files matched your search

+2 -2
View File
@@ -86,7 +86,7 @@ def test_ordered_upgrades_preserve_records_and_do_not_repeat_import(tmp_path, mo
source.write_text("stale malformed source must not be imported again", encoding="utf-8")
upgraded = SqliteSessionStore(tmp_path)
upgraded.initialize(workspace)
assert _database_snapshot(store.path)[0] == 3
assert _database_snapshot(store.path)[0] == len(sqlite_store._SCHEMA_MIGRATIONS)
loaded = upgraded.load(original.key)
assert loaded is not None
assert loaded.messages == original.messages
@@ -138,7 +138,7 @@ def test_failed_upgrade_rolls_back_schema_version_and_records_then_can_retry(tmp
*migrations, add_archived, complete_upgrade,
))
store.initialize(workspace)
assert _database_snapshot(store.path)[0] == 3
assert _database_snapshot(store.path)[0] == len(sqlite_store._SCHEMA_MIGRATIONS)
loaded = store.load(original.key)
assert loaded is not None
assert loaded.messages == original.messages