[codex] finish server process and preview Effect cleanup#3209
Conversation
|
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 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 You can customize Macroscope's approvability policy. Learn more. |
c367af4 to
2e15534
Compare
Dismissing prior approval to re-evaluate 2e15534
2e15534 to
8bf0e4d
Compare
8bf0e4d to
34ac1c1
Compare
Dismissing prior approval to re-evaluate 34ac1c1
34ac1c1 to
8d0fd5c
Compare
Dismissing prior approval to re-evaluate 8d0fd5c
Co-authored-by: codex <codex@users.noreply.github.com>
8d0fd5c to
fa3d309
Compare
What changed
VcsProcessservice contract and migrates consumers toVcsProcess.VcsProcess["Service"]Validation
Follow-up to #3191.
Note
Medium Risk
Changes the public error shape and breaks
instanceof ExternalLauncherErrorchecks; callers must use the union orisExternalLauncherError, though user-facing messages stay similar.Overview
Replaces the single message-based
ExternalLauncherErrorin contracts with five tagged variants (unknown/unsupported editor, command not found, browser spawn, editor spawn), a schema union type, andisExternalLauncherError. The server launcher now fails with structured fields (editor, command, target, args, cause) and derivedmessagegetters instead of hand-written strings.launchAndUnreftakes an error factory callback so spawn failures map to the right variant. InternalEditorLaunchnow carrieseditorandtargetfor those errors.Tests and
shell.openInEditorRPC coverage switch toExternalLauncherCommandNotFoundError/ExternalLauncherUnknownEditorErrorand 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
ExternalLauncherErrorwith discriminated error union in external launcherExternalLauncherErrorclass inpackages/contracts/src/editor.tswith five specific tagged error classes:ExternalLauncherUnknownEditorError,ExternalLauncherUnsupportedEditorError,ExternalLauncherCommandNotFoundError,ExternalLauncherBrowserSpawnError, andExternalLauncherEditorSpawnError.isExternalLauncherErrortype guard and exports the union type for runtime discrimination by callers.externalLauncher.tsto emit the appropriate specific error at each failure point, passing structured context fields (editor, command, target, args, cause) instead of a generic message string.EditorLaunchinterface witheditorandtargetfields to carry metadata needed for structured error construction.ExternalLauncherErrorby class identity will no longer match; they must useisExternalLauncherErroror match specific subclasses.Macroscope summarized fa3d309.