Skip to content

Warn the host when guests cannot reach each other - #156

Merged
benandez merged 3 commits into
mainfrom
claude/guest-rendezvous-log
Dec 6, 2026
Merged

benandez merged 3 commits into
mainfrom
claude/guest-rendezvous-log

Conversation

@Jeremy8776

@Jeremy8776 Jeremy8776 commented Dec 6, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Guests reach each other only through the host's own rendezvous (introductions for a punch, then its relay). In a three-way call on 06/12/2026, both guests linked to the host directly but never to each other. The Linux guest's introduce and relay requests to the Windows guest got no answer, so the Windows guest was either not registered on the rendezvous or never accepted. The logs could not say which. Guests never logged their rendezvous state, and "Guests may not see each other" only fired when the router refused the second port. In this call both ports mapped, so the host saw no warning.

This PR adds the missing evidence and a warning that follows the real failure:

  • Host warning from who actually registered. veil-rendezvous gains a read-only Roster (keys only, held weakly) from RendezvousServer::roster(). Every 2 s the host compares it with the call's members (engine/host/apart.rs). A member that is not registered 10 s after it joined is named once in veil.log. While two or more others are in the call, the host sees "Guests may not see each other", unless the router line already says so. A member that registers later is logged and the warning clears.
  • Guest log line. Guests log rendezvous: registered in the call's room or rendezvous: not registered: <reason> at the start and on every change (helper_evidence.rs).

The next real three-way call should confirm the cause. If the log shows the guest was never registered, the planned follow-up is to serve the rendezvous on the call's own port, so a guest who reaches the call also reaches the rendezvous.

Reviewer notes:

  • server.rs only changes State and rooms to pub(crate) and adds roster(). The new code is in roster.rs, which keeps the file under the size limit.
  • Nothing new goes on the network. The roster is read inside the host's own process, so docs/TRANSPARENCY.md does not change.

Checks

  • Tests added or updated for new logic (apart.rs unit tests, veil-rendezvous/tests/roster.rs, the guest log line in helper_evidence.rs)
  • cargo clippy clean for the crates I changed (veil-app, veil-rendezvous, all targets)
  • docs/TRANSPARENCY.md updated, if this changes what Veil protects or what others can see (not needed: nothing new goes on the network)
  • No new unsafe, and any new dependency passes tools/licences.py (no new dependencies)

Not yet tried in a real call. A dev build of this branch is running on the host PC for the next test.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Hosts are warned when a participant has not connected to the rendezvous after a short grace period. The warning clears if the participant connects.
    • Introduction requests sent before a participant registers are delivered after they register.
  • Bug Fixes
    • Improved rendezvous status logging for guests, including reasons for registration failures.

Jeremy8776 and others added 2 commits December 6, 2026 00:23
Guests link to each other through the host's rendezvous, but a guest's
registration state only showed in the call report, never in veil.log. A
failed guest-to-guest link could not be traced from logs. Guests now log
when they register, and why not when they cannot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Guests link to each other only through the host's own rendezvous. A
guest that reached the host but not the rendezvous got no links to the
others, and nothing said so: "Guests apart" only fired when the router
refused the second port, not when it opened but could not be reached.

The rendezvous server now offers a Roster of registered keys. The host
compares it with the call's members every 2 s. A member not registered
after 10 s is named in veil.log, and while two or more others are in the
call the host sees "Guests may not see each other".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Dec 6, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The change adds rendezvous roster access and pending-request delivery on registration. The host uses roster data to track overdue call members and expose their status through logs, the call view, and a warning.

Changes: Rendezvous Registration Monitoring

Layer / File(s) Summary
Expose rendezvous roster
crates/veil-rendezvous/src/roster.rs, crates/veil-rendezvous/src/server.rs, crates/veil-rendezvous/src/lib.rs, crates/veil-rendezvous/tests/roster.rs
The rendezvous server exposes a read-only roster lookup for registered members in a room. Tests check room membership and the roster’s result after the server stops.
Track overdue registrations
crates/veil-app/src/engine/host/apart.rs, crates/veil-app/src/engine/host.rs, crates/veil-app/src/engine/host/hosting.rs, crates/veil-app/src/engine/host/successor.rs
The host retains its locally hosted room and compares registered members with the call roster during refresh. The tracking state records late and returning members and passes through host handover.
Surface registration status
crates/veil-app/src/model.rs, crates/veil-app/src/engine/view.rs, crates/veil-app/src/screens/panels.rs, crates/veil-app/src/engine/helper_evidence.rs, crates/veil-app/src/demo.rs, CHANGELOG.md
The call view carries the apart state to the host warning. The warning does not repeat the router’s GuestsApart warning. Guest helper logs report registration status and any recorded issue.

Pending Introduction Delivery

Layer / File(s) Summary
Forward requests on registration
crates/veil-rendezvous/src/server.rs, crates/veil-rendezvous/tests/loopback.rs, CHANGELOG.md
Registration replies include unexpired introduction requests addressed to the registering member in the same room. The loopback test checks delivery, acceptance, and the resulting plan.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Hosting
  participant Roster
  participant Unregistered
  participant View
  Hosting->>Roster: Get registered member IDs
  Roster-->>Hosting: Return registered member IDs
  Hosting->>Unregistered: Check call members against registrations
  Unregistered-->>Hosting: Return late, back, and apart state
  Hosting->>View: Update members_apart when state changes
Loading
sequenceDiagram
  participant Host
  participant RendezvousServer
  participant Guest
  Host->>RendezvousServer: Allow guest and request introduction
  Guest->>RendezvousServer: Register in the room
  RendezvousServer-->>Guest: Return registration confirmation and pending request
  Guest->>RendezvousServer: Accept introduction
  RendezvousServer-->>Host: Return plan naming the guest
Loading
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A member dials a joiner as soon as the host's plan names it, often before
the joiner's presence has registered on the rendezvous. The server recorded
the request but never delivered it, so the asker waited out its 5 s answer
timeout and only a later redial could succeed. Register now sends the new
member any unexpired requests for it. Only the target learns of them, so
the asker still learns nothing until it accepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 6, 2026

Copy link
Copy Markdown

@benandez

benandez commented Dec 6, 2026

Copy link
Copy Markdown
Member

Pushed one commit on top (55f99b4): the rendezvous now passes a waiting request on to a member when it registers.

In Martin's log for the 06/12 call, his introduce/relay request to Jimmy went out the moment Jimmy joined and timed out ("rendezvous did not answer in time"). ask records a request for a key that isn't registered yet, but Register never delivered it, so the first attempt always waited out the 5 s timeout. Register now sends the new member any request for it that is still under REQUEST_TTL. Only the target sees it, so consent is unchanged.

Test: a_request_made_before_the_target_registers_reaches_it_when_it_does in tests/loopback.rs. Also a CHANGELOG line. Merging once CI is green so we can test it tonight.

🤖 Generated with Claude Code

@benandez
benandez merged commit 86b7f2d into main Dec 6, 2026
12 of 13 checks passed
@benandez
benandez deleted the claude/guest-rendezvous-log branch December 6, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants