When an update check, download or install fails, the desktop log only records the error tag, so there's no way to tell a missing feed file from a network error or a cancelled password prompt (#13977).
Updater failures now also log two bounded fields from the cause:
errorCode: the cause's code, but only if it looks like an identifier (ERR_UPDATER_*, HTTP_ERROR_404, ENOTFOUND).
exitStatus: the number from electron-updater's Command … exited with code N, which is how a dismissed pkexec prompt reports on .deb installs.
The message and URL are still never logged, since electron-updater messages can embed the feed URL with credentials. The fields are added to the check, download and quit-and-install handlers, and to the updater error event handler, which is where DebUpdater reports a failed install.
Tests: the existing redaction test now gives its cause a code and checks that the code is logged while the token still isn't. A new test covers a cancelled pkexec install, checking for exitStatus: 126 and operation: install. Both fail without the change.
Verified on a locally built 0.0.90 .deb against scripts/mock-update-server.ts:
# no channel file on the feed
Desktop updater check operation reported an error. operation: check errorCode: ERR_UPDATER_CHANNEL_FILE_NOT_FOUND
# fake 0.0.91 feed, Install, then cancel the pkexec prompt
Desktop updater install operation reported an error. operation: install exitStatus: 126
No updater log line contained the feed URL.
Closes #13977
🤖 Generated with Claude Code (Claude Opus 5.5)
Summary by CodeRabbit#
- Bug Fixes
- Update failure logs now include more useful diagnostic details, such as available error codes and installer exit statuses. This can make it easier to understand why an update check, download, or installation failed, while avoiding logging URL-bearing error messages.
- Installer failures that provide an exit status are recorded with that status, even when no error code is available.
Important
Review skipped#
We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting
@coderabbitai full review.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
15d33c07-5400-40fe-bdf6-cc04aef028b1📥 Commits
Reviewing files that changed from the base of the PR and between 94f92a7a386a26c98892b24fabdd0ea9fa804ce3 and d3eb02444e9d8764d96241510531544cbfdbeef1.
📒 Files selected for processing (2)
apps/desktop/src/updates/DesktopUpdates.test.tsapps/desktop/src/updates/DesktopUpdates.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
Updater failure logs now include bounded error codes and installer exit statuses when available. Tests cover HTTP error codes and installer exit status, and check that sensitive URL details remain excluded.
Changes#
Updater failure diagnostics
apps/desktop/src/updates/DesktopUpdates.ts,apps/desktop/src/updates/DesktopUpdates.test.tsPriority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
d3eb0This change adds bounded updater failure details without logging raw error messages or URLs. No concrete regression is established, so no merge-blocking issue is identified; real installer exit-status coverage remains unverified.
Architecture Summary#
Architecture risk: 🔵 Low · up to
d3eb0The change affects 1 system.
Changed systems:
apps/desktopArchitecture concerns No architecture-level concerns identified.
Review details
Systems and components
Before / after behavior
code: "HTTP_ERROR_404"in addition to the sensitive URL message; the existing assertions continue to check that the logged annotations do not expose the raw error or secret.errorCode: "HTTP_ERROR_404".pkexecexit code126and checks that the logged install annotations includeexitStatus: 126but omiterrorCode.describeUpdaterFailureCause, which returns no fields for non-Errorcauses, includeserrorCodeonly whencodeis a string matching^[A-Z][A-Z0-9_]{0,63}$, and extractsexitStatusonly from a trailingexited with codefollowed by one to three digits.🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
#13977.DesktopUpdates.tsadds bounded failure context for updater check, download, install, anderrorevent logs. The context includes a validatederrorCodeand parsed insta…#13977. The source changes add diagnostic fields to desktop updater failure logs, and the test changes verify those fields and redaction behavior. No unrelated behavior is desc…✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.