Persistence Foundations#
OpenRath persists state across several planes: config and credentials, Session JSONL, sandbox identities, local memory metadata, and memory commit archives. v1.3.0 adds common atomic replacement, a root layout manifest, and one GC entry point without replacing each plane’s specialized format.
Boundaries#
Concern |
Mechanism |
|---|---|
Config, credentials, registry JSON |
Temp sibling + |
Session transcript |
Append-only JSONL, trailer/partial markers, and its existing writer lock. |
Layout compatibility |
|
Retention |
|
Atomic replacement prevents a partial JSON document from becoming the visible destination. It is not a multi-file transaction, a distributed lock, or a replacement for database concurrency control.
Data-root lifecycle#
ConfigStore.load -> check root manifest -> merge credentials -> validate config
ConfigStore.save -> split credentials -> atomic writes -> refresh root manifest
gc(dry_run=True) -> enumerate old artifacts across planes -> return GCReport
gc(dry_run=False) -> call plane-specific prune helpers -> trim memory commits
The manifest check is tolerant of fresh and legacy roots with no manifest. It only rejects a layout explicitly written by a newer OpenRath version.
Remote sandbox GC removes registry metadata only. Operational teardown of the actual remote sandbox remains a backend/service concern.
Source and tests#
Area |
Source |
Tests |
|---|---|---|
Atomic writes |
|
|
Root manifest |
|
|
GC |
|
|
Credential split |
|
|