struct

TransFS::Claim

Inherits Struct < Value < Object

A claim is one timestamped, append-only mutation record in a document's log. State = fold the claims in order. See docs/architecture.md §3.

Interim encoding is JSON, one object per line (newline-framed; an unparseable trailing line is skipped on replay — the torn-tail rule). This will become C0DATA later with no change to the model: the encoding sits behind this module's serialize/parse, and identity is hashed from canonical VALUES (never from the serialized bytes), so the swap can't shift a single id.

Constructors

new(ts : Time)
Source

Class methods

format_ts(t : Time) : String

ISO-8601 with nanosecond precision (see §3): a real standard, and combined with the create nonce, collision-free.

Source
parse(line : String) : Claim | Nil

Parse one log line into a claim. Returns nil only for blank lines or valid unknown future ops; malformed records raise so the log reader can tolerate only a torn final record.

Source

Instance methods

canonical

The canonical value bytes that define this claim, independent of the storage encoding. (Only create is hashed — for identity — but every claim defines it for uniformity and future content-addressing.)

Source
op

The op tag stored as the record's first field.

Source
to_json_line
Source

Nested types