Skip to content

[codex] normalize server process and preview Effect services#3191

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

[codex] normalize server process and preview Effect services#3191
juliusmarminge merged 1 commit into
mainfrom
codex/effect-service-server-process-preview

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

What changed

  • inlined service contracts for ProcessRunner, ExternalLauncher, PreviewManager, PortDiscovery, and PreviewAutomationBroker
  • replaced standalone shape references with Service["Service"]
  • normalized local service consumption to namespace imports and module-qualified members
  • exported canonical make and layer definitions
  • migrated process-run failures to structured Schema.TaggedErrorClass errors with messages derived from their attributes

Why

These services now follow the single-file Effect module convention used by relay infrastructure and newer client runtime code. No tests were added solely for the structural refactor.

Orchestration modules and McpInvocationContext / McpSessionRegistry remain intentionally excluded because orchestration is being replaced by #2829.

Validation

  • focused process, preview, environment, and server tests: 143 passed
  • vp check (passes with unrelated existing warnings)
  • vp run typecheck

Note

Medium Risk
Process error types now use Schema tagged classes with computed messages, which can affect logging or callers that assumed empty messages; service API surface is structurally the same but import paths and test factories changed.

Overview
Aligns ProcessRunner, ExternalLauncher, PreviewManager, PortDiscovery, and PreviewAutomationBroker with the single-file Effect module pattern: standalone *Shape interfaces are removed in favor of types inlined on Context.Service, implementations return Service.of(...), and make is exported for tests instead of hidden __testing hooks.

Imports move from barrel effect to explicit submodule paths (effect/Effect, effect/unstable/process/ChildProcess, etc.), and call sites/tests use namespace imports (ProcessRunner.ProcessRunner, ProcessRunner.layer).

ProcessRunner errors switch from Data.TaggedError to Schema.TaggedErrorClass with shared invocation fields and message getters built from command/args/cwd (spawn, stdin, output limit, read, timeout). Runtime behavior of run is unchanged aside from error presentation/serialization semantics.

Tests are updated to match the new module-qualified tags and the public PreviewAutomationBroker.make entry point.

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

Note

Normalize process and preview Effect services to use namespaced exports and schema-based errors

  • Removes separate *Shape interfaces across ProcessRunner, PreviewManager, PortDiscovery, ExternalLauncher, and PreviewAutomationBroker, inlining service API types directly into Context.Service generics.
  • Exports make factories directly from each service module and removes __testing escape hatches, making make the standard construction path in tests and production.
  • Replaces effect/Data TaggedError with effect/Schema TaggedErrorClass for all process error types, adding human-readable message strings that include command, args, cwd, and other context.
  • Switches unstable process imports from the barrel effect/unstable/process to explicit module paths effect/unstable/process/ChildProcess and effect/unstable/process/ChildProcessSpawner.
  • Behavioral Change: process error instances now expose customized message strings; any code that previously relied on default error message formatting will see different output.

Macroscope summarized c0c72a7.

@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: 472e738d-d3b4-4210-b347-4cb6a0f4b349

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

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

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Jun 20, 2026
@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

🚀 Expo continuous deployment is ready!

  • Project → t3-code
  • Platforms → android, ios
  • Scheme → t3code-preview
  🤖 Android 🍎 iOS
Fingerprint fe5a51f2e189da69dfc4c2cd458e6cfb5fdff2ea ae3bd597809dfd7771d0898f735d172973d4c1c8
Build Details Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: fe5a51f2e189da69dfc4c2cd458e6cfb5fdff2ea
App version: 0.1.0
Git commit: 1942ed85fe1559363b94339df832d7d33f84399c
Build Permalink
DetailsDistribution: INTERNAL
Build profile: preview:dev
Runtime version: ae3bd597809dfd7771d0898f735d172973d4c1c8
App version: 0.1.0
Git commit: b4706aa685da92ae179e34c97839c2a0e9840f09
Update Details Update Permalink
DetailsBranch: pr-3191
Runtime version: fe5a51f2e189da69dfc4c2cd458e6cfb5fdff2ea
Git commit: 8b22ef2a73b9f66fbcb383088a7f5bcb50b7f81e
Update Permalink
DetailsBranch: pr-3191
Runtime version: ae3bd597809dfd7771d0898f735d172973d4c1c8
Git commit: 8b22ef2a73b9f66fbcb383088a7f5bcb50b7f81e
Update QR

@juliusmarminge juliusmarminge marked this pull request as ready for review June 20, 2026 02:06
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

Mechanical refactoring that normalizes Effect service definitions across the codebase. Changes are type-level (interface inlining, import style) and organizational (exporting make functions directly) with no runtime behavior changes.

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

@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-process-preview branch from d7cdba3 to 60671a6 Compare June 20, 2026 02:43
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 02:43

Dismissing prior approval to re-evaluate 60671a6

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 20, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge force-pushed the codex/effect-service-server-process-preview branch from 60671a6 to c0c72a7 Compare June 20, 2026 03:26
@macroscopeapp macroscopeapp Bot dismissed their stale review June 20, 2026 03:26

Dismissing prior approval to re-evaluate c0c72a7

@juliusmarminge juliusmarminge merged commit 5c1ac92 into main Jun 20, 2026
15 checks passed
@juliusmarminge juliusmarminge deleted the codex/effect-service-server-process-preview branch June 20, 2026 04:09
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