TransFS::Log
The append-only claim log for one document. This is the source of truth; the (future) SQLite index is a rebuildable fold of these. See §3.
Layout: <root>/.transfs/docs/<hh>/<hex-id>.log, where the id is the hex of
the document's create-claim hash and <hh> is its first two hex chars — the
same fan-out as the blob tree.
Durability (§3): the log is the write-ahead log; we don't journal it.
- append writes the record then fsyncs before the caller acts on it;
- a torn trailing line (crash mid-append) fails to parse and is skipped;
- content blobs are always written before the claim that references them, so a crash leaves only harmless orphan blobs (GC sweeps them), never a dangling reference.
Constructors
Class methods
Every document id present in the store (by walking the docs tree).
Instance methods
Append one or more claims and fsync before returning. The interim JSON-lines format can recover a torn final line, but true multi-record batch atomicity waits on a record-stream commit marker.
Read and parse every claim in order. A malformed final line is tolerated as a recoverable torn tail; malformed earlier lines are corruption.
Every syntactically valid known claim in the log. Unlike #read, this
reports malformed lines wherever they appear instead of applying recovery.