How rdy is built v0.47.0

System

The store

The store is the append-only, content-addressed persistence under .rdy/store/, and the only source of truth. Everything else in rdy is derived from it and can be rebuilt. This page explains what the store holds, how a write becomes durable and what a landing records. It also explains what happens after a crash, and how dump and load move a project to a new store format. Last, it explains how a dump chain restores a store to an earlier point.

Store
The store is the append-only, content-addressed persistence under .rdy/store/, and the only source of truth. The graph, search indexes, the site and every other derived state can be rebuilt from it. A write is acknowledged only after fsync.

Objects and kinds

Every record in the store is an object: immutable, named by the BLAKE3 hash of its stored bytes, and tagged with a kind. The hash is the id. Two writes of the same bytes are one object. An object is never rewritten and never re-encoded. A redaction can remove an object's payload, and the object's hash and frame stay.

Object
An object is one immutable, content-addressed record in the store, named by the BLAKE3 hash of its stored bytes and tagged with a kind. Kinds include block versions, changes, proposal versions, landings, snapshots, tags, answers, view ops, intents, reviews, tensions and signatures. An old object is never re-encoded.
Object kind
An object kind is the code that says what an object is. A new record type gets a new kind, and a new shape of a kind gets a new encoding version. An object keeps the encoding it was written in, so existing records never change.
Table 1
KindWhat it holds
block versionone immutable state of a block
changea set of ops with provenance and justification
proposala proposal version: its changes, its view and its title
landingthe record that a proposal entered canon
snapshotevery block id mapped to a version at one landing
blob chunk, blob manifestan asset's content-addressed chunks and the list that joins them
ref updatea named pointer moved to a hash
taga version name bound to one landing
answerone human act that no other record holds: an answer to a queue item, or a relay of a person's words for another act
signatureone signature over a statement that rdy reads off a landing or a tag; it names that subject and never changes it
view opone operation in a view's chain
batch commit markerthe frame that ends a write batch
intentone version of an intent
alternative setone version of an alternative set
reviewa judgement rdy cannot recompute: a tension dismissal, a mention review, a verdict on a candidate pair or a check verdict
semantic tensionone version of a tension a reviewer's verdict opened
transitionone write batch's tension and suspect transitions
redaction requestone content removal request: its targets, its reason and the complete report it binds
redaction residuewhat stays of one removed block version or change
redaction applythe human apply record that activates one request
carried removalthe record of a source removal that a stopped load did not reach, and which removed payloads the store holds
change planone version of a view's change plan: its answers and, at a landing, its seal
assessmentthe readiness assessment of one ready proposal version, which a propose writes
dispute, dispute resolutiona dispute of one landing, and its resolution; rdy_dispute writes them
check requestone request for an agent check; rdy_review and rdy review write it

Ids come from stored bytes, never from an in-memory value. A later rdy may add an object kind, or a new encoding of a kind. An object keeps the encoding it was written in, and existing records never change. So every hash in a released dump stays valid when the store format changes.

Refs are the store's few mutable names. canon names the head landing, view/<name> names a view's head, tag/<name> names a tag, and meta/store_features records the store's features. proposal/<stable> names a proposal's latest version, and open/<view> names a view's proposal until it lands. intent/<stable> and alt/<stable> name the latest version of an intent and of an alternative set. dismiss/<vkey> names the review that dismissed a tension, and mention/<block>/<entity> names the latest review of a mention. A ref update is itself a frame in the log, so the log alone says where every ref points.

pair/<key> names the verdict that settles a candidate pair. semantic/<key> names the latest version of the pair's semantic tension. inbox/<actor>/<run> holds one session's inbox subscription: its cursor, declared areas and role. answer/<item> names the latest answer to an item, and pending/<person>/<item> names a person's latest snooze of it. plan/<view> names the latest version of a view's change plan.

Views as chains

A view is not a record that is rewritten on every write. Each view operation is a view op object that names its predecessor, so a view is a chain, newest first, and the ref view/<name> holds a small head. A write appends one op and moves the head in the same batch, whatever the view's length. To read the included set, rdy walks the chain back to the latest checkpoint op, which carries the full set: a create, a fork or a rebase. The walk never crosses into another view's chain. Views have their home in "Canon, views and proposals" in the rdy documentation.

Segments, batches and the marker

The store writes objects to append-only segment files under .rdy/store/segments/. A segment holds frames. Each frame is a length, a kind byte, the object's hash and its bytes. A segment rolls at 64 MiB, and it rolls only at a batch boundary, so a batch never spans two segments. A single batch larger than a segment gets one oversized segment of its own.

Batch commit marker
A batch commit marker is the frame that ends every write batch in the log. It names the batch's first frame, its frame count and a digest of its frame hashes. A write is acknowledged only after the batch and its marker are fsynced, and on open the last valid marker is the acknowledged boundary.
Segment
A segment is one append-only log file of the store. Segments roll only at batch boundaries, so a batch never spans two segments.

Every write is a batch, and every batch ends with a batch commit marker. The marker names the batch's first frame, its frame count and a digest of its frame hashes. The marker makes the log self-describing: a reader can tell an acknowledged batch from a tail that was never acknowledged, without any help from the index.

Requirement

A write is acknowledged only after the batch and its marker are fsynced.

One flush per write

The log fsync is the only acknowledgement point. The index commits without durability, and a checkpoint makes it durable later: every 1,000 frames, after 2 seconds idle, and on clean shutdown. On open, the store replays the log from the index's last durable position. A kill between checkpoints costs a catch-up, never a rebuild. The targets this serves have their home in Performance targets.

A write and the tension and suspect transitions it causes share one batch and one sync. The engine holds the batch open while it writes, then seals it with the transitions. A kill before the seal loses the write and its transitions together.

The index

The index is the derived lookup over the log, kept in an embedded key-value store at .rdy/store/index.redb. It maps a hash to its frame, a hash and kind to that kind's object, and a block version to the changes that produced it. It also maps a view name to its ops, a change to the first landing that carried it, and a ref name to its value. It holds the open tensions and the open suspects that the TRANSITION records fold to. It also maps a carrier change to its redaction request, and a request to what it removes. It maps each removed object and frame to the request and apply that removed it. Each entry is computed from its own frame alone, or from its residue when a redaction removed the frame's payload. So a rebuild needs nothing but the log.

Reindex
rdy reindex rebuilds the index from the log and republishes the derived state. It logs any tension or suspect transitions since the last logged state, and it never rewrites the log.
The index
The index is the derived lookup over the log, kept in an embedded key-value store. rdy reindex rebuilds it, and it is never the source of truth; the acknowledged boundary comes from the log.
Constraint

The index is never the source of truth; the acknowledged boundary comes from the log, and rdy reindex rebuilds every derived state from the log.

A reindex, rdy reindex, builds a new index aside from the whole log, then puts it in place of the old one. A failed reindex keeps the old index. It then republishes the graph and tensions, and logs any transitions since the last logged state. The run pauses other writes; reads continue from the last published snapshot. An open rebuilds the index the same way when the index has lost the store's features ref. A release that adds an index table sets the old index aside as index.redb.damaged-<n> at its first open, and rebuilds it from the log. rdy 0.30.0 does so for the dispute tables. Nothing is lost, and rdy fsck warns on the file. A reindex builds the redaction tables from the request and apply records in the log. After each removal, rdy rebuilds the index the same way and keeps no old one. A reindex also empties the diagram cache, which the next draw fills again.

The index also holds a cache of drawn diagrams, the table diagrams. It is the one table that rdy does not compute from the log. It holds at most 64 MiB of rows, and rdy empties it whole when it is full. Its key holds the drawing crate's and the renderer's version strings only. So a patched crate, or an unreleased commit of the same version, reuses the cached drawings until the next reindex. An open after an unclean shutdown empties the cache.

Because the cache holds text drawn from blocks, a removal erases the old index too. After each removal, rdy overwrites the replaced index.redb with zeros and syncs it before it deletes it. While a reader still holds the old file, rdy keeps a hard link to it, index.redb.erase. It zeroes that file when the last reader lets it go. Every open zeroes a leftover index.redb.erase. A late zeroing never deletes another file's name; when it fails, the daemon logs a failure with the former path. A removal's report lists any damaged-index file, index.redb.damaged-<n>, among the copies outside the log. rdy fsck --clean-quarantine zeroes such a file before it deletes it, and skips a file with more than one link. Every open also checks for a removal without its reindex, after a crash or in a copied or restored store. When it finds one, it runs the full reindex, so the old index file is zeroed before it is deleted.

Landings and their fields

A landing is the atomic, immutable record that a proposal entered canon. The landing batch writes, with one marker, the acceptance change, the final proposal version, the snapshot and the landing record. The same batch writes the rebase op of every live unpinned view, and the refs. Either all of it is in the log or none of it is.

