Checkpoint: relay pool bootstrap

This commit is contained in:
Avi 2026-08-24 22:59:05 -05:00
commit ec237bf6dd

View file

@ -1,4 +1,61 @@
# Checkpoint — DRY relay fan-out (2026-08-24) # Checkpoint — DRY relay pool bootstrap (2026-08-24)
A stopping point you can return to if this session is closed. Everything below was
verified green at the moment this file was written.
## Where things are
- Project: `/home/avi/Projects/Nostr_Keynctr`
- Git repo: `master` @ `6d5063d` ("refactor: share relay pool bootstrap").
Before it: `1c428a9` (DRY fan-out R1), `b21678f` (signer-fix checkpoint),
`64ad94d` (NIP-46 handshake fix), `dd50b24` (Aurora rename).
- Working tree: clean apart from this checkpoint update. `concept3.svg` deleted
and `KeynectrAppIconPossibility02.jpeg` untracked remain as the user had them.
## What was completed
1. **R2 DRY refactor (`6d5063d`).** New `relays::open_pool(keys, urls,
wait: Option<Duration>) -> Result<Client>` is the single pool-construction
path (add each relay with strict error propagation, connect, optional
wait). Adopted by feed's two fetchers (`Keys::generate()` + 10 s wait) and
note publishing (`keys.clone()`, no wait). `profiles.rs` intentionally NOT
adopted — its unique ignore-add-errors policy stays local; it regained an
explicit `connect()` when `send_to_all_relays` dropped its internal one
(avoids double-connect on the note path). `signer.rs` deliberately
untouched: ordering-critical notification setup (`64ad94d`) + fail-to-status
error model. Net −20 lines; behavior, error strings, timing unchanged.
2. Earlier this session: R1 fan-out dedup (`1c428a9`), NIP-46 handshake fix
(`64ad94d`), Aurora rename + dropdown fix (`dd50b24`), frosted-glass look
(`ecb666b`), glass build fix (`bfe14f0`).
## Commits added most recently
- `6d5063d` refactor: share relay pool bootstrap
## Verification commands run (all green)
Rust: cargo test 113 passed; clippy only pre-existing profiles.rs warnings;
fmt clean; release binary rebuilt.
Frontend (untouched): npm test 92; typecheck, lint, format, electron:build,
vite build all clean.
Pre-commit audit per user protocol: git diff --check clean; signer.rs empty
diff; zero test files modified.
## How to use / reproduce
No user-facing change. Future connection-policy work (e.g., NIP-42 auth for
nostr.l484.com, retries) now starts in `relays::open_pool`.
## Notes & next steps
- Remaining DRY items by user request on hold: R3 (modal save-lifecycle hook)
and R4 (shortHex vs shortenNpub).
- Relay health today: nos.lol 502, nostr.wine 403, l484.com needs NIP-42 auth,
nostr.band unreachable; primal/mom/soloco healthy.
---
# Older checkpoint — DRY relay fan-out (2026-08-24)
A stopping point you can return to if this session is closed. Everything below was A stopping point you can return to if this session is closed. Everything below was
verified green at the moment this file was written. verified green at the moment this file was written.