docs: align runtime references with current behavior

This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-26 15:48:49 +08:00
1 parent 0c7dbc6aac
commit dfb3843b4d
4 files changed
+58 -47

No files matched your search

+1 -1
View File
@@ -41,4 +41,4 @@ Built-in skills live in `nanobot/skills/` (markdown + YAML frontmatter format).
`nanobot/agent/memory.py` owns the memory journal `memory/history.jsonl`; ordinary entries are appended under a lock, without explicit fsync. Full journal rewrites use `atomic_write_lines` with its default file and directory fsync. Preserve that atomic replacement path rather than truncating the live journal in place.
Conversation history belongs to `nanobot/session/manager.py`. Session saves use atomic replacement, with fsync controlled by the caller; the default is `False`, while durable shutdown and other explicit durability paths request `True`. Preserve the distinction between atomic visibility and crash durability, and retain locks and explicit fsync on paths that require them.
Conversation history is stored in `sessions.sqlite3`. `SessionState` (`nanobot/session/state.py`) owns runtime access; `SqliteSessionStore` (`nanobot/session/sqlite_store.py`) commits changes in SQLite transactions using WAL and `PRAGMA synchronous = FULL` on every connection. `SessionManager.save()` is for offline administrative snapshots and has no per-save fsync option. Keep runtime mutations behind the async owner and preserve transaction boundaries and stale-generation checks.