Refactor Codex adapter lifecycle helpers#1478
Merged
juliusmarminge merged 2 commits intomainfrom Mar 28, 2026
Merged
Conversation
- Split adapter setup into named Effect.fn helpers - Keep listener registration and cleanup explicit
|
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 |
- Replace `sendTurn` parameter inference with `ProviderSendTurnInput` - Keep attachment resolution aligned with shared contracts
frittlechasm
added a commit
to frittlechasm/t3code
that referenced
this pull request
Mar 28, 2026
Reverts all 10 commits pulled from upstream (add5f34 through 1ae20fa) including our local classifySqliteError fix. Upstream introduced a classifySqliteError import that does not exist in effect@4.0.0-beta.42. Reverting until upstream resolves the version mismatch. Reverted commits: - 1ae20fa fix(persistence): revert classifySqliteError to SqlError({ cause, message }) - 23b3f0c Refactor Codex adapter lifecycle helpers (pingdotgg#1478) - e08cea3 Improve drain semantics via STM in DrainableWorker (pingdotgg#1474) - 83eb396 fix(threads): Keep active-turn runtime errors from ending sessions (pingdotgg#1261) - 59a383e Add Effect.fn refactor checklist (pingdotgg#1476) - fb72607 fix(claude): avoid resetting the Claude model on every turn (pingdotgg#1466) - d8a485e Support gh pr checkout pull request references (pingdotgg#1457) - 02989fe fix(web): improve chat header badge and title flex distribution (pingdotgg#1309) - 648f067 Add VS Code Insiders and VSCodium to Open In editor picker (pingdotgg#1392) - add5f34 Add Claude context window selection support (pingdotgg#1422)
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
Why
UI Changes
Checklist
Note
Low Risk
Refactor-only change in the Codex provider adapter; primary risk is subtle lifecycle/cleanup differences around manager acquisition and event listener registration/shutdown.
Overview
Refactors
apps/server/src/provider/Layers/CodexAdapter.tsto breakmakeCodexAdapterinto namedEffect.fnhelpers, improving stack traces and making the lifecycle steps more explicit.This extracts helpers for manager acquisition (
acquireManager), attachment loading/encoding (resolveAttachmentused bysendTurn), and event listener registration/cleanup (registerListener/unregisterListenerpluswriteNativeEvent), while keeping the adapter’s public operations and error mapping behavior the same.Written by Cursor Bugbot for commit 9b9c9b3. This will update automatically on new commits. Configure here.
Note
Refactor
CodexAdapterlifecycle helpers into namedEffect.fngeneratorsRestructures CodexAdapter.ts to use named
Effect.fngenerators throughout, improving traceability in Effect traces.acquireManageras a standalone helper that resolves an existing manager from options or constructs one viaCodexAppServerManagerresolveAttachmenthelper to consolidate inline file-reading logic fromsendTurn, usingEffect.forEachwith concurrency 1registerListenerandunregisterListeneras named helpers wired viaEffect.acquireRelease, and addswriteNativeEventto isolate native event loggingMacroscope summarized 9b9c9b3.