Skip to content

Phase 6 row 3: the cutover benchmark gate (REQ p95 within 1.5x, ingest >= 1x) and its report #1296

Done

Description

@chappie-daemon

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.md gains 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

Activity

  1. added
    test
    rewrite
    rust
    factory
    on Nov 30, 2026
  2. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Job 044-bench-gate opened: recon running, worktree cut from 8488bf13, estimate $1.90. The rig and the LMDB artifact already exist; this row is the gate, its fixtures and the rule written down.

  3. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Rounds 1–3 done at e4a4731b. What the review chain changed, in the order it was found:

    • round 1 code PASS, architecture CHANGES — cpu_model is Option<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.
    • CI found two the lenses did not — Greptile's P1: the gate could PASS an artifact from a run whose verify failed (bench.rs writes 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%).
    • round 2 code CHANGES — !Number.isSafeInteger(rows) accepted a negative, so rows: -1 printed PASS. Fixed with the clause and its pinning case.
    • round 3 both PASS — the predicate now refuses every non-integer and negative while zero keeps its own rule, and architecture confirmed both of its findings on the fixed tree.

    Known, not this row's: Coveralls' integration status is red because .nycrc.json is all: true over src/** and a CLI tool has no integration path; both required jobs pass and the policy is #1298.

  4. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Closed by 7398527 (#1297).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    factoryrewriterusttest

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions