Skip to content

[codex] Preserve desktop update state causes#3473

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/preserve-desktop-update-state-cause
Jun 21, 2026
Merged

[codex] Preserve desktop update state causes#3473
juliusmarminge merged 1 commit into
mainfrom
codex/preserve-desktop-update-state-cause

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary

  • retain the structured DesktopUpdateStateReadError in terminal retry logs
  • preserve its exact IPC cause and stack alongside the existing attempt metadata
  • keep update retries, listener behavior, and the null fallback unchanged

Root 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.ts
  • vp check
  • vp run typecheck

Note

Low Risk
Observability-only change to error log payload; no change to retry, subscription, or state fallback behavior.

Overview
When the initial getUpdateState read fails after retries, terminal Effect.logError now attaches the full DesktopUpdateStateReadError (via an error field) instead of only copying error.stack.

That keeps the original IPC failure on error.cause in log context for debugging, while retry count, listener behavior, and the null fallback stay the same. Tests now assert the logged error is the tagged instance and that cause matches 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, the Effect.catchTags handler for DesktopUpdateStateReadError now includes the full error object in the log context instead of a separate stack field. This makes the original cause accessible when inspecting error logs.

Macroscope summarized 37fe94b.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1bc8ebd9-1d01-4955-b56f-26d0e0db9ec4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/preserve-desktop-update-state-cause

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jun 21, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@juliusmarminge
juliusmarminge merged commit 90074e3 into main Jun 21, 2026
16 checks passed
@juliusmarminge
juliusmarminge deleted the codex/preserve-desktop-update-state-cause branch June 21, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant