Skip to content

Bug crash report submission still fails post 824 - #10023

Merged
AmethystLiang merged 2 commits into
mainfrom
bug-crash-report-submission-still-fails-post-824
Jul 23, 2026
Merged

AmethystLiang merged 2 commits into
mainfrom
bug-crash-report-submission-still-fails-post-824

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

Describe the user-visible change.

Screenshots

  • Add screenshots or a screen recording for any new or changed UI behavior.
  • If there is no visual change, say No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

AI 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.

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.
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Feedback 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)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is just the template and lacks actual summary, testing, review, security, and notes content. Replace the template text with filled sections for Summary, Screenshots, Testing, AI Review Report, Security Audit, and Notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is related to crash report submission retry changes, though it is a bit awkward and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
src/main/ipc/feedback.ts (2)

173-204: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Consider a small backoff before the same-host retry.

retryFeedbackOnPrimary immediately re-issues the request to the exact same FEEDBACK_API_URL right 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 win

No further retry if the bundle-less resubmission itself fails.

submitFeedbackWithoutDiagnosticBundle posts once and, on either a bad response or a thrown error, returns failure immediately — unlike the non-diagnostic path in submitFeedback (Lines 275-280), which calls retryFeedbackOnPrimary on 5xx/network errors. Since crash reports (the PR's stated bug) carry diagnosticBundle and 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

📥 Commits

Reviewing files that changed from the base of the PR and between c8381f3 and 27f4488.

📒 Files selected for processing (2)
  • src/main/ipc/feedback.test.ts
  • src/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.
@AmethystLiang
AmethystLiang merged commit 746a8f3 into main Jul 23, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant