Problem
The PersistEvent handler in crates/client/src/persistence_actor.rs only appends events to an in-memory Vec<Event> but never calls any storage function to persist them to disk or SQLite. Other persist handlers (PersistServerState, PersistServerConfig, etc.) all call storage::save_* when persistence_enabled is true.
This means events accumulated via PersistEvent are silently lost on restart. The LoadAllEvents handler returns this in-memory list, confirming it's intended as a buffer, but the name "PersistEvent" is misleading.
Suggested fix
Either:
- Actually persist events to storage (e.g., call
storage::save_events() or write to a SQLite event store)
- Rename to
BufferEvent to clarify it's in-memory only
- Remove the handler if events are persisted through another mechanism (e.g., the DAG is persisted separately)
Location
crates/client/src/persistence_actor.rs:77-85
Found during audit of #26.
Problem
The
PersistEventhandler incrates/client/src/persistence_actor.rsonly appends events to an in-memoryVec<Event>but never calls any storage function to persist them to disk or SQLite. Other persist handlers (PersistServerState,PersistServerConfig, etc.) all callstorage::save_*whenpersistence_enabledis true.This means events accumulated via
PersistEventare silently lost on restart. TheLoadAllEventshandler returns this in-memory list, confirming it's intended as a buffer, but the name "PersistEvent" is misleading.Suggested fix
Either:
storage::save_events()or write to a SQLite event store)BufferEventto clarify it's in-memory onlyLocation
crates/client/src/persistence_actor.rs:77-85Found during audit of #26.