Recover Relay publication after pipe failures#874
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
📝 WalkthroughWalkthroughRelay bridge-open failures are tracked by bridge identity, propagated through sync status, and used to trigger route republishing. Tunnel lifecycle, relay recovery, status formatting, and account-machine publication behavior gain regression coverage. ChangesRelay failure propagation
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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.
Summary
Validation
npm --prefix apps/ade-cli run typechecknpm --prefix apps/ade-cli run test(96 files, 2,147 tests)npm --prefix apps/ade-cli run buildnpm --prefix apps/desktop run typechecknode scripts/validate-docs.mjs(200 files)Compatibility
Summary by CodeRabbit
Greptile Summary
This PR improves Relay recovery and status reporting for sync routes. The main changes are:
ready.Confidence Score: 5/5
Safe to merge with low risk.
The changes are focused on Relay state tracking and diagnostics, with targeted tests covering blocker persistence, recovery, retained healthy routes, publisher behavior, and CLI status formatting. No blocking correctness or security issues were identified.
No files require special attention.
What T-Rex did
Important Files Changed
Sequence Diagram
sequenceDiagram participant Worker as Relay Worker participant Tunnel as SyncTunnelClientService participant Local as Local ADE listener participant Publisher as AccountMachinePublisher participant Directory as Account Directory Worker->>Tunnel: control open request Tunnel->>Local: validate loopback listener Local-->>Tunnel: ADE marker validated Worker->>Tunnel: data pipe open Tunnel->>Local: local websocket open alt pipe/local setup fails before ready Tunnel->>Tunnel: record bridgeOpenFailure for current generation Tunnel->>Publisher: onPublicationStateChanged(route-state-changed) Publisher->>Directory: publish with retained Relay endpoints hint else pipe and local both ready Tunnel->>Worker: ready Tunnel->>Tunnel: clear bridgeOpenFailure Tunnel->>Publisher: onPublicationStateChanged(route-state-changed) Publisher->>Directory: publish recovered reachable endpoints endComments Outside Diff (1)
General comment
apps/ade-cli/src/cli.test.tsatADE CLI > autostarts a machine brain for socketless headless login. The runtime error isFailed to initialize the ADE brain for account login, with details showing it could not attach to/tmp/.../sock/ade.sockbecause the socket did not exist. This indicates the changed CLI account-login/autostart path is not satisfying the expected socketless headless login behavior covered by the repository's real test.runAccountLoginpath inapps/ade-cli/src/cli.tsafter the attempted ADE brain initialization/attachment cannot find the expected local runtime socket. The test expected the CLI to autostart or otherwise make the machine brain available for socketless headless login, but the changed behavior leaves the attach path pointing at a nonexistent socket.runAccountLogin: ensure the machine brain autostart path completes and publishes/creates the runtime socket before attempting to attach, or update the attach retry/readiness handling so it waits for the autostarted brain socket rather than failing immediately with ENOENT.Reviews (1): Last reviewed commit: "Simplify relay publication lifecycle" | Re-trigger Greptile