Skip to content

[codex] Preserve desktop user-data probe failures#3304

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/desktop-user-data-path-errors
Jun 20, 2026
Merged

[codex] Preserve desktop user-data probe failures#3304
juliusmarminge merged 1 commit into
mainfrom
codex/desktop-user-data-path-errors

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • stop treating every legacy user-data path probe failure as path absence
  • add a Schema-backed error carrying the inspected path and exact filesystem cause
  • keep genuine path absence as the existing false result and cover permission failure with one focused test
  • export the existing service make value to match module conventions

Verification

  • vp test apps/desktop/src/app/DesktopAppIdentity.test.ts
  • vp check (passes with 20 pre-existing warnings)
  • vp run typecheck

Open PR overlap audit

Audited every open PR with gh pr list --limit 1000 and paginated per-PR files, checking both filename and previous_filename. The test file is also touched by unrelated feature/fix PRs #2901, #2916, #2925, and #2679; the source file has no open-PR overlap.


Note

Medium Risk
Changes early startup path selection in DesktopApp; mis-handled errors could block launch, but the new behavior avoids silently using the wrong user-data directory on probe failures.

Overview
Legacy user-data path resolution no longer swallows filesystem errors from exists on the alpha directory. Probe failures now surface as DesktopUserDataPathResolutionError (path + underlying cause) instead of being treated like “path missing” and falling through to the new user-data dir.

resolveUserDataPath is typed to fail with that error; make is exported for module conventions. Tests simulate permission-denied probes and assert the error shape and message.

Reviewed by Cursor Bugbot for commit da565b0. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Preserve FileSystem.exists probe failures in DesktopAppIdentity.resolveUserDataPath

  • Introduces DesktopUserDataPathResolutionError to surface failures when probing the legacy desktop user-data path via FileSystem.exists.
  • Previously, any error from FileSystem.exists was swallowed and treated as "path does not exist", silently returning the non-legacy path. Now the error is mapped and propagated.
  • resolveUserDataPath in the DesktopAppIdentity service interface now has a typed failure channel of DesktopUserDataPathResolutionError instead of being infallible.
  • Behavioral Change: callers of resolveUserDataPath must now handle the new failure case; code that previously always received a success value may now receive an error.

Macroscope summarized da565b0.

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

coderabbitai Bot commented Jun 20, 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: 44edcefd-b685-4982-ba44-0a2de5ee4919

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/desktop-user-data-path-errors

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:S 10-29 changed lines (additions + deletions). labels Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Self-contained error handling improvement that preserves file system errors instead of silently swallowing them. The change includes test coverage and is made by the original author of the file.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge merged commit 515303e into main Jun 20, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the codex/desktop-user-data-path-errors branch June 20, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 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