Skip to content

[codex] finish server process and preview Effect cleanup#3209

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/effect-service-server-process-preview-followup
Jun 20, 2026
Merged

[codex] finish server process and preview Effect cleanup#3209
juliusmarminge merged 1 commit into
mainfrom
codex/effect-service-server-process-preview-followup

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

What changed

  • leaves MCP and orchestration modules untouched for the feat(orchestrator): introduce new orchestrator #2829 overhaul
  • keeps namespace imports at actual service-module boundaries while restoring named package and helper imports
  • replaces the generic ExternalLauncherError message payload with concrete structured error variants, derived messages, a category schema union, and a public predicate
  • inlines the VcsProcess service contract and migrates consumers to VcsProcess.VcsProcess["Service"]
  • preserves existing service documentation and updates behavioral coverage for launcher failures and RPC serialization

Validation

  • affected backend suites: 8 files, 134 tests passed
  • vp check (passes with existing unrelated warnings)
  • vp run typecheck

Follow-up to #3191.


Note

Medium Risk
Changes the public error shape and breaks instanceof ExternalLauncherError checks; callers must use the union or isExternalLauncherError, though user-facing messages stay similar.

Overview
Replaces the single message-based ExternalLauncherError in contracts with five tagged variants (unknown/unsupported editor, command not found, browser spawn, editor spawn), a schema union type, and isExternalLauncherError. The server launcher now fails with structured fields (editor, command, target, args, cause) and derived message getters instead of hand-written strings.

launchAndUnref takes an error factory callback so spawn failures map to the right variant. Internal EditorLaunch now carries editor and target for those errors.

Tests and shell.openInEditor RPC coverage switch to ExternalLauncherCommandNotFoundError / ExternalLauncherUnknownEditorError and namespace imports (ExternalLauncher.ExternalLauncher, ProcessRunner.ProcessRunner) at service-module boundaries.

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

Note

Replace generic ExternalLauncherError with discriminated error union in external launcher

  • Replaces the single ExternalLauncherError class in packages/contracts/src/editor.ts with five specific tagged error classes: ExternalLauncherUnknownEditorError, ExternalLauncherUnsupportedEditorError, ExternalLauncherCommandNotFoundError, ExternalLauncherBrowserSpawnError, and ExternalLauncherEditorSpawnError.
  • Adds isExternalLauncherError type guard and exports the union type for runtime discrimination by callers.
  • Updates externalLauncher.ts to emit the appropriate specific error at each failure point, passing structured context fields (editor, command, target, args, cause) instead of a generic message string.
  • Augments the internal EditorLaunch interface with editor and target fields to carry metadata needed for structured error construction.
  • Behavioral Change: callers checking for ExternalLauncherError by class identity will no longer match; they must use isExternalLauncherError or match specific subclasses.

Macroscope summarized fa3d309.

@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: f538803e-2f69-453f-9651-2cf085e6388c

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/effect-service-server-process-preview-followup

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[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR refactors error handling by splitting a generic error class into specific typed error classes with structured fields. The changes are mechanical with no behavioral impact - errors are thrown at the same points with richer context for better debugging.

No code changes detected at fa3d309. Prior analysis still applies.

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

@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-process-preview-followup branch from c367af4 to 2e15534 Compare June 20, 2026 04:36
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 04:36

Dismissing prior approval to re-evaluate 2e15534

@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-process-preview-followup branch from 2e15534 to 8bf0e4d Compare June 20, 2026 04:39
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-process-preview-followup branch from 8bf0e4d to 34ac1c1 Compare June 20, 2026 04:49
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 04:49

Dismissing prior approval to re-evaluate 34ac1c1

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-process-preview-followup branch from 34ac1c1 to 8d0fd5c Compare June 20, 2026 05:14
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 05:15

Dismissing prior approval to re-evaluate 8d0fd5c

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-process-preview-followup branch from 8d0fd5c to fa3d309 Compare June 20, 2026 05:18
@juliusmarminge juliusmarminge merged commit 2f8d3ba into main Jun 20, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the codex/effect-service-server-process-preview-followup branch June 20, 2026 05:22
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