Skip to content

[codex] migrate Effect.fn in apps/server/src/git/Layers/CodexTextGeneration.ts - #1624

Merged
juliusmarminge merged 2 commits into
mainfrom
codex/effect-fn-apps-server-src-git-layers-codextextgeneration
Apr 1, 2026
Merged

juliusmarminge merged 2 commits into
mainfrom
codex/effect-fn-apps-server-src-git-layers-codextextgeneration

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Apr 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • migrate the remaining () => Effect.gen(...) wrapper in apps/server/src/git/Layers/CodexTextGeneration.ts to Effect.fn
  • keep this PR scoped to a single file as part of the checklist split

Why

  • finish the remaining checklist migrations without batching multiple files into one review
  • keep exact-empty-arg Effect.gen wrappers out of the codebase

Validation

  • bun fmt
  • bun lint
  • packages/shared: bun run test src/DrainableWorker.test.ts
  • apps/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.ts
  • apps/server: bun run test src/orchestration/projector.test.ts
  • apps/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

  • validation was run from the completed checklist scratch branch before splitting these per-file PRs
  • bun run test and bun typecheck at the repo root currently fail in apps/web because @effect/atom-react cannot be resolved
  • apps/server still has unrelated pre-existing typecheck failures outside this file

Note

Migrate Effect.fn named generators in CodexTextGeneration.ts

Refactors three generator functions in CodexTextGeneration.ts to use Effect.fn named generators (materializeImageAttachments, runCodexJson, and runCodexJson.runCodexCommand) instead of anonymous Effect.gen wrappers. The previously inline command-runner logic is extracted into a dedicated named generator runCodexJson.runCodexCommand. Logic and runtime behavior are unchanged.

Macroscope summarized 30757b3.


Note

Low Risk
Pure refactor of Effect wrapper style in CodexTextGeneration.ts with no functional changes to Codex CLI execution, file handling, or decoding logic; low risk aside from potential subtle effect-scoping/invocation differences.

Overview
Refactors apps/server/src/git/Layers/CodexTextGeneration.ts to use named Effect.fn(...) wrappers for materializeImageAttachments, runCodexJson, and the internal runCodexJson.runCodexCommand, replacing inline Effect.gen blocks.

Behavior is intended to be unchanged: temp file creation/cleanup, Codex CLI invocation (including images), timeout handling, and schema decoding remain the same, with the main difference being named effects and explicit invocation of the inner command effect.

Written by Cursor Bugbot for commit 30757b3. This will update automatically on new commits. Configure here.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Apr 1, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 463f525c-00e5-4f42-9129-c3bcce9aa1ae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/effect-fn-apps-server-src-git-layers-codextextgeneration

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Apr 1, 2026
Comment thread apps/server/src/git/Layers/CodexTextGeneration.ts
@juliusmarminge
juliusmarminge marked this pull request as ready for review April 1, 2026 15:51
@juliusmarminge
juliusmarminge enabled auto-merge (squash) April 1, 2026 15:51
@juliusmarminge
juliusmarminge merged commit a58290e into main Apr 1, 2026
16 checks passed
@juliusmarminge
juliusmarminge deleted the codex/effect-fn-apps-server-src-git-layers-codextextgeneration branch April 1, 2026 15:53
youpele52 referenced this pull request in youpele52/bigbud Jun 17, 2026
…ration.ts (#1624)

Co-authored-by: codex <codex@users.noreply.github.com>
NeilTheFisher pushed a commit to NeilTheFisher/t3code that referenced this pull request Aug 18, 2026
…ration.ts (pingdotgg#1624)

Co-authored-by: codex <codex@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 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