Program: implement IRCGateway #90
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Port the IRC and grid-chat bridge with explicit protocol boundaries and cancellation.
Deliverables
Validation
Prerequisite
The library behavior required by the program is implemented and its translated parity tests pass.
Project constraints
Implemented and pushed in
d1e05d1.The native Rust IRCGateway now preserves the seven positional live arguments (with environment fallbacks), bridges fully audible normal local chat and one IRC channel bidirectionally, accepts teleport lures only from the configured master, and uses only public native LibreMetaverse APIs. The IRC side implements bounded incremental UTF-8 decoding, 512-byte UTF-8-safe writes, NICK/USER registration, PING/PONG, 001/JOIN, PRIVMSG parsing including IRCv3 tags, RFC1459 case mapping, exponential reconnect/backoff, and cancellation. The shared bridge core has bounded queues, deterministic oldest-drop behavior, per-direction integer token buckets, user-name sanitization, self/duplicate/reflection suppression, status/capability redaction, and joined cleanup of the IRC worker, bridge worker, subscriptions, grid login/session, and socket ownership.
Offline validation uses the same BridgeTransport/BridgeEvent boundary as live mode and covers bidirectional mapping/filtering, reconnect and offline queue draining, rate limiting, duplicates/loops, master-only teleport handling, malformed/oversized inputs, fragmented/oversized IRC framing, RFC1459 mapping, bounded queue drops, UTF-8 truncation, and worker/transport cancellation.
Verified:
The literal workspace all-features clippy gate reaches unrelated pre-existing tests/compat/tests/archive_model_semantics.rs warnings (three float_cmp and one needless_raw_string_hashes); those out-of-scope cases were left untouched. Documentation and programs/source completeness status were updated.