[codex] migrate Effect.fn in apps/server/src/provider/makeManagedServerProvider.ts#1640
Merged
juliusmarminge merged 2 commits intomainfrom Apr 1, 2026
Conversation
…er.ts Co-authored-by: codex <codex@users.noreply.github.com>
|
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 |
gigq
pushed a commit
to gigq/t3code
that referenced
this pull request
Apr 6, 2026
…erProvider.ts (pingdotgg#1640) Co-authored-by: codex <codex@users.noreply.github.com>
Chrono-byte
pushed a commit
to Chrono-byte/t3code
that referenced
this pull request
Apr 7, 2026
…erProvider.ts (pingdotgg#1640) Co-authored-by: codex <codex@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.
Summary
() => Effect.gen(...)wrapper inapps/server/src/provider/makeManagedServerProvider.tstoEffect.fnWhy
Effect.genwrappers out of the codebaseValidation
bun fmtbun lintpackages/shared: bun run test src/DrainableWorker.test.tsapps/server: bun run test src/provider/Layers/EventNdjsonLogger.test.ts src/provider/Layers/ProviderRegistry.test.ts src/provider/Layers/ProviderService.test.ts src/provider/Layers/ProviderAdapterRegistry.test.ts src/keybindings.test.ts src/open.test.tsapps/server: bun run test src/orchestration/projector.test.tsapps/server: bun run test src/orchestration/Layers/OrchestrationEngine.test.ts -t "returns deterministic read models for repeated reads"apps/server: bun run test src/orchestration/Layers/OrchestrationEngine.test.ts -t "archives and unarchives threads through orchestration commands"apps/server: bun run test src/orchestration/Layers/OrchestrationEngine.test.ts -t "streams persisted domain events in order"Notes
bun run testandbun typecheckat the repo root currently fail inapps/webbecause@effect/atom-reactcannot be resolvedapps/serverstill has unrelated pre-existing typecheck failures outside this fileNote
Migrate
makeManagedServerProviderto useEffect.fn-based generator functionsRefactors makeManagedServerProvider.ts to use the
Effect.fnnaming and direct generator style throughout.Effect.fngenerators.applySnapshotBaseas a namedEffect.fnand wraps it inapplySnapshot, which handles semaphore acquisition separately.refreshSnapshotvalue into a callableEffect.fngenerator; all call sites updated to invoke it asrefreshSnapshot().Effect.geninitialization directly into the generator body.Macroscope summarized 55d88a6.
Note
Low Risk
Low risk refactor focused on Effect wrapper/naming changes; main behavior risk is around
refreshSnapshotnow being invoked as a function, which could affect scheduling if any call site was missed.Overview
Refactors
makeManagedServerProviderto wrap the top-level implementation inEffect.fn("makeManagedServerProvider"), and extracts the snapshot-application and refresh logic into namedEffect.fnhelpers (e.g.applySnapshotBase,refreshSnapshot) for consistent tracing/naming.Updates periodic refresh and exposed
refreshbehavior to callrefreshSnapshot()(now a function returning an Effect) rather than treating it as an Effect value, while keeping the same semaphore-guarded snapshot update and PubSub publish flow.Written by Cursor Bugbot for commit 55d88a6. This will update automatically on new commits. Configure here.