reticulum-group-chat/scripts
Rob e1de97713f v1.1.0: outbound link delivery + lifecycle + uncapped /users
Lifts the 295-byte cap on outbound forwarded messages by routing oversized
sends through a Reticulum Link automatically. Was: opportunistic-only;
now: opportunistic for short, link for long, transparent to callers.
Also fixes the bug where /users silently failed once the roster reply
exceeded the opportunistic packet size — full list now returns regardless.

PR1 — outbound link initiator (rns + lxmf)
- Transport.SendOverLink: lazy handshake, encrypt link DATA, await proof
- Transport.handleLinkProof: validate responder's long-term Ed25519 sig,
  signal pending waiter
- Link.{initiatorEd25519Priv, peerEd25519Pub, pendingProofs, activatedCh,
  AwaitActive, registerProofWaiter, signalProof}
- StartLinkAsInitiator retains ephemeral Ed25519 priv on the Link
- HandleLRProof caches responder pub + closes activatedCh
- Delivery.Send routes opportunistic vs link by ErrPayloadTooLarge fall-
  through; new Delivery.LinkSendTimeout (default 30s)
- Sentinels: ErrLinkPeerUnknown, ErrLinkHandshakeTimeout,
  ErrLinkProofTimeout, ErrLinkSendFailed

PR2 — initiator-side return-data proofs
- handleLinkData signs responder-side with long-term Ed25519 (existing)
  AND initiator-side with stored ephemeral Ed25519 (new). Bidirectional
  traffic on outbound links no longer triggers infinite responder
  retransmits.

PR3 — lifecycle, multi-hop, KEEPALIVE
- Transport.RunLinkSweeper(ctx) + sweepLinks(): closes idle links
  (default 15m), emits KEEPALIVE on active outbound (default 4m).
  Configurable via SetLinkLifetime.
- applyMultihopRouting promotes LINKREQUEST + link DATA + KEEPALIVE to
  HEADER_2 + transport_id when the responder's KnownIdentity carries one
  (announce came via a relay). HashablePart-invariance under
  HEADER_1<->HEADER_2 means link_id derivation stays consistent.
- service.Run starts the sweeper alongside Transport.Run.

/users uncapped
- Dispatcher.MaxReplyContentBytes wired to 0 (unlimited) in service.New.
  Truncation helper still available for callers that want a per-command
  cap, but production wiring lets list replies fall through to link
  delivery via Delivery.Send routing.

Tests
- 19 new pure-Go E2E scenarios in internal/lxmf/link_send_e2e_test.go
  covering opportunistic-vs-link routing, link reuse, bidirectional
  large sends, sweeper close + keepalive, and negative paths
  (handshake/proof timeouts, peer-unknown, bad-sig, concurrent sends).
- New byte-level Python interop test (internal/rns/link_send_interop_test.go
  + scripts/gen_link_data.py) drives RNS 1.2.4 to emit a deterministic
  link DATA wire packet; our LinkTokenEncrypt + BuildLinkDataPacket must
  produce byte-identical output and decrypt upstream's bytes back.
- internal/rns/testing_hooks.go exposes SetLink{LastActivity,State},
  SweepLinksForTest, TestDispatchRaw to cross-package tests.
- All existing tests still pass against rns 1.2.4 / lxmf 0.9.7.

Service plumbing
- service.openLogWriter + service.LogPath config option (carry-over from
  v1.0.4 work that landed in this commit): tee daemon log to a file for
  troubleshooting. Inbox emits structured cmd from=… / cmd reply sent: …
  events.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 07:34:00 -04:00
..
build-all.sh v1.0.1: security hardening + sanitization + member cap + version flag + full README 2026-05-06 16:55:03 -04:00
build-rpi.sh Initial commit: Reticulum LXMF group-chat forwarding service 2026-05-05 23:21:45 -04:00
gen_ifac_packet.py rns: fix §2.1 IFAC bit-7 / header_type bit split 2026-05-06 22:13:59 -04:00
gen_link_data.py v1.1.0: outbound link delivery + lifecycle + uncapped /users 2026-05-08 07:34:00 -04:00
gen_link_proof.py rns: add upstream-Python interop test for link DATA proofs 2026-05-06 23:39:03 -04:00
live_ifac_test.sh rns: fix §2.1 IFAC bit-7 / header_type bit split 2026-05-06 22:13:59 -04:00