SIMILE_HOME to move the complete Simile home for CI isolation or another operator-controlled
location. Relative values are resolved from the current working directory, matching the service
registry. The readiness record written to stdout reports "persistent": true.
Commit boundary
Persistence sits below the Stack supervisor, not inside any resource engine. Each command, logical time advance, reset, or snapshot restore follows one transition boundary: The caller cannot observe a successful result—or a domain failure that wrote a journal entry—until the resulting state is durably committed. If encoding or storage fails, the supervisor restores the complete previous in-memory snapshot and returnsunavailable. This prevents the live process and
its state file from silently diverging.
A crash before the redb transaction commits leaves the previous checkpoint intact. A crash after
commit but before response delivery leaves the new state intact; an idempotency key lets the caller
recover the original result after restart.
What resumes
The checkpoint contains the complete state owned by that component process:- every named resource of its component kind;
- the logical clock and its initial reset point;
- resource contents, visibility, expiry, and delivery state;
- the causal journal and its sequence;
- command and event counters; and
- idempotency replay records.
--resource declarations must match the saved state. A different resource set, Stack
protocol version, or state-format version is rejected rather than partly loaded.
When a checkpoint exists, its saved logical clock wins over --start-time-ms; the latter only
defines time for a new component identity.
Database layout
The runtime checkpoint is normalized into six redb tables rather than rewritten as one opaque Stack value:
All values use CBOR. One redb write transaction compares and updates only changed records, removes
records cleared by reset or restore, and commits the six tables atomically. The engines expose a
storage-neutral record projection; they do not depend on redb or know how records are laid out.
Standalone component processes do not have a compiled-service identity or artifact digest, so
those metadata fields are absent. The store accepts both when the service orchestrator owns the
component. A service artifact refresh updates the stored artifact provenance after the snapshot
passes compatibility and integrity checks. Service identity remains an ownership boundary. The
resource digest is always present and protects the independently keyed resource set from partial or
mismatched loads.
Ownership
One state file belongs to one running component process. Simile takes an exclusive lock using the adjacent<database>.lock path and refuses a second owner. The lock file may remain on disk after
exit, but its operating-system lock is released when the process closes; its presence alone does
not mean the database is busy.
The automatic layout separates component kinds and resource sets:
Runtime checkpoint versus portable snapshot
The automatically managed redb file is the runtime checkpoint. Its independently keyed records are an internal representation, not a public interchange format.GET /v1/snapshot and
POST /v1/restore remain the portable JSON export and import surface for fixtures, inspection, and
deliberate migration. A state file written by the original whole-snapshot format is migrated into
the normalized tables when first opened.
Do not copy a live redb file as an export format. Ask the owning process for its JSON snapshot, then
restore that snapshot into the destination process.