Repository navigation
feat(apple): connect typed RVT1 client to scoped device gateway - #305
Merged
Merged
Conversation
turinglambdaai
force-pushed
the
feature/rvt1-device-gateway
branch
from
October 22, 2026 05:47
c9f025b to
2ef3688
Compare
turinglambdaai
force-pushed
the
feature/rvt1-device-gateway
branch
from
October 22, 2026 06:44
bf395f3 to
1827328
Compare
Owner
Author
|
CI triage / follow-up (2026-10-22): commit d82e9fd fixes two deterministic failures from the previous PR head.
The new head's 23-job cross-platform matrix is still running; these fixes are not a green-CI or merge claim. Earlier Linux failures in installer/embedded tests were package-install timeouts (exit 124), independent of the Swift assertions. |
The hello write suspends while its bytes join the channel's serialized queue. A product that observes the hello bytes and immediately calls sendEvent could have its call scheduled on the gateway actor before the post-send resumption set ready, failing with notRunning even though the wire order was still correct. Ready now precedes the write; the channel queue keeps hello ahead of any event, and a failed hello still closes the server through the existing error path. Reproduced one failure in roughly six local runs of the per-device filtering test; thirty runs pass after the fix, and the full Swift suite stays green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
RivetDeviceAppleRVT1Clientwith Hello validation, typed request/response correlation, matching cancellation frames, event delivery, and a lifecycle-awarerun()method that keeps the companion application's handler alive until disconnect.RivetDeviceAppleRVT1GatewayServerto dispatch through a per-pairingRivetDeviceGatewaySession, forward cancellation, bound concurrent requests, and filter event/state-change delivery against grants. Shutdown revokes the session and cancels outstanding work instead of waiting indefinitely for a slow backend.RivetDeviceRVT1BackendHostto decode bounded RivetValue argument lists, call the existing local typed RPC client, and encode results.RivetRPCClientso generated Swift APIs can target either the in-process client or the authenticated network client; update generated scaffolding and the taskboard example.invokeRPCcan no longer invoke$state/getor$state/setwithout the package-scoped, state-name-specific authorization path.Security and lifecycle
The RVT1 server accepts an already authenticated RVD1 connection; it does not bypass TLS pinning, pairing confirmation, or credential persistence. It closes the gateway session when the connection ends and returns generic denial errors. The product host still chooses each paired device's scopes and wires host events/state changes to the server.
Validation and remaining product work
Full CI must pass before merge. This PR supplies the reusable post-RVD1 RVT1 path; it does not by itself ship a signed iOS/iPadOS/watchOS app, configure app permissions, choose product-specific scopes, or provide physical-device acceptance.