Table 2
FieldWhat it records
proposalthe proposal version that landed, P-x@n
prevthe previous landing; the chain of these is canon's history
statethe snapshot, the result of the conflict-aware merge of canon and the proposal's changes
changesthe ids of the changes the landing carried into canon
approved_bythe human who approved, with time, role and run
assurancelocal, relayed or policy
relayed_bythe agent and run that relayed a human's approval, if any
relay_evidencethe human's quoted words, the question they answered and a session reference
evidencehow the answer reached rdy: card, with the options shown, the choice and the card's hash; text; or elicited for an elicited approval, in the same form and with no relay fields
approved_versionthe proposal version the approver named; the approval binds to it
rebased_fromthe landings this one replaces after a replay; empty for an ordinary landing
chosenthe alternative set and member the landing chose, if any
checksthe redaction requests that a removal landing applies, sorted and without repeats; empty on every other landing
assessmentthe assessment of the approved version; none on a re-affirmation card's landing
policythe policy block version under a policy landing

approved_by always names a human, except under policy. relayed_by and relay_evidence are both set or both unset, and assurance is relayed exactly when they are set. The levels and who may approve have their home in "Approvals and assurance levels" in the rdy documentation.

A landing is never rewritten. A dispute that comes later is its own object, and it names the landing by hash. A replacement landing keeps the originals in the chain, marked replaced and readable through landing: scopes. A decision that revokes it undoes a landing; no entry of the log is ever rewritten. A redaction removes only content: it zeroes the payloads it names and keeps every frame header, hash and marker.

When the landed version has change-plan items or re-affirms a decision, the landing batch also writes the sealed plan, after the landing record. So the record of what changed because of a decision commits with the landing, under one marker.

Constraint

The log is append-only: no entry is rewritten or removed. Content leaves the store only by a redaction, which is itself an entry.

Redaction

A redaction removes content from the store and records that it did. It names block versions, every version of a block, or blobs. rdy drops their bytes and keeps their hashes, so every landing, tag, pin and hub proof that names them still verifies. rdy overwrites with zeros the payloads of the removed block versions, of each change that embeds one, and of the selected blobs' chunks. Each frame keeps its header, its place and its hash, and every batch marker stays. A residue keeps what replay needs from each removed block version or change, so the log still replays. A blob that shares a removed chunk can no longer be read, and the report lists it as a shared blob. After the zeros are synced, rdy also punches a hole over each removed payload where the filesystem can. A punch changes no byte that rdy reads.

rdy frees the disk space of removed payloads. After a removal syncs its zeros and their directory, rdy punches a hole over each removed payload where the filesystem can. Linux uses fallocate with PUNCH_HOLE and KEEP_SIZE, and macOS uses F_PUNCHHOLE over the payload's aligned interior. Another Unix system reports that it cannot punch. Windows store code ships from Release 1 (rdy 0.47.0), where the call is FSCTL_SET_ZERO_DATA on a file that rdy marks sparse.

Compaction never moves a frame, never changes a byte that rdy reads and never changes a hash. So every position, redaction span, inbox cursor, increment base and dump stays valid, and superseded ref updates stay. rdy punches only a payload that an authorized removal already zeroed, and never a held carried span. A kill at any point is harmless, because a punch rewrites zeros as zeros. A punch that fails never fails the removal: the span keeps its disk space, and its content stays removed.

rdy compact and rdy_compact punch the removed payloads that a store still holds on disk, and they report the log's bytes. log_bytes counts the sealed segments: every frame's 37-byte header and payload, batch markers included. removed_bytes counts each removed payload once. on_disk_bytes is what the filesystem allocates to the segment files. punched_bytes is the fall in that allocation during the call. It can be zero on a filesystem that punches, and it is zero on a repeat.

One removal punches at most 1,000,000 removed spans. Past that, it prints hole punching stopped after 1000000 removed spans; <n> spans were not tried, and the removal still succeeds. A store past that bound refuses rdy compact, rdy status --json and rdy fsck with E_LIMIT, so rdy fsck cannot check that store. A report also visits at most 65,536 segments and 100,000,000 frames.

Compressed sealed segments are designed, not built. The design uses deflate chunks that end at batch ends, a seek table from logical offset to chunk, and an incompatible feature compressed_segments. rdy builds them only when a hosted store nears half its 1 GiB limit. A hosted volume with transparent compression gives the same saving now, with no core change.

Redaction
A redaction removes content from the store and records that it did. rdy drops the bytes and keeps the hashes, so history still verifies. The redaction is an entry in the log, never removed, and it lands only with a human approval.

The redaction is an object in the log, and it is never removed. It records the actor, the targets, the reason class and the reason. The reason class is secret, personal, legal or retraction. It also binds the hash of its complete report. When a person approves its landing, the landing batch also writes an apply record that names the request, the landing and that report hash. Only the sealed apply authorizes rdy to remove payloads. A redacted version reads as a stub that names its redaction: the body Content removed., with no fields, links or pins. fsck accepts a missing payload only where a sealed apply authorizes it, or the carried record of a stopped load, and it never hashes one.

