[codex] Preserve desktop update state causes#3473
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved Simple logging improvement that preserves full error context (including cause chain) instead of just the stack trace. No runtime behavior changes - only affects debugging information. You can customize Macroscope's approvability policy. Learn more. |
Summary
DesktopUpdateStateReadErrorin terminal retry logsnullfallback unchangedRoot cause
The recovery boundary copied the error tag and attempt count into log attributes but retained only the wrapper stack. The original IPC cause was therefore unavailable after the read failure was swallowed.
Validation
vp test apps/web/src/state/desktopUpdate.test.tsvp checkvp run typecheckNote
Low Risk
Observability-only change to error log payload; no change to retry, subscription, or state fallback behavior.
Overview
When the initial
getUpdateStateread fails after retries, terminalEffect.logErrornow attaches the fullDesktopUpdateStateReadError(via anerrorfield) instead of only copyingerror.stack.That keeps the original IPC failure on
error.causein log context for debugging, while retry count, listener behavior, and thenullfallback stay the same. Tests now assert the logged error is the tagged instance and thatcausematches the rejected IPC error.Reviewed by Cursor Bugbot for commit 37fe94b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Preserve error cause in desktop update state read failure logging
In
createDesktopUpdateStateAtom, theEffect.catchTagshandler forDesktopUpdateStateReadErrornow includes the full error object in the log context instead of a separatestackfield. This makes the original cause accessible when inspecting error logs.Macroscope summarized 37fe94b.