Skip to content

Phase 6 row 5: six-lens review of nostream-relay + nostream-storage, and the four-surface security review #1299

Done

Description

@chappie-daemon

Phase 6 row 5 of #868.

The rewrite's two largest crates have never been read end to end by a lens that was not reviewing a diff. nostream-relay and nostream-storage are 68 source files and about 28.5k lines; every review so far has been scoped to what one job changed, so a seam that only meets in the composition root, or a rule restated in three places, has had no reader. The same is true of four surfaces where the risk is not a change but a standing design: MCP auth, settings, the migration tool, and LMDB file permissions.

The deliverable

A review record at docs/rewrite/reviews/2026-11-30-relay-storage.md on a factory branch, and one issue per defect it proves. Nothing is fixed in this row: a fix makes the diff the thing under review and defeats the purpose.

Acceptance

  • The document carries, per lens (code, architecture, security, performance, ux, ui), the scope it actually read (files and line counts), what it checked, and every finding with path:line evidence and a disposition — filed issue number, or accepted-risk with the reason.
  • Every finding that a maintainer would change is filed as its own issue with the evidence already gathered, labelled rewrite, rust, factory and the milestone of the code it touches; the document links each.
  • The four named surfaces are covered explicitly, each in its own section with its own evidence: MCP authentication and authorisation, the settings loader and its precedence, the PG→LMDB migration tool's resumability and checksum contract, and LMDB file permissions and directory creation.
  • The lenses state what they did not read, and why; a lens that found nothing says what it looked for and the command that would have caught a defect.
  • Claims about behaviour are backed by a command or a test the reader can rerun; a finding that rests only on reading says so.
  • The document names the tree it reviewed (commit sha) so a later row can tell whether a finding still holds.
  • Every finding carries a severity on one line (critical / high / medium / low, and what a person loses if it is never fixed), so triage needs no code reading.
  • Dedupe before filing: each finding is checked against the open issues first; a match links the existing issue instead of opening a twin, and only a genuinely new defect gets a new number.

Out of scope

Activity

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

    @chappie-daemon
    CollaboratorAuthor

    Job 045-review-relay-storage opened: recon mapping the two crates and the four security surfaces, worktree cut from 8488bf13, estimate $2.60 (operator-approved). Deliverable is the review document; every finding carries path:line, the measurement that proves it, and a one-line severity, is deduped against the open issues before filing, and the document names what the lenses did not read.

  3. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Spec finalised (digest 9a612215) after a red team that earned its cost: it built a 258-line document which, opening no source file, passed every acceptance criterion — coverage was a count of wc -l outputs, findings were unbound to their citations, the dedupe check was dead under this shell's grep, and a 6-line file cleared the 18,000-line floor with one invented range. All 20 findings amended: a claimed file now costs a responsibility line, a command naming it and a quoted line; a finding's command must name its own where:; filed issues are checked by created_at plus the record's name in the body; and the approver re-runs three findings and one per surface, rejecting the record on a mismatch.

    Round 1 running: code lens first (the gate), then architecture and security, then performance, ux and ui.

  4. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Round 1: all six lenses PASS at 8488bf13 — code (9), architecture (6), security (6), performance (3), ux (14), ui (7) = 45 finding blocks. 35 issues filed (#1300–#1334) and 5 findings linked to existing ones (#1106, #1207, #1210, #1211, #1283); 2 accepted with their reason.

    The record is docs/rewrite/reviews/2026-11-30-relay-storage.md on PR #1335, 884 lines, every block carrying where:, a one-line severity, evidence and a disposition, with ## Not covered naming what no lens read and what this sandbox cannot run.

    Worth naming from the pile: #1305 (a rejected settings document silently swaps an LMDB deployment onto the default Postgres backend), #1306 (migration verify proves store-vs-its-own-manifest, not source-vs-store), #1302 (the daemon and the CLI open one store through two copies of one match, and the CLI drops the settings gates), #1307/#1308 (measured hot-path allocations: 110 per candidate row in the search verdict; a NIP-42 guard rebuilt per delivered row). None of these is visible to a diff-scoped review, which is the row's justification.

  5. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Closed by 9c25d74 (#1335), merged as a merge commit.

    The record is docs/rewrite/reviews/2026-11-30-relay-storage.md: 45 findings from six lenses at 8488bf13, 35 filed as issues (#1300–#1334), 5 linked to existing ones, 2 accepted with their reason, each block carrying where:, a one-line severity, evidence and a disposition, plus ## Not covered and a per-lens cost and depth line.

    The approver reproduced 20 of the 43 command-backed findings and all four surface measurements; it also caught a one-position rotation in three dispositions that no criterion could see, which was fixed at 970c128c and then audited across all 38 filed dispositions.

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

    factoryrewriterust

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions