docs: NOSTR.md accuracy pass — verified against every line of code#240
Merged
Conversation
Four discrepancies fixed, each verified against source: 1. MySQL→Postgres: Quick Start and Pubkey Allowlist SQL used mysql CLI, UNHEX(), HEX() — but DB is Postgres 17 (docker-compose.yml). Fixed to psql with PGPASSWORD, -h localhost, decode()/encode(). Matches .env.example conventions (PGHOST, PGPASSWORD, PGUSER). 2. kind:9021 (Join request): Was listed as 'deferred (no-op with warning log)' in What Doesn't Work. Actually has a full handler in side_effects.rs:1053 — adds member, emits system message, emits group discovery events, emits kind:44100 notification. Private channels rejected at ingest (ingest.rs:1031). Promoted to What Works. 3. Error message: Doc said 'restricted: membership notifications require #p matching your pubkey' but actual code string (req.rs:126) is 'restricted: p-gated events require #p matching your pubkey'. The broader wording is intentional — P_GATED_KINDS covers 44100, 44101, AND 1059 (gift wraps), not just membership notifications. 4. Subscription constraint scope: Updated to list all three p-gated kinds (44100, 44101, 1059) instead of just 44100/44101. Added 'and DMs' to the rationale since kind:1059 gift wraps are also gated. 5. Architecture section: Moved 9021 from 'deferred' to active admin command list, consistent with change 2. Crossfire reviewed: Codex (GPT-5.4) 10/10 APPROVE, Opus 9/10 APPROVE. No other inaccuracies found in full-document scan by either reviewer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Accuracy pass on NOSTR.md — every claim verified against source code. Four discrepancies fixed.
Changes
mysql/UNHEX/HEX→psql/decode/encodewithPGPASSWORDand-h localhostdocker-compose.ymlrunspostgres:17-alpine;.env.exampleusesPGPASSWORD=sprout_devside_effects.rs:1053has full handler: adds member, emits system message + discovery + kind:44100req.rs:126actual string;P_GATED_KINDScovers 44100, 44101, and 1059req.rs:104—P_GATED_KINDSarray includes gift wrapsDetails
1. MySQL→Postgres SQL syntax (lines 37, 95–97)
Quick Start and Pubkey Allowlist sections used
mysqlCLI withUNHEX()/HEX(). The database is Postgres 17 (docker-compose.yml). Fixed topsqlwith proper connection flags matching.env.exampleconventions:This was originally proposed in #220 (closed without merge). Follow-up PRs #233–#237 covered other docs but missed NOSTR.md.
2. kind:9021 (Join request) — fully implemented, not deferred
Was listed as "deferred (no-op with warning log)" in "What Doesn't Work". The code tells a different story:
side_effects.rs:54dispatches tohandle_join_request()(line 1053)ingest.rs:1031rejects private channels at ingest3. Error message and p-gated scope
Doc said
"restricted: membership notifications require #p matching your pubkey"but:req.rs:126):"restricted: p-gated events require #p matching your pubkey"P_GATED_KINDS(req.rs:104) =[44100, 44101, 1059]— includes gift wraps, not just membership notifications4. Architecture section consistency
Updated admin command list from "deferred 9009, 9021" to "deferred 9009" — consistent with change 2.
Review
Crossfire reviewed by Codex (GPT-5.4) and Claude Opus against source code:
Both confirmed all changes match the implementation. No other inaccuracies found in full-document scan.