Skip to content

Phase 6 row 6: docs completion — crate map, deployment guide, operator migration runbook #1336

Done

Description

@chappie-daemon

Phase 6 row 6 of #868 — the last row before the soak. Three documents, no code.

The rewrite's operator-facing knowledge is scattered: docs/rewrite/ carries the decisions, benchmarks, fuzz runbook and the review, but not the three things a person needs to run or port this thing — what each TypeScript module became, how to deploy the Rust relay, and how to move a Postgres deployment onto LMDB without losing data.

The deliverable

  • docs/rewrite/crate-map.md — every TypeScript module of the capture (in the primary checkout's src/, or the file list pinned in the spec) mapped to the Rust crate and module that replaced it, or to a recorded reason it did not move. One row per module, path → crate::module, with the line that proves it.
  • docs/rewrite/deploying.md — running the daemon: the store, settings and their precedence, the metrics scrape and its token, the admin surface and its gate, MCP and its credential, and the exact commands (all run once against this tree).
  • docs/rewrite/migrating.md — the operator's PG→LMDB runbook: preflight, the refuse_swappable conditions, resume semantics, what verify actually proves (it compares the store to its own manifest — see migration: verify proves the store matches its own manifest, not the source, so a short source read verifies clean #1306 — not the source), and rollback.

Acceptance

  • The checks are scripts that run, not prose (row 5's rule): one command per claim that a person can paste, and the record of its output in the job's build record. A claim that cannot be checked is labelled [unverified] in the document with the reason.
  • Every mapping row cites the TS path and the Rust path, and every cited path exists at the document's named tree sha.
  • Every command in deploying.md and migrating.md is run at least once in this job, in the sandbox the document describes, and the document says where it cannot be run here and why (no Docker → no Postgres half; no egress).
  • No duplicate issues: a defect found while documenting is checked against the open list and linked rather than twinned (35 were filed by row 5).
  • An explicit ## Not covered section per document, naming what it does not describe and why.
  • The documents name the tree sha they were checked against.

Out of scope

  • Any code change. A defect found while documenting is filed or linked, never fixed here.
  • The six-lens review (row 5 closed it) and the soak (row 4, blocked on tauceti).
  • Translating the capture's prose wholesale: the map names replacements, it does not restate the TS documentation.

Activity

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

    @chappie-daemon
    CollaboratorAuthor

    Job 046-docs-completion opened: recon running, worktree cut from 9c25d743, estimate $1.40 (document-only, one lens). Operator condition recorded: every command in the deployment guide appears in the job record with its real transcript, including commands that failed and were fixed.

  3. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Build stage done, PR opened: #1338 (4 commits, three documents + one changeset, no code).

    The oracle, bash .factory/jobs/046-docs-completion/check-docs.sh:

    046-docs: 11 checks, 11 passed, 0 failed
    046-docs: OK
    

    Every criterion was inverted once (a dropped row, a renamed heading, a typo'd target, an out-of-bounds citation, a stale phrase, a stray file, a needle removed from build.md) and each inversion turned only its own check red.

    crate-map.md has 357 rows, 305 named by a lib.rs block and 52 by a recorded reason or call site (28 not moved, 12 of them naming #1036 which names three of the files by name). Every one of the 58 commands the two operator documents print was run in this worktree and its line recorded in the job's build.md; verify is demonstrated against a manifest the store does not match ([events] manifest 0 rows, target 3 rows), which is #1306's sentence measured.

    Filed while documenting: #1337 (the five stale CONFIGURATION.md rows). #1334 (health card) and #1316 (search-index.lock's umask) are linked, not twinned.

  4. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Build complete at e7635b81 (PR #1338): docs/rewrite/crate-map.md (357 rows, 386 citations), deploying.md (479 lines, 32 citations), migrating.md (263 lines, 15 citations), one changeset. The oracle check-docs.sh prints 11 checks, 11 passed, 0 failed / OK; citation-meaning.py exits 0 on all three documents.

    58 commands were run and their transcripts recorded, including the two that failed first (a missing scratch config dir; nostream info --config-dir rejected with the two-value NOSTREAM_CONFIG_DIR form working) and two that were replaced rather than fixed (a WS-upgrade curl that held the connection 242 s; ls -la cross-checked with stat -c '%a %n' so the sandbox owner is not printed). What could not run — the Postgres arm, a second uid's owner branches, a real Tor hidden service — carries an [unverified] because … marker.

    One issue filed: #1337 (CONFIGURATION.md's Redis, NIP-98 and NIP-66 rows describe surfaces the rewrite deleted), deduped against 180+ open issues; /admin/health-never-ok is linked to #1334 rather than twinned.

  5. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Rework after the architecture lens's CHANGES (round 1), pushed to #1338: crate-map.md is now two labelled groups — 296 capture rows and 61 added-after-capture rows — with the two #924-deleted capture modules named in prose, the stub rule applied uniformly (77 rows not moved, up from 28), and the lens's medium and low findings answered. Oracle unchanged: 11 checks, 11 passed, 0 failed.

  6. chappie-daemon commented on Nov 30, 2026

    @chappie-daemon
    CollaboratorAuthor

    Closed by 781d8d3 (#1338).

    Three documents, each checked by a script rather than prose: crate-map.md (357 rows — 296 capture + 61 added-after-capture — every row's target existing), deploying.md (measured commands, 44 citations), migrating.md (19 citations). The oracle check-docs.sh runs 11 checks and was proved by four inversions; every command in the two guides carries its real transcript in the job record, including the ones that failed first.

    The review chain changed real content: the map's left column was the working tree rather than the capture commit; 49 rows named a crate lib.rs or an all-stub module instead of the module that holds the port; eight capture files were labelled as post-capture. And Greptile found what no lens had: the deployment guide claimed Postgres migrations run in process, which they do not (stores.rs:57 → from_lookup → with_pools, and migrate_pool has no daemon caller), and the rollback section did not say that switching back is lossless only until the LMDB store accepts its first write.

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

    documentationfactoryrewrite

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions