Use more idiomatic Effect patterns in server runtime paths#3483
Draft
cursor[bot] wants to merge 1 commit into
Draft
Use more idiomatic Effect patterns in server runtime paths#3483cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Optionfor desired/active runtime config instead of nullable values.nullat the boundary and convert it toOptionbefore invoking the service.Duration,Schedule, and a structured tagged retry signal instead of raw millisecond retry math and a string sentinel.Optionvalues and useassertfrom@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
Note
Replace null/undefined patterns with Effect
Optionin server runtime pathsManagedEndpointRuntimeto useOptionthroughout:applyConfignow acceptsOption-wrapped configs, internal refs useOption.none, andstopConnectorusesOption.match.OrchestrationEngineHarnessto replace string sentinelRETRY_SIGNALwith a taggedWaitForRetrySignalerror and acceptDuration.Inputinstead of millisecond numbers for timeouts.http.ts,server.test.ts, andManagedEndpointRuntime.test.tsto passOption-wrapped values and use@effect/vitestassertions.applyConfigcallers must now wrap configs inOption.some(...)or passOption.none(); raw objects andnullare no longer accepted.Macroscope summarized 66d9fcf.