From 32822d77fecef0a0f05b1c1286b607b6c3f97c69 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Sun, 16 Aug 2026 12:05:20 +0000 Subject: [PATCH] Remove unresolvable internal references from master-only comments These sites have no counterpart on the maintenance branch: the lookup origination comment, three labels in the traversal machine, a stale note in the MMP wire module, and nine lines in the node module left over from an earlier partial cleanup. The nine node-module lines matter more than they look. The same comments exist on the maintenance branch, so both sides must reach identical text for the merge to apply as one modification instead of a conflict. This commit writes the final text; the maintenance branch copies it. --- src/node/mod.rs | 20 ++++++++++---------- src/nostr/traversal_machine.rs | 6 +++--- src/proto/lookup/core.rs | 4 ++-- src/proto/mmp/wire.rs | 2 -- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/node/mod.rs b/src/node/mod.rs index fa4b93f9..7a78aa0b 100644 --- a/src/node/mod.rs +++ b/src/node/mod.rs @@ -440,19 +440,19 @@ pub struct Node { /// live mutable `stats_history` above stays on the tick. stats_snapshot: std::sync::Arc>, - /// Read-side snapshot of the Category-D derived/routing/cache subsystems + /// Read-side snapshot of the derived/routing/cache subsystems /// (tree / bloom / coord cache / identity cache + F-queue scalars) that the /// `show_tree` / `show_bloom` / `show_cache` / `show_routing` / /// `show_identity_cache` queries render off the rx_loop. Published from the - /// tick (see [`Self::publish_routing_snapshot`] for the Q1 rationale). + /// tick (see [`Self::publish_routing_snapshot`] for the rationale). routing_snapshot: std::sync::Arc>, - /// Read-side snapshot of the Category-E per-entity tables (peers / sessions + /// Read-side snapshot of the per-entity tables (peers / sessions /// / links / connections / transports + mmp) that the `show_peers` / /// `show_sessions` / `show_links` / `show_connections` / `show_transports` /// / `show_mmp` queries render off the rx_loop. Published from the tick with /// `Vec>` structural sharing (unchanged rows reused by pointer); - /// see [`Self::publish_entities_snapshot`] for the Q1 rationale. + /// see [`Self::publish_entities_snapshot`] for the rationale. entities_snapshot: std::sync::Arc>, // === TUN Interface === @@ -1600,11 +1600,11 @@ impl Node { }; self.stats_snapshot.store(std::sync::Arc::new(snapshot)); - // Publish the Category-D routing read view alongside the stats + // Publish the routing read view alongside the stats // snapshot, from the same tick. self.publish_routing_snapshot(); - // Publish the Category-E per-entity read view from the same tick, with + // Publish the per-entity read view from the same tick, with // `Vec>` structural sharing against the previous snapshot. self.publish_entities_snapshot(); } @@ -1631,7 +1631,7 @@ impl Node { None } - /// Project the Category-D derived/routing/cache state into a + /// Project the derived/routing/cache state into a /// [`RoutingSnapshot`](crate::control::snapshot::RoutingSnapshot) and /// publish it via `ArcSwap`, so `show_tree` / `show_bloom` / `show_cache` /// / `show_routing` / `show_identity_cache` render off the rx_loop. @@ -1832,7 +1832,7 @@ impl Node { self.routing_snapshot.store(std::sync::Arc::new(snapshot)); } - /// Project the Category-E per-entity tables (peers / sessions / links / + /// Project the per-entity tables (peers / sessions / links / /// connections / transports + mmp) into an /// [`EntitySnapshot`](crate::control::snapshot::EntitySnapshot) and publish /// it via `ArcSwap`, so `show_peers` / `show_sessions` / `show_links` / @@ -1858,8 +1858,8 @@ impl Node { /// `Arc` is reused (kept by pointer) whenever it matches the prior row by /// identity and compares equal by value, so a tick in which only one /// peer/session changed re-allocates only that one row, not the whole table. - /// This is what keeps the publish cost off the hot path at scale (the exact - /// thing the umbrella warns a naive per-tick rebuild would violate). + /// This is what keeps the publish cost off the hot path at scale, which a + /// naive whole-table rebuild on every tick would not. fn publish_entities_snapshot(&self) { use crate::control::snapshot as snap; diff --git a/src/nostr/traversal_machine.rs b/src/nostr/traversal_machine.rs index 844c0af6..6725ccf6 100644 --- a/src/nostr/traversal_machine.rs +++ b/src/nostr/traversal_machine.rs @@ -275,7 +275,7 @@ mod tests { #[test] fn replay_first_then_repeat() { - // R1: first id Fresh; same id within window Replay. + // First id Fresh; same id within window Replay. let m = machine(); assert_eq!( m.note_session_seen("s1", 1000), @@ -286,7 +286,7 @@ mod tests { #[test] fn replay_prunes_expired() { - // R2: an entry past its expiry is pruned, so re-seeing it is Fresh. + // An entry past its expiry is pruned, so re-seeing it is Fresh. let m = machine(); // replay_window_ms = 1_000_000 assert_eq!( m.note_session_seen("s1", 1000), @@ -302,7 +302,7 @@ mod tests { #[test] fn replay_cap_evicts_oldest_by_expiry() { - // R3: cap overflow evicts oldest-by-expiry, returns (evicted, retained). + // Cap overflow evicts oldest-by-expiry, returns (evicted, retained). let m = machine(); // cap = 3, window huge so nothing expires here assert_eq!( m.note_session_seen("s1", 1), diff --git a/src/proto/lookup/core.rs b/src/proto/lookup/core.rs index 2602fac7..8967707d 100644 --- a/src/proto/lookup/core.rs +++ b/src/proto/lookup/core.rs @@ -123,8 +123,8 @@ pub(crate) fn plan_forward(request: &mut LookupRequest, rv: &impl RoutingView) - /// NOTE: unlike [`plan_forward`], this does NOT fall back to non-tree /// (cross-link) bloom-matching peers. That asymmetry is preserved verbatim from /// the pre-sans-IO `initiate_lookup` to keep this extraction behavior-neutral; -/// it is a known origination gap (ISSUE-2026-0059) whose fix adds the fallback -/// branch as a separate, behavior-changing change. +/// it is a known origination gap whose fix adds the fallback branch as a +/// separate, behavior-changing change. pub(crate) fn plan_initiate(request: &LookupRequest, rv: &impl RoutingView) -> Vec { let targets: Vec = rv .peers_reaching(&request.target) diff --git a/src/proto/mmp/wire.rs b/src/proto/mmp/wire.rs index 282f8fa1..59fd7143 100644 --- a/src/proto/mmp/wire.rs +++ b/src/proto/mmp/wire.rs @@ -78,8 +78,6 @@ pub struct ReceiverReport { pub interval_bytes_recv: u32, } -// Encode/decode will be implemented in Step 2. - impl SenderReport { /// Encode to wire format (48 bytes: msg_type + 3 reserved + 44 payload). pub fn encode(&self) -> Vec {