How rdy is built v0.56.0

System

Quality gate

rdy promises durability, a deterministic gate and a site with nothing of its machinery in it. The quality gate, one command cargo qa, is how rdy's own development keeps those promises. The command pressures everything built so far at its boundaries, pins every defect it has ever found, and measures performance against a baseline. This page is for anyone who changes rdy. A green gate is evidence for the tests that ran, not proof that rdy has no known defects. A milestone's record names its known gaps and accepted limits beside its gate evidence.

One command

cargo qa is rdy's regression and hardening gate. It is an alias for the qa-gate binary in the rdy-qa crate. It runs five steps in order: formatting, clippy with warnings as errors, the workspace tests, the rdy-qa hardening suite by area, and the perf tier. Before them, it runs two steps that the others need: a locked fetch of every target's crates, cargo fetch --locked, and the release build. Both always run, and a failed one is a failed row of the report. It exits non-zero if any step failed. The hardening suite runs in a release build, so deadlines and timings measure rdy and not a debug build.

Each step names the steps it needs. When a step fails, the gate skips the steps that need it, and their rows say SKIPPED (after <step> failed). --all-stages runs every step after a failure. Each child process has a wall-clock deadline: twice its median, and never under 10 minutes. Past the deadline, the gate sends TERM, then KILL after 10 seconds, and the row names the stage.

The gate fails when Unix-only code appears outside the platform helper modules, or in a test file not marked Unix-only.

Quality gate
The quality gate is how rdy's own development keeps its promises. It is one command, cargo qa, which runs the build checks, the tests, the hardening suite area by area and the perf tier. A plan merges only with it green. It is described in Quality gate.
Table 1
FlagEffect
--deepMultiplies randomized case counts by ten and runs the slow sweeps. Required before a milestone closes.
--only <area>Narrows the hardening suite to one area. --only perf runs the locked fetch, the release build and the perf tier alone.
--skip-perfSkips the perf tier.
--rebaselineRewrites this machine class's perf baseline after an intended performance change.
--focus <crate|area>[::<filter>]Runs the tests of one crate or one area, with only the builds they need. It runs no formatting, clippy, workspace tests or perf, and writes no report. A run that matches no test fails, and its last line is the command that replays the run.
--all-stagesRuns every step after a failure, so no step is skipped.

The report goes to target/qa/report.md and report.json. It opens with the revision and dirty flag, the machine class, the mode, the duration and the verdict. Then come each build step with its counts, and each area with its passed, failed, ignored and skipped counts and the failing test names. Beneath each failing name, the area report and the workspace-tests step keep the start of its first panic: at most 40 lines and 16384 bytes. It ends with the perf table, any failing randomized seeds, and the guarded defect ids per area.

Its 25 areas passed 4,291 tests, failed none, ignored 38 and skipped none. Its workspace tests passed 3,127 and ignored 12. The fast gate on the same source skipped one test, which runs only under --deep. Each ignored test states its reason in the source. Four of them reproduced gaps: three in rule reach, and one in how the queue read an elicited Later answer. rdy 0.41.0 fixes all four, and their tests run again.

Requirement

A plan merges only with cargo qa green, and a milestone closes only with cargo qa --deep green on a reference machine.

The gate lives in the rdy-core repository, as the rdy-qa crate, so a defect's test and its fix land in one commit. The crate holds tests, the gate binaries and shared fixtures. The fixtures are project builders, a split-brain helper, an MCP client and hostile-input corpora. The split-brain helper lands proposals from many views in a chosen order. The MCP client enforces a two-second deadline per request. Specs, plans and reports stay out of the repository.

Areas

The gate splits the hardening suite into areas, and each area pressures one boundary. An area is one test binary of the rdy-qa crate, tests/<area>/main.rs, with one mod line for each test file in its directory. The gate finds the areas from those directories, and the crate's own unit tests report as the area lib. The engine_read binary is the second half of engine, and its counts add to that area's row. The rdy-qa test layout step fails when a test file has no mod line, because such a file compiles and never runs.

