Repository navigation
Description
Phase 6 row 3 of #868.
The rig and the report exist: crates/nostream-storage/examples/bench.rs measures one deterministic workload through Arc<dyn EventRepository>, and docs/rewrite/benchmarks.md publishes one recorded LMDB run beside its artifact (docs/rewrite/benchmarks/lmdb-50k-seed7.json). What does not exist is the thing the cutover reads: a gate.
docs/rewrite/benchmarks.md says so itself in D8 — "This document carries evidence, not a pass/fail. The gate is #868: REQ p95 within 1.5× of the Postgres implementation and ingest ≥ 1×, at the 1M and 10M corpora" — and it names the question that rule leaves open: #868's sentence does not say which statistic of the repeat band the ratio applies to, nor what happens when one repeat sits inside the margin and another outside it.
Acceptance
- A gate script (a
scripts/entry, runnable here) that takes two artifacts — an LMDB artifact and a Postgres artifact, each schema 2 — and decides [Rewrite P6] Hardening: fuzz, benchmark gate, 72h soak, security review #868's rule: every REQ read shape's p95 within 1.5× of the Postgres one, and the ingest shape (create) at least 1× the Postgres rate. - The rule is defined in the script, not re-derived by each reader: which band statistic the ratio applies to is stated, and the straddle case (median inside the margin, one repeat outside) has a stated, tested answer.
- Refusals are explicit and exit non-zero: an unknown artifact schema, a workload that differs between the two artifacts (the artifacts echo it), a shape present in one and absent in the other, a corpus size the rule does not cover.
- The script is tested against synthetic artifacts that exercise pass, fail-on-p95, fail-on-ingest, straddle, schema mismatch and workload mismatch — no Docker, no store, no host dependency.
docs/rewrite/benchmarks.mdgains the rule as the script defines it, what the gate does not cover yet (the Postgres column needs benchmarks: measure the TypeScript/Postgres baseline on a host with Docker #1132's host; the 1M and 10M corpora need a host with the disk and a quiet box), and the honest line that until a Postgres artifact exists the gate can only refuse, not pass.- The gate runs against the committed 50 000-event artifact to prove it reads a real artifact as well as a fixture, and what it reports there is recorded.
Out of scope
- Producing the Postgres/TypeScript artifact: benchmarks: measure the TypeScript/Postgres baseline on a host with Docker #1132, on a host with Docker.
- 1M/10M runs: they need a quiet host with tens of GB free ([Rewrite P3] Storage seam + LMDB backend (strfry-style) + PG→LMDB migration #864 names chappie hardware; tauceti stays gated on [Rewrite P1] Factory logistics: host split, worktree protocol, cost telemetry #871).
- Changing the rig's workload: a changed constant is a new workload, not a new row.
Activity
chappie-daemon commentedon Nov 30, 2026
Job
044-bench-gateopened: recon running, worktree cut from8488bf13, estimate $1.90. The rig and the LMDB artifact already exist; this row is the gate, its fixtures and the rule written down.chappie-daemon commentedon Nov 30, 2026
Rounds 1–3 done at
e4a4731b. What the review chain changed, in the order it was found:cpu_modelisOption<String>in the rig and the gate demanded a string, so a valid macOS pair was refused; and the rule was stated in two homes with neither authoritative. Both fixed.verifyfailed (bench.rswrites before verifying), now refused on read-back count and zero rows; and Coveralls' unit drop, fixed with 37 in-process cases (+0.3% to 75.356%).!Number.isSafeInteger(rows)accepted a negative, sorows: -1printed PASS. Fixed with the clause and its pinning case.Known, not this row's: Coveralls' integration status is red because
.nycrc.jsonisall: trueoversrc/**and a CLI tool has no integration path; both required jobs pass and the policy is #1298.chappie-daemon commentedon Nov 30, 2026
Closed by 7398527 (#1297).