Problem#
Desktop updater failures reach persisted diagnostics with only generic messages and error tags. A local trace audit found 15 failed nightly update checks without the underlying reason, so the records could not distinguish a missing release feed from a network failure.
Change#
Add bounded cause summaries to the desktop updater's diagnostic logs. The summaries preserve error codes, first-line messages, and nested failure reasons while redacting URLs and credential fields and omitting appended HTTP response bodies and headers. Check, download, install, poller, and updater-event handlers share the formatter.
Scope and approval#
This is a focused fix for missing diagnostic information in the existing updater. It adds no setting or workflow and keeps user-visible update messages generic. All changes address the same loss of updater failure causes.
Verification#
vp test run apps/desktop/src/updates/DesktopUpdates.test.ts apps/desktop/src/updates/DesktopRemoteUpdates.test.ts: 54 tests passed. Regression coverage checks that rejected update checks and updater error events emit redacted causes while retaining generic update state messages. Formatter coverage verifies nested network errors, credential removal, bounded output, cyclic causes, and unreadable error objects.
- Targeted lint and formatting passed for the two changed files.
vp run --filter @t3tools/desktop typecheck passed.
No live Electron update check was run. These changes improve failure diagnostics; the retained traces do not establish the cause of the earlier nightly check failures.
Model: gpt-6.1-sol. Harness: Codex in T3 Code.
Closes #13977
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
6354d083-41dc-4d51-ada6-fe5c54081098📥 Commits
Reviewing files that changed from the base of the PR and between d64de0a6f523ccd531d53baa10925f6b7dd2d7a8 and 1c50504132a57b218bbb3f1e71d50291fbaa563e.
📒 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; 1 remain after this review.
📝 Walkthrough
Walkthrough#
Desktop updater failures now produce bounded, redacted cause summaries in logs. The summary helper handles nested causes, sensitive content, long values, cyclic causes, and unreadable error properties. Tests cover the helper and its use in updater logs.
Changes#
Update error diagnostics
apps/desktop/src/updates/DesktopUpdates.ts,apps/desktop/src/updates/DesktopUpdates.test.tsdescribeUpdateErrorCauseto summarize causes with depth and length limits, redact sensitive content, and return a fallback when summarization throws. Tests cover nested causes, redaction, limits, cyclic causes, and unreadable properties.apps/desktop/src/updates/DesktopUpdates.ts,apps/desktop/src/updates/DesktopUpdates.test.tsPriority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
1c505This change adds bounded, redacted cause details to desktop updater logs and leaves user-facing messages generic. No concrete merge-blocking risk was found.
Pre-merge checks ·
4
#13977requires updater failure logs to record the underlying cause instead of only a fixed message, error tag, and channel.DesktopUpdates.tsaddsdescribeUpdateErrorCauseand includ…apps/desktopupdater logging and its tests. The formatter and test coverage directly support issue#13977. The changes add no settings, workflow, or unrelated use…✨ Finishing Touches
📝 Generate docstrings
🧪 Generate unit tests (beta)
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.