Table 2
AreaWhat it pressures
modelOrder keys, ids, hashes, names and slugs. order_between never panics on any input, 10,000 appends keep every key short, and the hard cap on key length is refused, never exceeded. Parsers refuse look-alike, padded and upper-case input.
storeDurability and hostile objects. A torn tail at every byte offset recovers to the last acknowledged write. Index damage is rebuilt, never trusted. A failed write leaves nothing. A hostile blob manifest is an error or a bounded allocation, never a crash. Commit markers, segment rolls and index catch-up. A hostile sync batch is refused within its bounds: lengths, counts, nesting and decoded values. A take that fails before its seal writes nothing, and a holder's open, reindex and fsck keep its closed refs. A hostile carried record is refused within its bounds, and a carried record never erases a payload. A punch changes no byte that rdy reads, no header, no length and no hash. It reaches only durable authorized zeros, and a failed punch never fails a removal. Every ordinary write and open of a follower refuses before its fast path. At a milestone, a real punch runs on macOS and on Linux ext4. For Release 1, the native Windows gate runs a real punch on NTFS and checks that it keeps every byte. A cut on Windows hardware is not proved yet.
schemaHostile packs (cycles, redefinitions of engine types, unknown keys, huge packs) are refused. Validation never panics on any block shape. Areas, rules and pack sections.
engineRules across views. Random op sequences across two to four views from one canon, proposed and landed in random order: each landing is refused cleanly or leaves canon passing the invariant checker. Gate, merge, snapshots, scopes, suspects, versions and keys. Its second test binary, engine_read, holds what the engine reports: search, graph, history, snapshots and coordination state. Both binaries report as one row.
ioExport, import, dump, load and rdy check. Any generated project round-trips with identical version hashes. A load reproduces the dumped log byte for byte, and every released dump fixture loads. Hostile trees are refused with positioned diagnostics, store nothing, and stay within bounded time and memory. A publication profile lands, takes a tag and survives dump, load, clone and reindex, and no working copy holds it. A chain load reproduces the source log up to its stop, byte for byte. It refuses every broken link with its named code before it writes. The full and three-file chain fixtures of (3, 16), for a project and a holder, load whole and at fixed stops before a removal. Each load gives its exact warnings and carried batch. A truncated, reordered or changed chain file is refused. The holder dump v2-s15-holder loads as a holder. The sync fixture v1-s15 keeps its exact bytes, and rdy refuses it with E_STORE_FORMAT. The same tag's batch at the current store format passes a take when it is split at other offsets. A dump of a compacted store equals a dump of the same store before. A seeded follower's log, reads, tags and full dump equal its source's at each completed increment, after a removal and after a restart. A stop that redaction bootstrap accepts resumes on a retry at every source marker and sync point.
mcpThe agent boundary as an untrusted, looping client. Every tool, given malformed, oversized, missing and look-alike params, answers within two seconds, and a follow-up call proves the server is alive. Input over the hard limits is refused with E_LIMIT. Pipelined requests are answered in order.
cliThe human boundary. Exit codes match success or failure, --json output is valid JSON, and bad arguments give a clean error. Every local output of an org profile and a public profile, from the CLI and the chat tools, is scanned for canary words. No file name or byte holds an excluded doc's canary, and the selected content's canaries stay. The README's preview note, dump route and trust state are pinned. A ready README lists each release key, its fingerprint and its version range. Each version selects exactly one key, and every generated install command for that version repeats its allowed-signers line byte for byte. Root-statement commands use their own namespace.
daemonThe transport: auto-start races, concurrent clients, a killed daemon, idle exit, the version handshake, the build handshake with its replacement at the last close, and hostile input on the socket.
renderHostile text in every user field never appears unescaped. A link checker confirms every link and anchor resolves. Navigation, search, diagrams, the trail, versions and the ref line. A profiled site and print read only the selection, and a profile block is on no output. The print golden masks the version in the PDF's /Producer (rdy <version>), so a new release keeps its digests. A publication renders the same bytes from a store and from a stream, and each HTML page holds one notice slot at its recorded offset.
render_qualityThe site quality bar, described below.
invariantsThe invariant checker itself. Each assessment rule of the checker and of the landing audit has a negative witness. A test builds the witness on a copy of a fact projection, never on the log.
authorityEvery built approval route: a relayed rdy_answer, an elicited answer, the person's form on the local approval page, rdy answer and rdy approve. Each route starts from one fixture recipe, and the test compares what each route stores. Every route lands only the card the person saw, and every later refusal blocks every route. A policy uses one rule for the whole version, and an item that no policy may take reaches the person. Local, elicited, relayed and policy provenance keep their real differences. For a merge clash, rdy approve refuses with E_VALIDATION and the answer routes with E_PROPOSAL_NOT_READY, and nothing lands on any route.
checksThe check contract. Deterministic stages never run an agent check, and each of the eight agent checks keeps its subject and its review contract. Source existence is a read fact, never a gate input. Governing and prose drift use the four routes. Neighbor consequences and group answers use the whole displayed set. Query, diff and trace give the same result through chat and the CLI. Grounded method 2 keeps every card stored under method 1.
publicationProfile outputs and the publication check, through the chat tools and then the CLI. The fixture has selected and excluded docs and figures, a public and an org profile, a decision outside the selection and a missing target. Every excluded field and asset holds a canary, and no output holds one. Counted refs block the public profile and warn on the org profile. A decision ref outside the selection is dropped and never counted, and a link edge outside it is a links_outside row. Every local link and anchor resolves, but the scan does not check a fragment that follows a query, such as p.html?view=1#missing. A profile's identity survives reindex, dump and clone.
swarmEight scripted agents and one person act on one daemon, which the run kills once. The store keeps every acknowledged write across the kill. rdy reports every tension that a full rebuild finds, and no landing puts a blocking tension into canon. Two views that collide land one after the other. Every acknowledged write to stable content carries a briefing. Each inbox is a function of the log, and the log holds every tension a reader saw. One writer runs rdy_compact through MCP, and qa-follower follows a chain from a frozen run. The fast gate runs six seeds of 40 steps, and the deep gate runs three seeds of 200 steps. The person acts mainly through a relaying agent that calls rdy_pending and rdy_answer. Elicitation, the local approver UI and the CLI are the other lanes. Each seed must show the relayed, policy, elicitation, local UI, compaction and publication witnesses. Six other witnesses, such as a refused wrong-role answer, are proven in their own areas, not under the swarm's load. The report labels those six area-proven even in a run where their area did not run. Every drained landing passes the landing audit, and rdy reindex reproduces the assessment records and the pending items. A follower stopped inside an increment that holds a payload and its removal does not reopen. The host then seeds a new follower from a fresh dump.
releaseThe release archives and the install check. An archive holds the binary, both license files, THIRD-PARTY-NOTICES.txt and, for a preview, PREVIEW.txt. The notices' bytes equal the generator's output for the locked graph and the target. Checks pin the README's License part and the release notes' third-party part to the MPL-2.0 crates in Cargo.lock. The dependency policy allows MPL-2.0 only for imbl@7.0.2 and imbl-sized-chunks@0.2.0, with no advisory ignore. OpenSSH checks the signature of SHA256SUMS before the check reads its lines. The hash check passes before extraction, and a failed check extracts and runs nothing. The install check runs the README's own commands, then the installed rdy through the CLI and MCP. Every child process runs within an output cap and a deadline. The default gate ignores the installed-binary test. A native run on macOS arm64 or Linux amd64 runs it with no skip path. From Release 1, the fast gate runs it on each native target, Windows amd64 included, where the archive holds rdy.exe. The gate loads the frozen Tally sample, samples/tally/tally.rdydump, and never builds a new one. The dump matches its freeze record and passes rdy check, and its history names only the two sample actors. The first session runs through the real MCP path of the rdy under test. It confirms the storage requirement and updates the purge flow. A bad or changed dump never gets a pass receipt. Other release tests skip with a named reason when a tool they need is missing. A signature by a key other than the version's one key is refused before extraction. Outside this test binary, scripts/release/rehearse.py checks a candidate's exact bytes with an isolated test signer. The Python tests in tests/ci cover, with fake providers, the genuine check of the private draft before publication, durable retries with no second Sign, and current authority before each remaining act. None of these qualifies a live release. Before any release-dependent step, the gate checks four things and stops on a mismatch. The source revision equals the archive revision, and the bundle's rdy --version equals the expected version. The CLI is the one that the gate just built, and the report records the revision.
perfThe perf tier, described below.

The live site's review pages have their own proofs. In render_quality, sod3_on_request_page_matches_whole_build_byte_for_byte renders each file of a review target on request and compares it with the target's whole build, byte for byte. In daemon, tests prove that a landing never builds a whole review target, that pages obey the cap and drop least recently used first, that canon and tag builds are not dropped for a review target, that a write or a removal never serves a stale page, and that a warning is logged once in each check.

Randomized tests use fixed seeds, so a gate run is deterministic. Every test that guards a past defect has a name that starts with the finding's id in lower case, such as ord1_tied_keys_insert_after_does_not_panic. The report collects these ids per area, so the list of guarded defects is always current. A failing seed is pinned as a named test in the same commit as its fix.

The invariant checker

The invariant checker runs on canon or on a view and reports every violation, not just the first. Tests call it after they act, and the model-based tests call it after every successful landing.

Table 3
InvariantWhat must hold
ParentsEvery block's parent exists, and no parent chain loops.
PlacementDocs and folders sit only at the top level or under a folder. A decision, a question, a finding or a source may also sit at the top level or directly in a folder. Every other block sits under an allowed parent type.
DepthFolder depth is within the limit.
NamesSibling docs and folders have unique, valid names, ignoring case.
Order keysSibling order keys are well formed and within the length cap; equal keys are allowed only as harmless ties.
TargetsEvery ref and link target resolves.
SchemaEvery block validates against the pack.
Frozen decisionsAccepted and rejected decisions in canon are identical to their landed versions.
TagsVersion tags are valid, unique, on canon's chain and increasing.
Storerdy fsck succeeds.
BriefingsOn an assessed landing, each change of the approved version that touches stable content records a briefing. Three built exemptions apply: an import, a change before the log's first briefing, and a replay of at most 64 steps to such a change.
Assessed versionThe assessment an assessed landing names assessed the approved version. The stored assessment keeps its bytes and its method, and a later method never rewrites them.
Change planThe sealed plan of an assessed landing accounts for each item. A tension item has an answer. An item left open has a subject that is not stable, unless it is an update_impl item. A deferred item names its accepted deferral card, and no answer has lapsed.
Approval routeA policy landing records the policy, the assessment and the approved version, and no relay. A landing records a policy only with assurance: policy. A relayed landing records its agent, the person's words and the card with its hash. A local landing records no relay.
Claim

After any sequence of writes, proposals and landings, canon passes every invariant, or rdy refused the landing that would have broken one.

The checker grows with rdy, and each new surface adds its invariants. A view's included set is closed under dependencies. After a landing, every live unpinned view has the new canon as its base. Every recorded conflict keeps both sides. rdy reindex reproduces the identical derived state. No landing puts a blocking tension into canon. A checkout followed by a commit with no edits is a no-op.

The assessment rows of the table apply only to an assessed landing. An assessed landing records an assessment, a policy or assurance: policy, or it lands a re-affirmation card. An older landing or a released fixture records none of these, and the checker asks it for none. A separate audit runs at each landing that a test observes between two held read snapshots. It reads stored records and the test's journal, and it never calls readiness or the gate.

The audit checks that the assessment the landing names is the approved version's newest. It checks that no landing since that assessment wrote a block of its reach. The pack, the gate config and the live policy must be the ones the assessment used. No person's act may hold the version, and the person must have seen the approved version and the card the approval names.

The audit reads the reach that the assessment stored, so it does not find a block that rdy left out of that reach. A stored briefing link proves that a briefing was recorded, not that it was current. A relayed landing whose journal holds no capture of what the person saw skips the card comparison.

The perf tier and size tiers

Performance is gated by regression, not by the design targets. The targets in Performance targets are printed beside each operation for information. A closed set of operations has a spec ceiling on its p95, and an operation over its ceiling fails the gate. Every other failure is a slowdown against a recorded baseline, under the rule of the perf tier.

The tier runs on a deterministic generated project of about 10,000 blocks: folders, docs, sections, claims, decisions, versions and two views with unlanded changes. It times each operation as a median and a p95 over repeated runs. The writes are a single write, a 200-block batch write, and a propose and land of a 500-doc proposal. The reads are context, impact, resolving a path, the full tree and the version position. The rest are cold and incremental view materialization, a render, export and import, dump and load, and two cold opens, one with a lagging index. It also times an increment, a chain load whole and stopped, a print in each of the three formats, and a clone. Six publication operations follow on the typical tier, with no design target. They resolve a profile, compare two selections, and write a profiled site and a profiled print in each format. The live site adds its full build, the time from a write to a page's event, a fan-out to 32 pages and a page request. Five live profile operations run on both tiers, also with no design target. They build a profile of canon, a review through a profile in a proposal, and the version menu with its profile rows. They also time a page request on a profile-only site, and the time from a landing to that page's event.

Project sizes fall into three tiers. Typical is 2,000 to 20,000 blocks, budgeted at 10,000. Every target must be met there, and it is what the gate measures. Large is 20,000 to 50,000, budgeted at 50,000; queries and cold start meet target and writes are within twice it. Ceiling is 100,000, a stress size; everything must work correctly, within five times target except writes, which are stated per hardware class. A miss at the typical tier is a target miss in rdy's performance record. The gate fails only on a slowdown against the baseline or a spec ceiling. A miss at the ceiling is recorded and never blocks a milestone. cargo qa measures the typical tier, and --deep adds the large tier as _50k operations.

The baseline lives in the repository as crates/rdy-qa/qa-baseline.json, keyed by machine class: operating system, CPU and storage, never a hostname. Until most planned features ship, an operation with a target fails when its median is twice its baseline or more. A targeted operation that the class baseline lacks fails too. An operation with no target, or with only a proposed target, is reported and never fails.

On a machine class with no baseline, the tier compares nothing, writes nothing and fails. --rebaseline writes the run as that class's baseline, and the diff is reviewed in the commit. The project adds a class only after two runs on it agree within 10 percent. One quiet run can set a budget that nothing can meet.

Constraint

Timing assertions belong in the perf tier, never in a correctness test; a millisecond assertion in a test file flakes on a shared machine.

render_quality and the visual review

The site quality bar is a set of rules every rendered page must meet. The gate enforces it on every change to the renderer. The site states the rules in reader terms. Three mechanisms enforce them.

The leak scan renders the golden fixture, a generated tree project and a hostile-text project, and walks the visible text of every page. Each text run is tagged by zone: authored content, or the chrome the renderer generates. A run is also tagged as a label when it is the whole text of a badge, heading, breadcrumb or similar element. Every forbidden pattern runs over the zones its rule names. The patterns cover ids, hashes, proposal and landing refs, field names, file paths, underscore directories, raw status words, type names and debug output.

Requirement

One hit of a forbidden pattern in visible text fails the gate, naming the page, the zone, the pattern and the text.

To fix a false positive, change the renderer's output, or narrow the rule with a recorded decision. It is never fixed by an allow list in code. Each leak the first scan found is pinned as a test named site<n>_…, so it cannot return. Structure checks confirm one h1, no skipped heading level, landmarks, and the version label, breadcrumbs and theme toggle on every page. They also confirm no link to an underscore path, no request to another host, and alt text on every image. A no-JavaScript check strips every script and confirms the page's content, navigation and cross-references are still there.

Static checks cover what a browser would show. Every color literal in the stylesheet must sit in one of the three token blocks, and the token names must match across them. Each declared text and background pair must meet 4.5:1, and each interface pair 3:1, in both themes; rdy's own gate is always strict about contrast. Fixed widths over the phone budget, nowrap in content, an unwrapped table or code block and a missing max-width on an image all fail. A layout smoke test renders the longest doc and the widest table and checks no unbroken token is longer than 60 characters outside code.

The visual review is a step on every plan that touches the renderer. It renders the golden fixture and screenshots nine pages at desktop and phone widths in both themes, 36 images in all. A design reviewer scores each rule from 0 to 3 with a one-line reason. A 0 on any rule blocks the merge, like a failing test. A 1 is a fix-forward task in the same plan, unless a decision records an exception. The reviewer also diffs the images against the previous plan's set and names any regression. A plan that changes profiled output also captures a profile's home, doc, glossary, questions and disagreements pages, in both themes at both widths.

The golden fixture is a real design corpus: the Python structural pattern matching PEPs, which are public domain. It has a specification, its reasons, a tutorial, defined terms and competing proposals that were rejected. So it exercises every content type, cross-references, versions and the edge content a renderer trips on.

Fix forward

Until Release 1 (rdy 0.47.0), nothing kept compatibility with an earlier store, wire or file format. The one exception is the dump format: every later rdy reads every released dump format. The gate keeps one fixture dump for each released pair of dump format and store format, and every later rdy must load it. From dump format 3, it also keeps a dump chain of each pair, and every later rdy must load it whole and stopped. A pinned test that asserts behavior rdy changed on purpose is updated in the same commit, with a note that says why. A store of a scalar format is refused, never migrated. This keeps the gate honest: a test is never kept green by a shim.

What the gate is not

The gate checks correctness, hardening and regression. It does not grade how useful rdy is to an agent; those scenarios run separately, with blind agents graded by an answer key. The design targets are decisions recorded beside the measurements. The gate enforces only the spec ceilings of a closed set of operations and reports every other target. It runs locally, on a developer's machine and on a reference Linux machine. A perf run compares only on a machine class that the baseline holds, and it never shares a machine with other heavy work.

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