From 6970010c0596ead6406e7fd9b937f997963fd1ab Mon Sep 17 00:00:00 2001 From: Avanti Date: Thu, 3 Dec 2026 11:34:11 +0530 Subject: [PATCH 1/2] refactor(relay): remove unused broadcast stub module (#1313) --- .changeset/remove-relay-broadcast-stub.md | 4 ++++ crates/nostream-relay/src/broadcast.rs | 29 ----------------------- crates/nostream-relay/src/lib.rs | 15 ++++-------- docs/rewrite/crate-map.md | 8 +++---- 4 files changed, 13 insertions(+), 43 deletions(-) create mode 100644 .changeset/remove-relay-broadcast-stub.md delete mode 100644 crates/nostream-relay/src/broadcast.rs diff --git a/.changeset/remove-relay-broadcast-stub.md b/.changeset/remove-relay-broadcast-stub.md new file mode 100644 index 000000000..961547fad --- /dev/null +++ b/.changeset/remove-relay-broadcast-stub.md @@ -0,0 +1,4 @@ +--- +--- + +refactor(relay): remove unused broadcast stub module (#1313) diff --git a/crates/nostream-relay/src/broadcast.rs b/crates/nostream-relay/src/broadcast.rs deleted file mode 100644 index 11b1cbd97..000000000 --- a/crates/nostream-relay/src/broadcast.rs +++ /dev/null @@ -1,29 +0,0 @@ -//! Cross-worker broadcast fan-out. Mirrors `src/relay-broadcast/redis-relay-broadcast-fanout.ts` -//! and the deduplicator/message/state utils beside it. - -use crate::error::RelayError; - -/// One relay-broadcast envelope (`src/utils/relay-broadcast-message.ts`). -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct BroadcastMessage { - pub kind: String, - pub payload: String, -} - -/// Publishes an envelope to the other workers through Redis. -/// -/// Phase 1 stub — job 005; will publish through the Redis fan-out channel; see `src/relay-broadcast/redis-relay-broadcast-fanout.ts`. -pub async fn publish(_message: &BroadcastMessage) -> Result<(), RelayError> { - Err(RelayError::NotImplemented { - module: "relay::broadcast::publish", - }) -} - -/// Drops an envelope already seen by this worker. -/// -/// Phase 1 stub — job 005; will deduplicate by message id; see `src/utils/relay-broadcast-deduplicator.ts`. -pub fn deduplicate(_message: &BroadcastMessage) -> Result { - Err(RelayError::NotImplemented { - module: "relay::broadcast::deduplicate", - }) -} diff --git a/crates/nostream-relay/src/lib.rs b/crates/nostream-relay/src/lib.rs index 4c8a92132..531fa8d92 100644 --- a/crates/nostream-relay/src/lib.rs +++ b/crates/nostream-relay/src/lib.rs @@ -8,11 +8,9 @@ //! - `src/handlers/{auth,count,event,subscribe,unsubscribe}-message-handler.ts` //! - `src/handlers/event-strategies/*-event-strategy.ts` (15 strategies) //! - `src/adapters/web-socket-adapter.ts`, `src/adapters/web-socket-server-adapter.ts` -//! - `src/relay-broadcast/redis-relay-broadcast-fanout.ts` //! - `src/controllers/admission/get-admission-check-controller.ts`, //! `src/routes/admissions/index.ts` -//! - `src/utils/{sliding-window-rate-limiter,ewma-rate-limiter,hidden-content-cache, -//! relay-broadcast-deduplicator,relay-broadcast-message,relay-broadcast-state}.ts` +//! - `src/utils/{sliding-window-rate-limiter,ewma-rate-limiter,hidden-content-cache}.ts` //! - `src/@types/{message-handlers,subscription,clients}.ts` //! - `src/factories/{event-strategy-factory,message-handler-factory, //! websocket-adapter-factory,rate-limiter-factory}.ts` @@ -31,12 +29,10 @@ //! and `nip42::{authenticate, generate_challenge}` are `nostream-core`'s. //! //! **Still stubbed:** `NegentropySession`/`open_negentropy_session` (a NIP-77 job cut against -//! `041fe34e`, where the `neg-*` handlers first exist), and the cross-worker broadcast -//! `publish`/`deduplicate` (unassigned: -//! `src/relay-broadcast/redis-relay-broadcast-fanout.ts` is named by no bullet of issue #865, -//! which is why `broadcast.rs` still carries phase-1 stub labels naming job 005, and the job -//! may be re-cut). `broadcast.rs` therefore carries no behaviour; the in-process fan-out this -//! crate needs is the relay's own broadcast channel. +//! `041fe34e`, where the `neg-*` handlers first exist). Cross-worker Redis broadcast fan-out +//! (`src/relay-broadcast/redis-relay-broadcast-fanout.ts` and +//! `src/utils/relay-broadcast-{deduplicator,message,state}.ts`) was removed (#1313): the +//! in-process fan-out this crate needs is the relay's own broadcast channel ([`Relay::hub`]). //! //! Phase 2+ areas this crate does not own: the HTTP surface (`nostream-admin`) and the probe //! family and NIP-66 monitor (`nostream-services`). The NIP-11 document's builder is this @@ -49,7 +45,6 @@ //! predicate it calls — `nostream_core::time::check_created_at` — is core's, along with the //! rest of the reference-time arithmetic; do not re-implement it here. -pub mod broadcast; pub mod connection; pub mod connection_cap; pub mod dispatch; diff --git a/docs/rewrite/crate-map.md b/docs/rewrite/crate-map.md index 284275c40..1b9770775 100644 --- a/docs/rewrite/crate-map.md +++ b/docs/rewrite/crate-map.md @@ -274,7 +274,7 @@ The disposition's first word is the class, from the list the spec fixes: | `src/payments-processors/nwc-payments-processor.ts` | `crates/nostream-services/src/lib.rs` | `crates/nostream-services/src/lib.rs:12` | moved | | `src/payments-processors/opennode-payments-processor.ts` | `crates/nostream-services/src/payments/processors/opennode.rs` | `crates/nostream-services/src/lib.rs:12` | moved | | `src/payments-processors/zebedee-payments-processor.ts` | `crates/nostream-services/src/payments/processors/zebedee.rs` | `crates/nostream-services/src/lib.rs:12` | moved | -| `src/relay-broadcast/redis-relay-broadcast-fanout.ts` | — | `crates/nostream-relay/src/broadcast.rs:15-27` | not moved (#865) — dropped: `broadcast.rs` is a Phase 1 stub and carries no behaviour | +| `src/relay-broadcast/redis-relay-broadcast-fanout.ts` | — | `crates/nostream-relay/src/lib.rs:32-35` | not moved (#865) — dropped: cross-worker Redis broadcast stub removed (#1313); in-process fan-out uses `Relay::hub` | | `src/repositories/dvm-job-repository.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:8` | moved | | `src/repositories/event-repository.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:8` | moved | | `src/repositories/invite-code-repository.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:8` | moved | @@ -354,9 +354,9 @@ The disposition's first word is the class, from the list the spec fixes: | `src/utils/operator-notification-enqueue.ts` | `crates/nostream-services/src/services/operator_notification_service.rs` | `crates/nostream-services/src/services/operator_notification_service.rs:162` | moved | | `src/utils/prometheus-client.ts` | — | `crates/nostream-admin/src/utils/mod.rs:1-4` | not moved (#867) — dropped: the console's Prometheus query client has no counterpart | | `src/utils/proof-of-work.ts` | `crates/nostream-core/src/pow.rs` | `crates/nostream-core/src/lib.rs:21` | moved | -| `src/utils/relay-broadcast-deduplicator.ts` | — | `crates/nostream-relay/src/broadcast.rs:24-27` | not moved (#865) — dropped: `broadcast.rs` is a Phase 1 stub and carries no behaviour | -| `src/utils/relay-broadcast-message.ts` | — | `crates/nostream-relay/src/broadcast.rs:15-27` | not moved (#865) — dropped: `broadcast.rs` is a Phase 1 stub and carries no behaviour | -| `src/utils/relay-broadcast-state.ts` | — | `crates/nostream-relay/src/broadcast.rs:15-27` | not moved (#865) — dropped: `broadcast.rs` is a Phase 1 stub and carries no behaviour | +| `src/utils/relay-broadcast-deduplicator.ts` | — | `crates/nostream-relay/src/lib.rs:32-35` | not moved (#865) — dropped: cross-worker Redis broadcast stub removed (#1313); in-process fan-out uses `Relay::hub` | +| `src/utils/relay-broadcast-message.ts` | — | `crates/nostream-relay/src/lib.rs:32-35` | not moved (#865) — dropped: cross-worker Redis broadcast stub removed (#1313); in-process fan-out uses `Relay::hub` | +| `src/utils/relay-broadcast-state.ts` | — | `crates/nostream-relay/src/lib.rs:32-35` | not moved (#865) — dropped: cross-worker Redis broadcast stub removed (#1313); in-process fan-out uses `Relay::hub` | | `src/utils/relay-probe-snapshot.ts` | `crates/nostream-services/src/monitor.rs` | `crates/nostream-services/src/monitor.rs:13` | type-only | | `src/utils/relay-probe-targets.ts` | — | `crates/nostream-services/src/monitor.rs:2` | not moved (#865) — dropped: the module names the family and implements none of it | | `src/utils/relay-probe/dns-cache.ts` | — | `crates/nostream-services/src/monitor.rs:20` | not moved (#865) — dropped: the probe is a Phase 2 stub | From f23a425e62eb236c8e0c75d606b7414ef329dfdc Mon Sep 17 00:00:00 2001 From: Avanti Date: Sat, 5 Dec 2026 00:14:51 +0530 Subject: [PATCH 2/2] docs: update shifted relay lib.rs citations (#1313) --- docs/rewrite/crate-map.md | 28 ++++++++++++++-------------- docs/rewrite/deploying.md | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/rewrite/crate-map.md b/docs/rewrite/crate-map.md index 1b9770775..5e85ea051 100644 --- a/docs/rewrite/crate-map.md +++ b/docs/rewrite/crate-map.md @@ -98,7 +98,7 @@ The disposition's first word is the class, from the list the spec fixes: | `src/@types/event.ts` | `crates/nostream-core/src/event.rs` | `crates/nostream-core/src/lib.rs:10` | type-only | | `src/@types/invite-code.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:14-15` | type-only — declared in `repositories.rs`, implemented in `records.rs` | | `src/@types/invoice.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:14-15` | type-only — declared in `repositories.rs`, implemented in `records.rs` | -| `src/@types/message-handlers.ts` | `crates/nostream-relay/src/lib.rs` | `crates/nostream-relay/src/lib.rs:16` | type-only | +| `src/@types/message-handlers.ts` | `crates/nostream-relay/src/lib.rs` | `crates/nostream-relay/src/lib.rs:14` | type-only | | `src/@types/messages.ts` | `crates/nostream-core/src/messages.rs` | `crates/nostream-core/src/lib.rs:10` | type-only | | `src/@types/nip05.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:14-15` | type-only — declared in `repositories.rs`, implemented in `records.rs` | | `src/@types/notification-outbox.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:14-15` | type-only — declared in `repositories.rs`, implemented in `records.rs` | @@ -108,7 +108,7 @@ The disposition's first word is the class, from the list the spec fixes: | `src/@types/repositories.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:14` | type-only | | `src/@types/services.ts` | `crates/nostream-services/src/services/mod.rs` | `crates/nostream-services/src/lib.rs:16` | type-only | | `src/@types/settings.ts` | `crates/nostream-config/src/settings.rs` | `crates/nostream-config/src/lib.rs:8` | type-only | -| `src/@types/subscription.ts` | `crates/nostream-relay/src/connection.rs` | `crates/nostream-relay/src/lib.rs:16`, `crates/nostream-relay/src/connection.rs:29` | type-only — `Subscription` lives in the relay's connection module | +| `src/@types/subscription.ts` | `crates/nostream-relay/src/connection.rs` | `crates/nostream-relay/src/lib.rs:14`, `crates/nostream-relay/src/connection.rs:29` | type-only — `Subscription` lives in the relay's connection module | | `src/@types/tor.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:13` | type-only | | `src/@types/user.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:14-15` | type-only — declared in `repositories.rs`, implemented in `records.rs` | | `src/@types/utils.ts` | `crates/nostream-core/src/lib.rs` | `crates/nostream-core/src/lib.rs:11` | type-only | @@ -171,7 +171,7 @@ The disposition's first word is the class, from the list the spec fixes: | `src/controllers/admin/post-notification-test-controller.ts` | `crates/nostream-admin/src/controllers/post_notification_test.rs` | `crates/nostream-admin/src/lib.rs:12` | moved | | `src/controllers/admin/post-settings-restore-controller.ts` | `crates/nostream-admin/src/controllers/post_settings_restore.rs` | `crates/nostream-admin/src/lib.rs:12` | moved | | `src/controllers/admin/post-settings-validate-controller.ts` | `crates/nostream-admin/src/controllers/post_settings_validate.rs` | `crates/nostream-admin/src/lib.rs:12` | moved | -| `src/controllers/admission/get-admission-check-controller.ts` | `crates/nostream-relay/src/relay.rs` | `crates/nostream-relay/src/lib.rs:12` | moved | +| `src/controllers/admission/get-admission-check-controller.ts` | `crates/nostream-relay/src/relay.rs` | `crates/nostream-relay/src/lib.rs:11` | moved | | `src/controllers/callbacks/lnbits-callback-controller.ts` | — | `crates/nostream-services/src/controllers/callback_controller.rs:5` | not moved (#867) — dropped: only the Phase 2 stub exists | | `src/controllers/callbacks/nodeless-callback-controller.ts` | — | `crates/nostream-services/src/controllers/callback_controller.rs:5` | not moved (#867) — dropped: only the Phase 2 stub exists | | `src/controllers/callbacks/opennode-callback-controller.ts` | — | `crates/nostream-services/src/controllers/callback_controller.rs:5` | not moved (#867) — dropped: only the Phase 2 stub exists | @@ -192,7 +192,7 @@ The disposition's first word is the class, from the list the spec fixes: | `src/factories/controllers/get-admin-settings-backups-controller-factory.ts` | `crates/nostream-admin/src/controllers/get_settings_backups.rs` | `crates/nostream-admin/src/controllers/get_settings_backups.rs:2` | moved | | `src/factories/controllers/get-admin-settings-controller-factory.ts` | `crates/nostream-admin/src/controllers/get_settings.rs` | `crates/nostream-admin/src/controllers/get_settings.rs:2` | moved | | `src/factories/controllers/get-admin-settings-schema-controller-factory.ts` | `crates/nostream-admin/src/controllers/get_settings_schema.rs` | `crates/nostream-admin/src/controllers/get_settings_schema.rs:2` | moved | -| `src/factories/controllers/get-admission-check-controller-factory.ts` | `crates/nostream-relay/src/limits.rs` | `crates/nostream-relay/src/lib.rs:12-13` | moved — the limiter and the cap; the factory has no module | +| `src/factories/controllers/get-admission-check-controller-factory.ts` | `crates/nostream-relay/src/limits.rs` | `crates/nostream-relay/src/lib.rs:11-12` | moved — the limiter and the cap; the factory has no module | | `src/factories/controllers/get-invoice-controller-factory.ts` | — | `crates/nostream-services/src/controllers/invoice_controller.rs:5` | not moved (#867) — dropped: it composes a controller that is a stub | | `src/factories/controllers/get-invoice-status-controller-factory.ts` | — | `crates/nostream-services/src/controllers/invoice_controller.rs:5` | not moved (#867) — dropped: it composes a controller that is a stub | | `src/factories/controllers/lnbits-callback-controller-factory.ts` | — | `crates/nostream-services/src/controllers/callback_controller.rs:5` | not moved (#867) — dropped: it composes a controller that is a stub | @@ -209,11 +209,11 @@ The disposition's first word is the class, from the list the spec fixes: | `src/factories/controllers/zebedee-callback-controller-factory.ts` | — | `crates/nostream-services/src/controllers/callback_controller.rs:5` | not moved (#867) — dropped: it composes a controller that is a stub | | `src/factories/dvm-orchestrator-worker-factory.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:14` | moved | | `src/factories/event-repository-factory.ts` | `crates/nostream-storage/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-storage/src/lib.rs:16`, `crates/nostreamd/src/lib.rs:14` | split — the repository; the daemon composes it | -| `src/factories/event-strategy-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:17`, `crates/nostreamd/src/lib.rs:14` | split — the registry; the daemon composes it | +| `src/factories/event-strategy-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:15`, `crates/nostreamd/src/lib.rs:14` | split — the registry; the daemon composes it | | `src/factories/logger-factory.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:14` | moved | | `src/factories/maintenance-service-factory.ts` | `crates/nostream-services/src/services/maintenance_service.rs` | `crates/nostream-services/src/services/maintenance_service.rs:1` | moved — the constructor; the factory has no module | | `src/factories/maintenance-worker-factory.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:14` | moved | -| `src/factories/message-handler-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:17`, `crates/nostreamd/src/lib.rs:14` | split — the registry; the daemon composes it | +| `src/factories/message-handler-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:15`, `crates/nostreamd/src/lib.rs:14` | split — the registry; the daemon composes it | | `src/factories/notification-outbox-service-factory.ts` | `crates/nostream-services/src/services/notification_outbox_service.rs` | `crates/nostream-services/src/services/notification_outbox_service.rs:1` | moved — the constructor; the factory has no module | | `src/factories/payments-processor-factory.ts` | `crates/nostream-services/src/payments/processors/mod.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-services/src/lib.rs:13`, `crates/nostreamd/src/lib.rs:14` | split — the selection; the daemon composes it | | `src/factories/payments-processors/lnbits-payments-processor-factory.ts` | `crates/nostream-services/src/payments/processors/lnbits.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-services/src/lib.rs:13`, `crates/nostreamd/src/lib.rs:14` | split — the processor; the daemon composes it | @@ -223,11 +223,11 @@ The disposition's first word is the class, from the list the spec fixes: | `src/factories/payments-processors/opennode-payments-processor-factory.ts` | `crates/nostream-services/src/payments/processors/opennode.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-services/src/lib.rs:13`, `crates/nostreamd/src/lib.rs:14` | split — the processor; the daemon composes it | | `src/factories/payments-processors/zebedee-payments-processor-factory.ts` | `crates/nostream-services/src/payments/processors/zebedee.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-services/src/lib.rs:13`, `crates/nostreamd/src/lib.rs:14` | split — the processor; the daemon composes it | | `src/factories/payments-service-factory.ts` | `crates/nostream-services/src/services/payments_service.rs` | `crates/nostream-services/src/services/payments_service.rs:1` | moved — the constructor; the factory has no module | -| `src/factories/rate-limiter-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:17`, `crates/nostreamd/src/lib.rs:14` | split — the limiter; the daemon composes it | +| `src/factories/rate-limiter-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:16`, `crates/nostreamd/src/lib.rs:14` | split — the limiter; the daemon composes it | | `src/factories/relay-monitor-worker-factory.ts` | — | `crates/nostreamd/src/lib.rs:37-38` | not moved (#865) — dropped: it composes the probe worker #865 does not register | | `src/factories/settings-factory.ts` | `crates/nostream-config/src/settings.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-config/src/lib.rs:12`, `crates/nostreamd/src/lib.rs:14` | split — the loaded value; the daemon owns it | | `src/factories/web-app-factory.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:14` | moved | -| `src/factories/websocket-adapter-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:17`, `crates/nostreamd/src/lib.rs:14` | split — the transport; the daemon binds it | +| `src/factories/websocket-adapter-factory.ts` | `crates/nostream-relay/src/lib.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:16`, `crates/nostreamd/src/lib.rs:14` | split — the transport; the daemon binds it | | `src/factories/worker-factory.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:14` | moved | | `src/factories/wot-graph-service-factory.ts` | `crates/nostream-services/src/services/wot_graph_service.rs` | `crates/nostream-services/src/services/wot_graph_service.rs:1` | moved — the constructor; the factory has no module | | `src/handlers/auth-message-handler.ts` | `crates/nostream-relay/src/handlers/auth.rs` | `crates/nostream-relay/src/lib.rs:8` | moved | @@ -285,7 +285,7 @@ The disposition's first word is the class, from the list the spec fixes: | `src/repositories/report-repository.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:8` | moved | | `src/repositories/user-repository.ts` | `crates/nostream-storage/src/repositories.rs` | `crates/nostream-storage/src/lib.rs:8` | moved | | `src/routes/admin/index.ts` | `crates/nostream-admin/src/lib.rs` | `crates/nostream-admin/src/lib.rs:12` | moved | -| `src/routes/admissions/index.ts` | `crates/nostream-relay/src/lib.rs` | `crates/nostream-relay/src/lib.rs:13` | moved | +| `src/routes/admissions/index.ts` | `crates/nostream-relay/src/lib.rs` | `crates/nostream-relay/src/lib.rs:12` | moved | | `src/routes/callbacks/index.ts` | — | `crates/nostream-services/src/controllers/callback_controller.rs:5` | not moved (#867) — dropped: only the Phase 2 stub exists | | `src/routes/index.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:11` | moved | | `src/routes/invoices/index.ts` | — | `crates/nostream-services/src/controllers/invoice_controller.rs:5` | not moved (#867) — dropped: only the Phase 2 stub exists | @@ -310,13 +310,13 @@ The disposition's first word is the class, from the list the spec fixes: | `src/services/operator-notification-service.ts` | `crates/nostream-services/src/services/operator_notification_service.rs` | `crates/nostream-services/src/lib.rs:10` | moved | | `src/services/payments-service.ts` | `crates/nostream-services/src/services/payments_service.rs` | `crates/nostream-services/src/lib.rs:10` | moved | | `src/services/wot-graph-service.ts` | `crates/nostream-services/src/services/wot_graph_service.rs` | `crates/nostream-services/src/lib.rs:10` | moved | -| `src/telemetry/event-metrics.ts` | `crates/nostream-relay/src/metrics.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:19`, `crates/nostreamd/src/lib.rs:12` | split — the counters; the daemon exports them | +| `src/telemetry/event-metrics.ts` | `crates/nostream-relay/src/metrics.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:17`, `crates/nostreamd/src/lib.rs:12` | split — the counters; the daemon exports them | | `src/telemetry/metrics.ts` | `crates/nostreamd/src/lib.rs` | `crates/nostreamd/src/lib.rs:12` | moved | | `src/tor/client.ts` | `crates/nostream-services/src/tor.rs` (`crates/nostreamd/src/lib.rs`) | `crates/nostream-services/src/lib.rs:14`, `crates/nostreamd/src/lib.rs:13` | split — the control-port client; the daemon spawns it | | `src/utils/adaptive-pow.ts` | `crates/nostream-core/src/adaptive_pow.rs` | `crates/nostream-core/src/lib.rs:12` | moved | | `src/utils/admin-grafana.ts` | `crates/nostream-admin/src/utils/grafana.rs` | `crates/nostream-admin/src/lib.rs:14` | moved | | `src/utils/admin-health.ts` | `crates/nostream-admin/src/utils/health.rs` | `crates/nostream-admin/src/lib.rs:14` | moved | -| `src/utils/admin-metrics.ts` | `crates/nostream-relay/src/metrics.rs` (`crates/nostream-admin/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:19`, `crates/nostream-admin/src/lib.rs:14` | split — the counters; admin renders the consult | +| `src/utils/admin-metrics.ts` | `crates/nostream-relay/src/metrics.rs` (`crates/nostream-admin/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:17`, `crates/nostream-admin/src/lib.rs:14` | split — the counters; admin renders the consult | | `src/utils/admin-notifications-settings.ts` | `crates/nostream-config/src/notifications.rs` (`crates/nostream-admin/src/lib.rs`) | `crates/nostream-config/src/lib.rs:11`, `crates/nostream-admin/src/lib.rs:14` | split — the settings family | | `src/utils/admin-password.ts` | `crates/nostream-admin/src/utils/password.rs` | `crates/nostream-admin/src/lib.rs:14` | moved | | `src/utils/admin-rate-limit.ts` | `crates/nostream-admin/src/utils/rate_limit.rs` | `crates/nostream-admin/src/lib.rs:14` | moved | @@ -324,10 +324,10 @@ The disposition's first word is the class, from the list the spec fixes: | `src/utils/compression.ts` | `crates/nostream-core/src/lib.rs` | `crates/nostream-core/src/lib.rs:12` | moved | | `src/utils/event-store.ts` | `crates/nostream-storage/src/event_store.rs` | `crates/nostream-storage/src/lib.rs:11` | moved | | `src/utils/event.ts` | `crates/nostream-core/src/event.rs` | `crates/nostream-core/src/lib.rs:12` | moved | -| `src/utils/ewma-rate-limiter.ts` | `crates/nostream-relay/src/limits.rs` | `crates/nostream-relay/src/lib.rs:14` | moved | +| `src/utils/ewma-rate-limiter.ts` | `crates/nostream-relay/src/limits.rs` | `crates/nostream-relay/src/lib.rs:13` | moved | | `src/utils/filter.ts` | `crates/nostream-core/src/filter.rs` | `crates/nostream-core/src/lib.rs:13` | moved | | `src/utils/geohash.ts` | `crates/nostream-core/src/filter.rs` | `crates/nostream-core/src/filter.rs:16` | moved — the alphabet and the #g prefix rule | -| `src/utils/hidden-content-cache.ts` | `crates/nostream-relay/src/hidden_content.rs` (`crates/nostream-storage/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:14`, `crates/nostream-storage/src/lib.rs:11` | split — the mirror; storage owns the query | +| `src/utils/hidden-content-cache.ts` | `crates/nostream-relay/src/hidden_content.rs` (`crates/nostream-storage/src/lib.rs`) | `crates/nostream-relay/src/lib.rs:13`, `crates/nostream-storage/src/lib.rs:11` | split — the mirror; storage owns the query | | `src/utils/html.ts` | `crates/nostream-admin/src/controllers/get_dashboard.rs` | `crates/nostream-admin/src/controllers/get_dashboard.rs:19-24` | moved — the only escape helper the tree needs, in the dashboard it renders | | `src/utils/http.ts` | `crates/nostream-core/src/lib.rs` (`crates/nostream-admin/src/lib.rs`) | `crates/nostream-core/src/lib.rs:14`, `crates/nostream-admin/src/lib.rs:15` | split — the request types; admin owns the response half | | `src/utils/invoice.ts` | `crates/nostream-services/src/invoice.rs` | `crates/nostream-services/src/lib.rs:17` | moved | @@ -377,7 +377,7 @@ The disposition's first word is the class, from the list the spec fixes: | `src/utils/settings-redaction.ts` | `crates/nostream-config/src/settings.rs` | `crates/nostream-config/src/lib.rs:10` | moved | | `src/utils/settings.ts` | `crates/nostream-config/src/settings.rs` | `crates/nostream-config/src/lib.rs:9` | moved | | `src/utils/shutdown-state.ts` | `crates/nostream-core/src/lifecycle.rs` | `crates/nostream-core/src/lib.rs:22` | moved | -| `src/utils/sliding-window-rate-limiter.ts` | `crates/nostream-relay/src/limits.rs` | `crates/nostream-relay/src/lib.rs:14` | moved | +| `src/utils/sliding-window-rate-limiter.ts` | `crates/nostream-relay/src/limits.rs` | `crates/nostream-relay/src/lib.rs:13` | moved | | `src/utils/stream.ts` | — | `crates/nostream-core/src/lib.rs:22-24` | not moved (#1336) — dropped: the block claims it, but core holds no stream helper (`grep -rn 'stream_map' crates` prints nothing) | | `src/utils/template-cache.ts` | — | `crates/nostream-core/src/lib.rs:23` | not moved (#1336) — dropped: the block claims it, but no module caches a template | | `src/utils/transform.ts` | `crates/nostream-core/src/lib.rs` (`crates/nostream-services/src/lib.rs`) | `crates/nostream-core/src/lib.rs:23`, `crates/nostream-services/src/lib.rs:17` | split — the primitive; services owns the payment surface | diff --git a/docs/rewrite/deploying.md b/docs/rewrite/deploying.md index 4f9277c2e..95178ff35 100644 --- a/docs/rewrite/deploying.md +++ b/docs/rewrite/deploying.md @@ -441,7 +441,7 @@ Not Found ``` **NIP-11 is not served yet.** The document's builder exists -(`crates/nostream-relay/src/lib.rs:41-43`) and nothing mounts it, so the relay-status request +(`crates/nostream-relay/src/lib.rs:37-39`) and nothing mounts it, so the relay-status request gets the `404` above; that decision and what it takes to serve it are ADR 0016's (`docs/rewrite/decisions/0016-relay-status-and-nip11.md`). `nostream-cli info` prints the self-key the document would carry, or says why it cannot: