Production / What TinyStore promises

What TinyStore promises

Every guarantee in this book has an id, such as DUR-01 or KV-11. The ids come from CONTRACTS.md, the list of what TinyStore promises the program that opens it. Each promise is kept by at least one test that names its id, and a build fails when a promise has no test. This chapter groups the promises a program relies on most, and ends with what TinyStore does not promise.

Your data

IdTinyStore promises
DUR-01a write that returned success survives the process dying, at the file's durability
DUR-02a transaction commits all its changes or none
DUR-03writes grouped into one commit each fail alone, unless one rolls back the commit
DUR-05a write whose outcome cannot be known answers outcome unknown, never success
DUR-06a write is atomic within one file, and across two only when you joined them
DUR-08a reader sees one consistent snapshot, every commit whole
DUR-09packing, merging and expiry never change an answer
KV-01a value comes back bit for bit, or fails corrupt, never a plausible wrong value
BLOB-01a file appears whole at its commit, or not at all
BLOB-02a whole read is checked against the file's SHA-256

Your errors

IdTinyStore promises
ERR-01every failure is one of a few kinds, the same in every engine and language
ERR-02an error names what failed and keeps its cause
ERR-05a call past a bound fails limit, naming the bound, and never answers less
ERR-06a call that fails limit or invalid changes nothing
ERR-07damage to one item never stops its neighbours
STORE-09a read you cancel stops at once, one past its timeout soon after, and frees what it held

Your work in the background

IdTinyStore promises
JOB-01a job never runs before its time, and due jobs start in time order
JOB-02a job added in a transaction commits with its rows, or not at all
JOB-05a job whose lease ended runs again, and its stale lease settles nothing
JOB-06a step runs once per job, across its attempts
KV-11once runs a key's function once and keeps its answer for the others
LOCK-01a key has one holder at a time, given to waiters in order
LOCK-02each lease's fence is larger than every earlier one
CHAN-02a publisher never waits, and a slow subscriber is told what it missed

Your languages and your security

IdTinyStore promises
WIRE-01every SDK answers as the Rust core does, embedded, as a sidecar or remote
WIRE-05a write whose connection ended before its answer surfaces as outcome unknown
WIRE-10a read whose client cancels it, or leaves, stops on the server too
WIRE-11an open or connect you cancel stops at once and keeps no connection
WIRE-13a request or an answer past one frame still arrives as one, and commits once
SEC-01a read token only reads what the store holds, and makes nothing
SEC-02a remote connection shows its token; a local server proves itself to its client
SEC-03an encrypted bucket's file shows no value
SEC-06no other user of the machine reads SERVE or connects to a local server
BAK-02a restore checks every byte, and leaves nothing when it fails

What TinyStore does not promise

IdNot promised
NOT-01a write across two files is not atomic, unless you opened one engine inside the other's file
NOT-02channels deliver at most once, in memory: a message nobody hears, or before a restart, is gone
NOT-03locks live in the memory of the process that holds the store, and do not coordinate two stores
NOT-04a copy's reads are stale by its lag
NOT-05a promotion made while the old home still writes may lose what the old home took after it
NOT-06committed locally means no copy held the write, and a failover may lose it
NOT-08ingest refuses a new value behind what a series packed; only a gauge's replace changes it
NOT-09a log line that finds its buffer full is dropped and counted
NOT-10a vector search with recall may miss some of the exact best
NOT-11nothing before v0.1.0 is compatible: formats, schemas and the protocol change without migration
NOT-12events of one time that v0.1.0 packed keep its order, not always the order they were appended

Why promises with ids

A guarantee written only in prose drifts: someone changes the code, a test still passes, and the sentence in the docs is no longer true. An id ties a promise to the tests that keep it. When a promise must change, its line in CONTRACTS.md changes in the same commit, so the change is visible to everyone who reads the history.

See also

Edit this page on GitHub Updated 27 November 2026

esc
↑↓ navigate ↵ open ⇥ filter 0 results