Proof of concept mechanical port of ircnet/ircd to Rust as part of a bit about C being insecure for network services
0

Configure Feed

Select the types of activity you want to include in your feed.


name: leveva-callerid description: "leveva caller-id (+g user mode + ACCEPT command, slice 216; remote-sender S2S gating slice 217) — where it lives, what's enforced, and the one remaining deferred follow-on (+G soft caller-id)" metadata: node_type: memory type: project originSessionId: 5bb19fa3-2ebf-42ca-8e92-82f35af13ef3#

P11 slice 216 added charybdis-style caller-id to leveva (the canonical "expected but missing" feature; picked after confirming no clean documented deferral remained open — the STS-REHASH / S2S-KILL-notice / throttle-knob / MODE+VERSION-proptest / UTF8ONLY "deferred" doc comments were all stale, closed by later slices).

What it is. +g user mode ("server-side ignore") + the ACCEPT command. A +g user receives private PRIVMSG/NOTICE only from clients on its accept list (or itself). A blocked PRIVMSG → 716 to sender + once-per-(target,sender) 717 (sender) / 718 (target); a NOTICE is silently dropped.

Where it lives.

  • leveva/src/callerid.rs — the pure CallerId store, owned inside Registry (the metadata zero-ServerContext-churn precedent), accessed via ctx.registry.callerid(). Accept entries are stable Uids; unresolvable UIDs (acceptee quit) filtered on read; owner's lists dropped in Registry::release. ACCEPT_LIMIT=30. Registry::modes_of(uid) accessor added (mirrors caps_of).
  • UserMode::CallerId = +g, bit 0x0400 (mode.rs); client-settable via the i|w|B|x|g arm in command::mode::umode; NOT in SEND_UMODES (purely local — the gate runs on the target's home server). -g clears the notify gate.
  • command/accept.rs (the ACCEPT handler); the speech gate in command/message (local-nick delivery arm); CALLERID=g ISUPPORT token; 8 numerics (281/282/456/457/458/716/717/718).
  • Slice 217 added the remote-sender plane: s2s::relay::inbound_message's local-nick branch now runs the same gate for a remote sender (the +g design = enforce on the target's home server). A blocked remote PRIVMSG routes 716 (+ once 717) to the sender's uplink via the new route_numeric_to_remote helper (numerics addressed by nick + prefixed with our server name — the inbound-numeric convention) and delivers 718 to the local target; a blocked remote NOTICE is silently dropped. Same store + once-per-pair rate-limit as the local path. Tests: 4 units in s2s/relay.rs + callerid_s2s_proptest.rs.

Slice 218 added +G soft caller-id — the track is now COMPLETE.

  • UserMode::SoftCallerId = +G, bit 0x0800, flag FLAGS_SCALLERID; client- settable, also local-only (not in SEND_UMODES). Identical to +g except a sender sharing a channel with the target passes without an accept.
  • The block decision is now the pure callerid::blocks(strict, soft, accepted, common_channel) — the single source of truth + the fuzz target (tests/softcallerid_proptest.rs). Wrapped by command::message::caller_id_blocks(ctx, target, sender) (resolves the 4 bools, short-circuits the channel lock), called by BOTH the local (command::message) and remote-sender (s2s::relay::inbound_message) gates so they can't disagree. Channels::shares_channel(a,b) = the common-channel predicate. +g/+G share the accept store + the 717/718 notify gate; -g/-G clear-notify widened to "caller-id fully off". ISUPPORT stays CALLERID=g; 004 umode string is now oOiwraWBxsgG.

No deferred follow-ons remain in the caller-id track.

Recorded the slice per [[leveva-slice-recording]]; relates to [[leveva-restricted-enforcement]] (the other +-mode enforcement family) and [[leveva-server-notices]].