Repository navigation
[codex] migrate Effect.fn in apps/server/src/persistence/Layers/Sqlite.ts - #1631
Merged
juliusmarminge merged 3 commits intoApr 1, 2026
Merged
juliusmarminge merged 3 commits into
juliusmarminge merged 3 commits into
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
Contributor
|
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 |
juliusmarminge
marked this pull request as ready for review
April 1, 2026 15:35
juliusmarminge
enabled auto-merge (squash)
April 1, 2026 15:35
juliusmarminge
deleted the
codex/effect-fn-apps-server-src-persistence-layers-sqlite
branch
April 1, 2026 16:14
youpele52
referenced
this pull request
in youpele52/bigbud
Jun 17, 2026
…e.ts (#1631) Co-authored-by: codex <codex@users.noreply.github.com>
NeilTheFisher
pushed a commit
to NeilTheFisher/t3code
that referenced
this pull request
Aug 18, 2026
…e.ts (pingdotgg#1631) 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/persistence/Layers/Sqlite.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
makeRuntimeSqliteLayerandmakeSqlitePersistenceLivetoEffect.fnin Sqlite.tsRefactors two factory functions in Sqlite.ts to use
Effect.fnwith named identifiers instead of plain arrow functions wrappingEffect.gen. Internal logic and runtime behavior are unchanged.Macroscope summarized dfca081.
Note
Low Risk
Low risk refactor limited to
apps/server/src/persistence/Layers/Sqlite.ts, with no logic changes beyond how the effects are wrapped/unwrapped. Main risk is subtle type/Layer unwrapping behavior differences, but the sameLayer.unwrapand effect flow are preserved.Overview
Refactors
apps/server/src/persistence/Layers/Sqlite.tsto wrapmakeRuntimeSqliteLayerandmakeSqlitePersistenceLivewith namedEffect.fngenerators instead of arrow functions returningEffect.gen(...).pipe(Layer.unwrap).Behavior should remain the same (runtime selection between bun/node loaders, setup PRAGMAs/migrations, and layer composition), but the functions now carry explicit Effect names and use the
Effect.fn(..., Layer.unwrap)form.Written by Cursor Bugbot for commit dfca081. This will update automatically on new commits. Configure here.