Before a redaction is proposed, rdy reports its blast radius. Inside the store, it lists the block versions that hold the content, the landings and tags that include them, the views and proposals that carry them, and the blocks that quote them. It also lists the stored records that quote the content: snapshot issue lists and summaries, review citations, tension advice, answer notes and change-plan versions. It lists the stored assessments, disputes, dispute resolutions and check requests that quote or name it too. Core reports them and cannot erase them. Outside the store, it names the kinds of copy that may exist: dumps, clones, exports, renders, published versions and working copies. rdy keeps no list of where they are.

The report says what rdy cannot erase. For a secret, it says to rotate the secret: a redaction limits further exposure, and it undoes none. Every report carries these warnings, in this order, with an empty fix:

  • W_REDACTION_COPIES: This removes bytes from this store. It cannot erase exports, renders, dumps, clones, published files, working copies, backups, or filesystem snapshots.
  • W_REDACTION_INVENTORY: Dumps, clones, exports, renders, and published versions may hold copies. Their locations are unknown to rdy.
  • W_REDACTION_QUOTES: Quote matches use complete source strings. Partial quotes may still hold content. Snapshot issue lists and summaries, review citations, tension advice, answer notes and change-plan versions are not erased.
  • W_REDACTION_REUSE: This store will refuse these object and chunk hashes on later writes. This can block an identical restore or a file that shares a removed chunk.
  • W_REDACTION_QUARANTINE, only when the report lists quarantine files: Quarantine files may hold the content. Redaction does not remove them. A person can run rdy fsck --clean-quarantine.
  • W_REDACTION_SECRET, only for the class secret: Rotate or revoke the secret. Redaction does not undo its exposure.

A source string is the body, or any text value in the fields, of a selected version. rdy looks for each whole source string inside the text of other records. So a record that quotes only part of one is not found. The search reads at most 64 field levels, and a second W_REDACTION_QUOTES line counts the records nested deeper. The report also says Recorded assessments: scanned.: it scans the stored assessments.

Anyone may propose a redaction, agents included. It lands only with a human approval, never under a policy. When it lands, rdy drops the bytes, and every view that holds the content shows the stub. Any session may run the dry run. A writer, reviewer or approver session records the request in a view and proposes the view. The approval card shows each request, the hash of its complete report, its counts, its reason and its warnings, and the card hash binds them. A person approves with rdy approve, or an agent relays the person's answer with rdy_answer and that card hash. An agent's own approval, and a batch answer with all_recommended, are refused with E_REDACTION_HUMAN. rdy computes the report again before it shows the card and before the landing, and a changed report is E_REDACTION_STALE. Once the apply batch is synced, the removal cannot be undone. If the removal then fails, the store serves nothing, with E_REDACTION_PENDING, and the next open finishes the removal first.

A tag that includes redacted content stays, with a redacted marker. The tag record itself never changes. rdy tags adds redacted by <hashes> to such a version, and its JSON adds redacted: true and redactions, the request hashes. The site's version list shows the word redacted beside it. The site shows a redacted block as a short notice: "Content removed." A print shows the same notice. Neither the site nor a print shows the reason, the actor, the request or an approval prompt. rdyhub spreads a redaction to its mirrors and published sites, and it tells the collaborators who cloned.

Durability and crash recovery

The store takes an exclusive lock on .rdy/store/lock while it is open, so one process holds it at a time. A second opener gets E_LOCKED. While the store is open, the file index.open exists. A process that dies leaves it behind, and the next open reads it as an unclean shutdown.

fsck
rdy fsck verifies the store: hashes, the dependency DAG, tag records, relay fields, rebased_from ids, blobs, and synced hub records against the pinned hub key and their inclusion proofs.

On open, the store scans the last segment forward. The acknowledged boundary is the end of the last valid commit marker. Everything after it is an unacknowledged batch: valid frames without a marker, or a torn frame. Those bytes are moved aside to a .torn-<offset> file and the segment is truncated. A last segment with no marker at all holds one unacknowledged batch, so it is moved aside whole. Corruption before the boundary damages acknowledged data and is refused, never repaired silently. An all-zero payload that no redaction apply or carried record authorizes is corruption too, E_REDACTION_CORRUPT. The open refuses it in the tail it replays, and a read or rdy fsck names it elsewhere. An open that finds an authorized removal unfinished finishes it before it returns the store. Then the index catches up from the log. An index that fails its integrity check is set aside and rebuilt.

Claim

A daemon killed at any point loses no acknowledged write, and no write is ever duplicated.

A client whose connection closed mid-request sees E_DAEMON_GONE. Its write may or may not have committed; the fix names rdy status to check, and nothing is retried on the client's behalf. fsck, run as rdy fsck, verifies hashes, the dependency DAG, every view's chain and head, canon's landings, tag records, the relay fields and rebased_from ids. It also checks the inbox refs, the answers and their refs, and folds the TRANSITION records to check the index's open tensions and suspects. It accepts a removed payload only where a sealed redaction apply or a carried record authorizes it, and it never hashes one. It warns with W_STOP_BEFORE_REDACTION while a carried record names a payload that the store still holds. Any other all-zero payload is E_REDACTION_CORRUPT. With an active redaction, its report counts the removed objects, frames and bytes apart from the payloads it hashed. Errors have their home in "Errors and warnings" in the rdy documentation. The report ends with the log's bytes, by kind and removed.

Store format and fix forward

The file .rdy/store/FORMAT holds the lines rdy store format and store_format 19, and FEATURES beside it lists the store's features. The log records the same features in meta/store_features. A binary opens a store when it knows every incompatible feature that the store lists. It refuses any other store with E_STORE_FORMAT before anything is locked or written. A released rdy of a scalar format reads store_format 19 and says that a newer rdy wrote the store. A store of scalar format 10 to 18 moves to a feature store with dump and load. The fix for an older store is to re-create the project.

A feature is compatible, read_only_compatible or incompatible, and it names the first rdy that knows it. For a feature it does not know, rdy follows the class. A compatible feature permits writes, and a read_only_compatible one opens the store for reading only. An incompatible one refuses the open, and the refusal names the rdy that the feature needs. rdy 0.26.0 registers seven features, all incompatible. Store format lists them and when each turns on.

Each object records its encoding version in its frame, and a new object uses its kind's newest encoding. An import or a take copies verified frames as they are, and it never encodes them again. rdy reads every encoding it registers, and an older body reads into the current shape with the hash of its own bytes. An object of an encoding this rdy does not know refuses the whole open with E_STORE_FORMAT.

A read-only open changes no byte of the store. It needs the store's existing lock file, which it holds without writing, and it builds a private index aside. It keeps the writable open's acknowledged boundary, but it never cuts a torn tail or finishes a removal. An unfinished removal refuses it with E_REDACTION_PENDING, and a sealed upgrade that a newer rdy did not finish refuses it with E_STORE_FORMAT. Reads, dumps, stream exports, renders and rdy fsck work, and every write is E_STORE_READ_ONLY.

Dump and load
rdy dump writes a whole project, its history and open views included, as one verified stream. With --after, it writes an increment: the batches after an earlier dump. rdy load rebuilds a project from a dump, or from a dump chain, in a directory with no store. Every later rdy reads every released dump format, so the two move a project across a store format change.

A dump copies the log's sealed batches in log order, byte for byte, with the project files. A frame whose payload a redaction removed is the one exception. The dump carries it as a DROPPED record: its kind, hash and length, the apply that authorized the removal, and its residue. A load writes each batch back at its source place, in a directory with no store. It writes a dropped frame as the source holds it, the header and then zeros. It accepts the frame only when an apply or a carried record in the same dump authorizes it. A stopped chain load also accepts an apply after the stop. So the new log is the old log, and every hash, landing, tag, view and inbox cursor stays valid. When the dump holds a scalar store, the load appends one batch that sets meta/store_features to a new store's features. That batch also gives a log with no meta/repo_id a new repo id. A dump of a feature store keeps its manifest. Every later rdy reads every released dump format, so a project keeps its history across each store format change. rdy 0.6.0 writes dump format 2 with store format 13, rdy 0.7.0 writes it with store format 14, and rdy 0.10.0 with store format 15. rdy 0.13.0 writes dump format 3 with store format 16, rdy 0.18.0 writes it with store format 17, and rdy 0.20.0 with store format 18. rdy 0.26.0 writes dump format 4, with the store's features in place of a format number. The readers of format 1 are unchanged. The gate keeps a fixture dump of each released pair, (2, 13), (2, 14), (2, 15), (3, 16), (3, 17) and (3, 18) included, and never rewrites one. The dump format has its home in "File formats" in the rdy documentation.

Fix forward
Fix forward is the rule that nothing keeps compatibility with an earlier store, wire or file format until Release 1, rdy's publication. It allows no migrations, shims or upgrade paths. The one exception is the dump format: every later rdy reads every released dump format. A change that alters the store format moves each project with dump and load, so its history carries over. Preview releases before Release 1 fix forward too. The rule ended with Release 1, rdy 0.47.0; from then on, each breaking change comes with an upgrade path.
Release 1
Release 1 is rdy's publication: the first release with a compatibility promise. Fix forward ends there. From then on, each breaking change to a contract surface comes with an upgrade path. It is rdy 0.47.0, a later 0.N than every preview's.
Preview release
A preview release is a public, signed build of rdy before Release 1. It fixes forward and carries no compatibility promise. rdy --version prints its mark, such as rdy 0.11.0 (preview). A project moves to a newer preview, and to Release 1, with dump and load.
Constraint

Until Release 1 (rdy 0.47.0), and in every preview release before it, nothing kept compatibility with an earlier store, wire or file format: no migrations, shims, aliases or upgrade paths. The one exception is the dump format: every later rdy reads every released dump format.

A change that alters the store format moves each project with dump and load. Landings, tags, views, proposals, reviews and every hash carry over. No rdy dumps a store older than format 10, so the fix for such a store is to re-create the project with this rdy. Its history then does not carry over. The kinds and fields themselves have their home in Store format.

The store move in rdy 0.26.0 took block order out of the content hash. So after a load into rdy 0.26.0, every pin recorded before the move reads as suspect, though no stored byte changes. Tension dismissals and change-plan answers lapse, pair review keys change, and their reviews come back. An accepted decision needs re-affirmation, and any other citing block needs a repin. Open views can gain blocking premise-shift tensions. The first daemon start after the load logs these moves in one reopened batch.

No core code keeps the old pins valid. A project's owner repins, dismisses and answers again while they work, and the release notes say so in one line.

The store upgrade is built, and it runs once rdy registers an upgrade step. A new rdy then upgrades an older feature store on first open, and rdy upgrade runs the same upgrade. An upgrade never changes the hash of a stored object. An ordinary connection stops the old daemon first, and so does the command. The upgrade copies the closed store to a sibling backup, .store-upgrade-<manifest hash>-<batch hash>, and writes backup.json last. It then appends one sealed batch with the new meta/store_features and the receipt meta/upgrade. It reindexes and runs the store check, and the open then runs the full rdy fsck. Only then does rdy write the new FEATURES and FORMAT.

A crash after the seal resumes at the next open, which runs the checks and writes the mirror, with no second batch. A failed check keeps the batch and the backup, and rdy never restores a backup itself. The backup is the only rollback: a person stops the daemon and restores it. rdy 0.26.0 registers no upgrade step, because no feature store was published before it. So every store it opens is current, and an upgrade there changes nothing. An adapter's request open never upgrades, and a host runs the adapter's maintenance call instead.

Holders

Holder
A holder is a store that keeps uploaded objects and tags with no canon. rdyhub reaches it through rdy-adapter. A take adds an upload's history and its tag in one batch, and reads work at tag scope.
Take
A take adds one upload's batches to a holder in one sealed batch: the objects it lacks, the approved drops, the tag and its relay answer refs.

A holder is a store for the hub: it keeps uploaded objects and tags with no canon. It has no views, proposals, working copy, config file or pack directory. It reads with the built-in rdy-standard pack in memory, so publication profiles parse, and it never checks a block against a pack. Its name is the holder directory's name, as for a project with no name. rdyhub reaches a holder only through rdy-adapter, and core keeps its correctness.

A holder reads only at a tag or landing scope. A read that needs canon, a view or a proposal is refused with holder reads need a tag or landing. Each tag's history is its own, so a holder may hold histories that diverge. It never asks canon or the global index which landing carried a change. The project path refuses a holder with this store is a holder, and the holder path refuses a project with this store is a project.

A take adds one upload to a holder. It checks all the upload's batch files as one union over the holder, then writes one sealed batch. That batch holds the objects the holder lacks, the approved drops, the tag and the relay answer refs. A failed take writes nothing. A version that the holder holds at the same landing keeps the holder's first tag, and one at another landing is E_TAG_EXISTS. A caller whose reply was lost reads the tags and the object keys again, because a take keeps no receipt.

The take checks structure, removal proofs, signatures and the publication limits of each new snapshot. It never checks a block against a pack, and it never runs the current gate policy on an old approval. Before it seals, it checks each uploaded ANSWER by the answer rules and each SIGNATURE by the signature check. An unknown key is no refusal, and neither is a signature of another project.

A holder has no proposals, so it gets a removal only from a take, by its portable proof. The take erases every copy of the approved content that the holder holds. A holder can keep a change from another upload that embeds the removed version. When no approval covers that change, the take refuses with E_REDACTION_STALE. A person then redacts the content in the project that made that change, and the next upload brings that removal. After that take, the first upload passes, and no approval is ever widened.

A holder's fsck checks each tag's history once per object: snapshots, changes, approvals, relays, answers, blobs, signatures and removals. It skips canon membership and tag order, and it has no pack check. A relayed tag's answer is found through answer/tag-object:<hash>. A valid signature of another project reads signed in another project (<repo id>): not verified here, and fsck counts it in foreign_signatures. A holder's dump carries no project files, and its load gives a holder again. A clone refuses a holder.

Increments and dump chains

An increment holds the sealed batches that a store took after an earlier dump or increment of the same store. rdy dump --after <file> writes one. A full dump and the increments after it form a dump chain. rdy load rebuilds a store from a dump chain in a directory with no store. It can also stop at an earlier landing, tag or log position. So a host can copy a busy store every few minutes and restore it to a chosen point. A host can also give each increment to a read-only follower.

Increment
An increment is a dump of kind increment. It holds the sealed batches of one store after a base position, byte for byte, up to the end of one read state. It names its base position, the marker of the batch that ends there, and the trailer digest of the file before it. It loads only after that file, in a dump chain.
Dump chain
A dump chain is one full dump of a store, then zero or more increments of the same store. Each increment starts at the end of the file before it. rdy load takes a dump chain in order. It refuses a gap, an overlap, a reorder or a file of another store.

An increment ends where one read state ends, as a dump does. The store keeps taking writes while the export runs, and the increment holds none of them. A content removal is the only act that changes old log bytes, and it starts a new read epoch. So when a removal starts during the export, the export refuses with E_REDACTED_STATE and places no file. Two exports with the same base and end give the same bytes, from the same rdy and with the same project files.

Before it writes, the export checks the file it follows. It reads only that file's header and trailer. That file is a full dump or an increment of dump format 4, with this store's repo id. Each of its features is in this store's features, unchanged. Its end is the end of a batch in this store's log, and this store's marker there equals the file's end batch. The export refuses any other file with E_DUMP_CHAIN. When the store holds no batch after that end, the export writes no file and reads no project file.

A chain load takes the full dump first, then each increment in chain order. Before it writes a byte, it checks each file's header and trailer, and the link to the file before it. Each increment's base is the end of the file before it, with the same end batch and repo id. Its features keep every feature of the file before it unchanged, and they may add new ones. Its prev equals that file's trailer digest, and a broken link is E_DUMP_CHAIN. Still before it writes, the load reads the framing of every file and checks every removal proof, the stop and the files after the stop. Then one ingest writes each kept batch at its source place and hashes each payload once.

Damage in any file is E_DUMP, and the load removes what it wrote. A file whose bytes change between the checks and the ingest is E_DUMP too, with dump changed during load. The checks keep at most two files open, and they copy no payload to a spool. Each file keeps the limits of dump format 2. The bounds on dropped frames hold for the whole chain, not for each file: 1,000,000 frames and 1 GiB of zeros.

--stop-at names where the loaded log ends: landing:<hash>, tag:<name> or pos:<segment>.<offset>. A landing hash can be a unique prefix of 6 to 64 hex digits. A landing ends at the end of its batch in the chain, and a tag at the end of the batch with its TAG record. A log position must be the end of a batch in the chain, and pos:0.0 is never one. The loaded log is the source log up to that end, byte for byte, with no partial batch. At most one carried batch and the one upgrade batch follow it, and a stop that names nothing in the chain is E_LOAD_STOP.

An increment never carries a removed payload: a removed frame travels as a DROPPED record, as in a full dump. A redaction apply in an increment can remove content that an earlier file of the chain still holds. Before it writes, the load reads the applies of every file. It writes zeros for each span that an apply at or before the stop removes, so the new store never holds that payload. The earlier file keeps the bytes until its owner deletes it, as W_REDACTION_COPIES warns.

A stop can lie before a redaction apply that removed content before the stop. The load then gives the store as it was at the stop, and it warns with W_STOP_BEFORE_REDACTION. Each removed payload that a chain file holds comes back. A payload that no chain file holds stays removed, and it reads as the stub Content removed.. The load sees only the applies in the given files. A load of only the files up to the stop holds removed payloads again, with no warning, as a load of any older dump does.

After the last loaded batch, the load writes one carried batch. First it holds each residue that a carried span names and the loaded log lacks, once, sorted by hash. Then it holds one REDACTION_CARRIED record for each such apply, in source order. A carried record in a chain file after the stop counts as such an apply, and the new record keeps its source provenance. The records let the open and rdy fsck accept the zero payloads, so the store passes its own checks. Two loads of the same chain and stop give the same log bytes.

One carried record holds at most 100,000 spans and 16,777,216 encoded bytes. One source object can have several spans, so a valid source apply can pass that bound. A stopped load then refuses with E_REDACTION_LIMIT before it writes anything. Its fix reads Stop at another place, or load the whole chain with no stop. A load of the whole chain, with no stop, still works.

rdy status and rdy fsck repeat the warning while the store holds a payload that its source removed later. One warning stands for each source apply, and its counts follow the spans that the store still holds. The warning lists the source request's targets. In a project, the person, or a host such as rdyhub, proposes their redaction again with rdy redact. Its report skips the spans that hold zeros already. When a person approves it and it lands, the store erases the held payloads, and the warning ends.

A holder has no proposals, so it gets a removal only from a take. The hub asks the uploader to send the removal again, and the take erases the held payloads. Any approved removal of a span's exact kind, hash, length and residue counts, the source's own removal included. The uploader's next upload that reaches the content carries it too. A take that removes some held payloads lowers the count of held payloads in the warning. An apply that covers a held: false span becomes its proof in place of the carried record.

A stream export never sends a payload that a carried record names. It refuses a tag whose closure reaches a span of a carried record that no apply in the store covers. So a stopped store serves the affected tags only after a removal covers those spans. Other tags export as before. In a project, a new redaction skips the held: false spans, so a tag that reaches one cannot be exported yet.

A dump chain of scalar stores has one store format, and a chain of feature stores only adds features. After a store format change, the next chain starts with a new full dump. A later rdy still loads an older chain, and it appends the one upgrade batch after the last batch it loads. A stop before the source's own upgrade batch keeps the store format in force at the stop, and the load's upgrade starts from that format. An increment of a project carries the project files as the export reads them, and an increment of a holder carries none. A chain load writes the project files of the last file it takes batches from.

Core makes, checks and loads the increments of one store. When to export, where the files go, how long they stay and which file a restore starts from belong to the host, such as rdyhub. The host also maps a restore time to a landing or a log position, from its own record of when it wrote each file.

A read-only follower serves a host such as rdyhub. A follower is a store whose log is a byte-identical prefix of its source's. The host seeds it from a full dump, then gives it each increment of the source's chain. It answers reads through the adapter and refuses every write with E_STORE_FOLLOWER. It is a host's mechanism, so it has no chat path and no rdy command. The adapter (maintenance::seed_follower, Follower::{open, end, follow, snapshot}) and the QA command qa-follower reach it. Promotion, failover, lag targets and shipping cadence stay the host's.

Every ordinary open and write refuses a follower before it has any effect, a no-op or a dry run included. So rdy dump refuses a follower too, with E_STORE_FOLLOWER, although a dump only reads. A follower of a project reads as a project does. A follower of a holder reads only at tag or landing scope.

The mark is the private file .rdy/store/FOLLOWER, outside the log, so no dump carries it. It holds at most 262,144 bytes. Its first line is rdy follower 1, and its second line is one JSON object {chain, files}. chain holds the chain end: repo_id, store_format, end, end_batch and digest. files lists the source's project files, sorted by path, each as {path, hash}, and a holder's list is empty. A mark that rdy cannot trust is E_DUMP_CHAIN, and the store never opens as an ordinary one.

A seed takes one full dump in the dump format and store that this rdy writes, with no upgrade to make. A manifest may hold fewer features than this rdy registers. The target does not exist or is empty. The seed copies the source log byte for byte and adds no upgrade, origin or local batch. The mark is durable before the store takes its place. A refused or failed seed leaves the target as it was.

Follower::follow takes one increment per call, and checks its link as a chain load does. The increment may add features and never drops or changes one. The follower writes the batches at their source places and zeroes each span that an apply removes. It replaces the source's project files, then updates the mark and publishes a new read state. It writes only source bytes. A removal starts a new read epoch before it erases, so a read captured earlier refuses with E_REDACTED_STATE. One call takes at most 1,000,000 batches, 10,000,000 frames and 65,536 segments, and it visits at most 100,000,000 frames of the existing log.

The log is the truth for the end. A failed follow keeps each complete source batch, and an open quarantines a torn tail. Reads then refuse with the follower has an unfinished increment until the host retries the same increment. A repeat of an increment already written appends nothing. It finishes any removal and project-file work and records the digest. The host retries its saved increment, and never builds a link from Follower::end.

One case falls short of that rule. A follower stopped inside an increment that holds a payload's batch and the later batch that removes it cannot reopen. Redaction bootstrap refuses the prefix with E_REDACTION_CORRUPT, because the zeros have no authority yet. Its host seeds a new follower from a fresh full dump.

A snapshot of How rdy is built at v0.47.0.