Repository navigation
Bug crash report submission still fails post 824 - #10023
Conversation
Replace the api.onorca.dev fallback pattern with same-host retries on www.onorca.dev, the endpoint that owns crash delivery. This ensures consistent behavior and clearer error reporting when failures occur.
📝 WalkthroughWalkthroughFeedback submission now uses the website feedback endpoint for primary requests and retries. Server errors and network failures retry the primary submission, while diagnostic failures can retry with the diagnostic bundle removed. Compatibility-endpoint fallback handling was removed. Tests now cover website URL usage, 502 responses, stalled retries, non-diagnostic 404 responses, and preservation of primary and retry error details. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
src/main/ipc/feedback.ts (2)
173-204: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winConsider a small backoff before the same-host retry.
retryFeedbackOnPrimaryimmediately re-issues the request to the exact sameFEEDBACK_API_URLright after a 5xx/network failure. If the failure was due to transient server overload, an immediate retry to the same host is likely to hit the same condition. A short delay (even a fixed ~500ms–1s, no need for full exponential backoff given this is a single retry) before the retry attempt would meaningfully increase the odds of success without materially delaying the user-facing crash report flow.♻️ Sketch of adding a short delay before retry
async function retryFeedbackOnPrimary( body: FeedbackSubmitBody, primaryError?: unknown ): Promise<FeedbackSubmitResult> { try { + await new Promise((resolve) => setTimeout(resolve, RETRY_BACKOFF_MS)) const retry = await postFeedback(FEEDBACK_API_URL, body)
210-223: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winNo further retry if the bundle-less resubmission itself fails.
submitFeedbackWithoutDiagnosticBundleposts once and, on either a bad response or a thrown error, returns failure immediately — unlike the non-diagnostic path insubmitFeedback(Lines 275-280), which callsretryFeedbackOnPrimaryon 5xx/network errors. Since crash reports (the PR's stated bug) carrydiagnosticBundleand route through this function, a transient failure on the bundle-less resubmission still results in a lost crash report with no second chance, unlike plain feedback submissions.♻️ Proposed fix to mirror the non-diagnostic retry path
async function submitFeedbackWithoutDiagnosticBundle( body: FeedbackSubmitBody, diagnosticBundleFailure: FeedbackRequestFailure ): Promise<FeedbackSubmitResult> { try { const response = await postFeedback(FEEDBACK_API_URL, body) if (response.ok) { return { ok: true, diagnosticBundleFailure } } - return { ok: false, ...responseFailure(response), diagnosticBundleFailure } + if (response.status >= 500) { + const retryResult = await retryFeedbackOnPrimary( + body, + new Error(`status ${response.status}`) + ) + return { ...retryResult, diagnosticBundleFailure } + } + return { ok: false, ...responseFailure(response), diagnosticBundleFailure } } catch (error) { - return { ok: false, ...errorFailure(error), diagnosticBundleFailure } + const retryResult = await retryFeedbackOnPrimary(body, error) + return { ...retryResult, diagnosticBundleFailure } } }
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 68d112f8-1d2c-46ac-8146-73e4258924e1
📒 Files selected for processing (2)
src/main/ipc/feedback.test.tssrc/main/ipc/feedback.ts
Refresh skill-bundle manifests and other main-side fixes so PR verify passes; the PR only changes crash-report submission retry behavior.
…blyai#10023) Replace the api.onorca.dev fallback pattern with same-host retries on www.onorca.dev, the endpoint that owns crash delivery. This ensures consistent behavior and clearer error reporting when failures occur.
Summary
Describe the user-visible change.
Screenshots
No visual change.Testing
pnpm lintpnpm typecheckpnpm testpnpm buildAI Review Report
Summarize the code review you ran with your AI coding agent. Include the main risks it checked, what it flagged, and what you changed or verified as a result.
Confirm that the review explicitly checked cross-platform compatibility for macOS, Linux, and Windows, including shortcuts, labels, paths, shell behavior, and any Electron-specific platform differences touched by this PR.
Security Audit
Provide a basic security audit summary from your AI coding agent. Call out any input handling, command execution, path handling, auth, secrets, dependency, or IPC risks that were reviewed, plus any follow-up needed.
Notes
Call out any platform-specific behavior, risks, or follow-up work.