fix(mesh): route send-content-inline over federation for radio-less peers #133

Open
ssmithx wants to merge 2 commits from fix/mesh-send-content-inline-federation-fallback into main
Collaborator

Summary

  • mesh.send-content-inline always routed via send_typed_wire (the LoRa/radio path), so sending a picture/attachment to a federation-only contact (no radio twin) failed with Peer is federation-only (no radio twin) — not reachable over the radio, surfaced to the companion app as "Operation failed. Check server logs for details."
  • Reproduced live on archy-x250-mad2 sending a picture from the companion app.
  • mesh.send-content (the ContentRef/out-of-band-fetch path) already resolves the peer's federation onion and falls back to send_typed_wire_via_federation; this mirrors that same lookup into mesh.send-content-inline.

Test plan

  • cargo build -p archipelago — clean
  • cargo test -p archipelago mesh:: — 135 passed, 0 failed
  • Manual verification: send a picture from the companion app to a federation-only contact on archy-x250-mad2

🤖 Generated with Claude Code

## Summary - `mesh.send-content-inline` always routed via `send_typed_wire` (the LoRa/radio path), so sending a picture/attachment to a federation-only contact (no radio twin) failed with `Peer is federation-only (no radio twin) — not reachable over the radio`, surfaced to the companion app as "Operation failed. Check server logs for details." - Reproduced live on `archy-x250-mad2` sending a picture from the companion app. - `mesh.send-content` (the ContentRef/out-of-band-fetch path) already resolves the peer's federation onion and falls back to `send_typed_wire_via_federation`; this mirrors that same lookup into `mesh.send-content-inline`. ## Test plan - [x] `cargo build -p archipelago` — clean - [x] `cargo test -p archipelago mesh::` — 135 passed, 0 failed - [ ] Manual verification: send a picture from the companion app to a federation-only contact on `archy-x250-mad2` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ssmithx added 1 commit 2026-08-07 12:52:11 +00:00
mesh.send-content-inline always called send_typed_wire (the LoRa/radio
path), which fails with "Peer is federation-only (no radio twin)" for
any contact reachable only via Tor federation — reproduced sending a
picture from the companion app to a federation-only peer on
archy-x250-mad2. mesh.send-content already resolves the peer's
federation onion and falls back to send_typed_wire_via_federation;
mirror that same lookup here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ssmithx added 1 commit 2026-08-07 15:43:43 +00:00
The first fix (federation fallback in the plain content-inline path) wasn't
enough — mesh.transport-advice recommended the "resource-mesh" tier purely
from our own device being Reticulum-capable, without checking that THIS
peer actually has a radio route. For a federation-only contact (no radio
twin) that steered the frontend into send-content-inline's Reticulum
resource-transfer path, which has no dest_prefix to send to and fails with
"Peer is federation-only (no radio twin)" — reproduced again on
archy-x250-mad2 after deploying the first fix.

Adds MeshService::has_radio_route(contact_id), and gates both the
"resource-mesh" tier in mesh.transport-advice and the resource-transfer
branch in mesh.send-content-inline on it. Federation-only peers now fall
through to the has_tor branches, which route the frontend to
mesh.send-content (already correctly federation-aware) instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
You are not authorized to merge this pull request.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/mesh-send-content-inline-federation-fallback:fix/mesh-send-content-inline-federation-fallback
git checkout fix/mesh-send-content-inline-federation-fallback
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lfg2025/archy#133