Skip to content

Use more idiomatic Effect patterns in server runtime paths#3483

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/idiomatic-effect-patterns-bdb2
Draft

Use more idiomatic Effect patterns in server runtime paths#3483
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/idiomatic-effect-patterns-bdb2

Conversation

@cursor

@cursor cursor Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • Changed the managed endpoint runtime service API and internal refs to use Option for desired/active runtime config instead of nullable values.
  • Kept JSON/HTTP null at the boundary and convert it to Option before invoking the service.
  • Updated orchestration integration harness polling to use Duration, Schedule, and a structured tagged retry signal instead of raw millisecond retry math and a string sentinel.
  • Updated the managed endpoint runtime tests to pass Option values and use assert from @effect/vitest.

Why

These are small server-side idiom improvements that make state and polling policies easier to test and reason about with Effect primitives while preserving existing behavior.

UI Changes

N/A - no UI changes.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • UI screenshots are not applicable
  • Animation/interaction video is not applicable
Open in Web View Automation 

Note

Replace null/undefined patterns with Effect Option in server runtime paths

  • Refactors ManagedEndpointRuntime to use Option throughout: applyConfig now accepts Option-wrapped configs, internal refs use Option.none, and stopConnector uses Option.match.
  • Updates OrchestrationEngineHarness to replace string sentinel RETRY_SIGNAL with a tagged WaitForRetrySignal error and accept Duration.Input instead of millisecond numbers for timeouts.
  • Updates call sites in http.ts, server.test.ts, and ManagedEndpointRuntime.test.ts to pass Option-wrapped values and use @effect/vitest assertions.
  • Behavioral Change: applyConfig callers must now wrap configs in Option.some(...) or pass Option.none(); raw objects and null are no longer accepted.

Macroscope summarized 66d9fcf.

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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