feat(grouprelay): relay-local relayrtt echo for browser-to-relay RTT #96

Merged
Claude-Run merged 1 commit from feat/VS-78-grouprelay-relayrtt-echo into main 2026-07-01 23:15:36 +02:00
Member

The browser-facing side of the relay pump now sniffs inbound text frames for a {"ctrlChannel":102938,"type":"relayrtt","time":N} control frame and answers it from the relay process itself: it writes the frame back verbatim to the same browser socket and does NOT forward it to the agent. This lets the SPA (VAPP-51) time the browser-to-relay leg on its own, separate from the agent's existing end-to-end rtt echo.

Interception is scoped to the browser side only (is_browser, derived from the auth vs rauth query param); the agent side of the pump is unchanged, so the agent never sees relayrtt. Every other frame (binary tunnel data, the agent's rtt echoes, and all non-matching text) stays on the opaque pump_until_closed fast path. The relayrtt type token is deliberately distinct from the agent's rtt so a relay answer can never be confused with a device answer, and both legs can be in flight at once.

Adds an end-to-end integration test (relayrtt_echo.rs) that opens a real browser+agent relay pair: it asserts the browser gets its relayrtt frame echoed back verbatim while the agent side sees nothing, and that ordinary browser frames plus agent-originated frames still flow through untouched.

#VS-78

The browser-facing side of the relay pump now sniffs inbound text frames for a `{"ctrlChannel":102938,"type":"relayrtt","time":N}` control frame and answers it from the relay process itself: it writes the frame back verbatim to the same browser socket and does NOT forward it to the agent. This lets the SPA (VAPP-51) time the browser-to-relay leg on its own, separate from the agent's existing end-to-end `rtt` echo. Interception is scoped to the browser side only (`is_browser`, derived from the `auth` vs `rauth` query param); the agent side of the pump is unchanged, so the agent never sees `relayrtt`. Every other frame (binary tunnel data, the agent's `rtt` echoes, and all non-matching text) stays on the opaque `pump_until_closed` fast path. The `relayrtt` type token is deliberately distinct from the agent's `rtt` so a relay answer can never be confused with a device answer, and both legs can be in flight at once. Adds an end-to-end integration test (`relayrtt_echo.rs`) that opens a real browser+agent relay pair: it asserts the browser gets its `relayrtt` frame echoed back verbatim while the agent side sees nothing, and that ordinary browser frames plus agent-originated frames still flow through untouched. #VS-78
feat(grouprelay): relay-local relayrtt echo for browser-to-relay RTT
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 2m2s
Create release / Create release from merged PR (pull_request) Has been skipped
3a6d0c490f
The browser-facing side of the relay pump now sniffs inbound text frames for a `{"ctrlChannel":102938,"type":"relayrtt","time":N}` control frame and answers it from the relay process itself: it writes the frame back verbatim to the same browser socket and does NOT forward it to the agent. This lets the SPA (VAPP-51) time the browser-to-relay leg on its own, separate from the agent's existing end-to-end `rtt` echo.

Interception is scoped to the browser side only (`is_browser`, derived from the `auth` vs `rauth` query param); the agent side of the pump is unchanged, so the agent never sees `relayrtt`. Every other frame (binary tunnel data, the agent's `rtt` echoes, and all non-matching text) stays on the opaque `pump_until_closed` fast path. The `relayrtt` type token is deliberately distinct from the agent's `rtt` so a relay answer can never be confused with a device answer, and both legs can be in flight at once.

Adds an end-to-end integration test (`relayrtt_echo.rs`) that opens a real browser+agent relay pair: it asserts the browser gets its `relayrtt` frame echoed back verbatim while the agent side sees nothing, and that ordinary browser frames plus agent-originated frames still flow through untouched.

#VS-78
Claude-Run deleted branch feat/VS-78-grouprelay-relayrtt-echo 2026-07-01 23:15:36 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-server!96
No description provided.