Skip to content

[codex] Preserve workspace RPC error messages - #3222

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/preserve-workspace-error-messages
Jun 20, 2026
Merged

[codex] Preserve workspace RPC error messages#3222
juliusmarminge merged 1 commit into
mainfrom
codex/preserve-workspace-error-messages

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • propagate precise workspace path and search-index errors instead of collapsing them into a generic wrapper
  • restore the exact pre-refactor search, list, read, browse, and setup-activity text at typed RPC/activity compatibility boundaries
  • keep structured service errors cause-complete without copying opaque messages into error state

Testing

  • vp test apps/server/src/server.test.ts apps/server/src/workspace/WorkspaceEntries.test.ts apps/server/src/workspace/WorkspaceFileSystem.test.ts apps/server/src/project/ProjectSetupScriptRunner.test.ts (121 passed)
  • vp check
  • vp run typecheck

Note

Medium Risk
Changes user-visible error strings and error types for workspace RPC consumers; behavior is intentional but callers matching on the old WorkspaceEntriesError wrapper need to handle specific variants.

Overview
Restores specific failure text for workspace WebSocket RPCs and setup-script activity instead of generic one-liners.

WorkspaceEntries no longer wraps list/search/normalize failures in a single tagged WorkspaceEntriesError; underlying WorkspacePaths and WorkspaceSearchIndex variants propagate. ws.ts maps those variants (and browse/read/setup errors) into compatibility messages appended to RPC errors—e.g. missing workspace root, ENOENT on browse, outside-root file reads, and setup causes like pty unavailable. ProjectSetupScriptProjectNotFoundError uses a shorter fixed message at the boundary.

Integration tests now assert the full expected strings across search, list, read, and browse failures.

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

Note

Preserve specific error messages in workspace RPC failure responses

  • Replaces generic failure strings in projects.searchEntries, projects.listEntries, projects.readFile, and filesystem.browse RPC handlers with error-variant-specific messages that include the exact cause (e.g., non-existent workspace root, ENOENT on directory scan).
  • Removes the WorkspaceEntriesError wrapper class in WorkspaceEntries.ts so underlying errors from WorkspacePaths and WorkspaceSearchIndex propagate with their original types and messages.
  • Adds helper utilities in ws.ts (workspaceEntriesCompatibilityDetail, workspaceBrowseCompatibilityDetail, projectSetupScriptCompatibilityDetail) to map granular error variants to human-readable strings.
  • Behavioral Change: callers that pattern-match on WorkspaceEntriesError will no longer receive that type; they must now handle the specific variants (e.g., WorkspaceRootNotExistsError, WorkspaceSearchIndexSearchFailed).

Macroscope summarized 6ab8b61.

@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: e1e96350-f1ea-4dea-82af-07d258652f87

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-workspace-error-messages

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

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR refactors error handling to preserve detailed error messages at RPC boundaries instead of generic messages. The changes are limited to error formatting with comprehensive test coverage verifying the expected behavior.

No code changes detected at 6ab8b61. Prior analysis still applies.

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

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge
juliusmarminge force-pushed the codex/preserve-workspace-error-messages branch from ab25ea9 to 6ab8b61 Compare June 20, 2026 07:36
@juliusmarminge
juliusmarminge merged commit f58b6da into main Jun 20, 2026
16 checks passed
@juliusmarminge
juliusmarminge deleted the codex/preserve-workspace-error-messages branch June 20, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 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