pub fn folder_changes_since(
mem_root: &Path,
mem: &str,
since: &str,
) -> Result<BackendChanges, BackendError>Expand description
Synthesise per-entity events for a folder-backed mem by reading
<mem_root>/.memstead/changes.jsonl and bucketing events by entity.
Net-effect rules per entity:
- Last event = Delete →
Removed - First event = Create →
Added - Anything else →
Updated
Rename events surface as Updated (folder rename doesn’t carry
from→to metadata). Batch events have no entity id and don’t
contribute envelopes. The cursor is an RFC-3339 timestamp; the
EMPTY_TREE_SHA sentinel and any non-parseable cursor are
treated as “from the beginning”. head echoes the latest
timestamp seen, falling back to since.
Envelopes are id-only (title / entity_type are None); the
engine wrapper enriches from its in-memory store.