Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
📝 WalkthroughWalkthroughThe PR adds retry logic to the ChangesConnection drop retry mechanism and tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
|
@copilot review but do not make fixes |
15c867f to
8e571f4
Compare
4df2b3a to
46bf5aa
Compare
46bf5aa to
d144f9d
Compare
Fixes ADE-60
Summary
Validation
ADE PR: https://ade-app.dev/open?type=pr&repo=arul28%2FADE&number=438
Summary by CodeRabbit
Release Notes
Greptile Summary
This PR adds retry logic to
ensureProject()so a stale/closed daemon connection detected either before or during theprojects.addcall is transparently recovered from, matching the existing pattern already incallActionForRootUncoalesced.ensureProjectnow loops up to two times: on the first attempt it checksisClosed()before callingprojects.add, and catches connection-dropped errors thrown during the call itself; on each failure it callsresetActiveConnection(which clearsthis.connectionandprojectsByRoot) and retries with a fresh connection.isClosed()pre-call path and one covering the mid-projects.adddrop path that then continues all the way through a successfulcallActionForRoot.Confidence Score: 5/5
Safe to merge — the retry logic is narrowly scoped to connection-dropped errors, follows the identical pattern already used in callActionForRootUncoalesced, and both new regression tests pass end-to-end through a successful action call.
The change is a focused two-attempt retry loop that only activates on connection-dropped errors in ensureProject. resetActiveConnection correctly clears all shared state (this.connection, activeConnection, projectsByRoot) before each retry, so no stale data can leak across attempts. The existing callActionForRootUncoalesced retry loop interacts cleanly with this: if ensureProject exhausts its retries it throws immediately, and if ensureProject succeeds the action-call retry path continues to work as before.
No files require special attention.
Important Files Changed
Sequence Diagram
sequenceDiagram participant C as callActionForRootUncoalesced participant EP as ensureProject participant Pool as ConnectionPool participant D1 as Daemon (stale) participant D2 as Daemon (fresh) C->>EP: ensureProject(rootPath) EP->>Pool: connect() → entry1 (stale) alt "isClosed() == true" EP->>Pool: resetActiveConnection(entry1) Note over EP: clears connection + projectsByRoot else projects.add drops EP->>D1: projects.add D1-->>EP: connection dropped EP->>Pool: resetActiveConnection(entry1) end EP->>Pool: connect() → entry2 (fresh) EP->>D2: projects.add D2-->>EP: project record EP-->>C: project (cached) C->>Pool: connect() → entry2 (same cached) C->>D2: ade/actions/call (projectId) D2-->>C: action resultReviews (8): Last reviewed commit: "Refs ADE-60: fix: document unreachable p..." | Re-trigger Greptile