Skip to content

Annotate Git core Effect.fn helpers#1511

Merged
juliusmarminge merged 8 commits intomainfrom
feature/codex-adapter-fn-checklist
Mar 29, 2026
Merged

Annotate Git core Effect.fn helpers#1511
juliusmarminge merged 8 commits intomainfrom
feature/codex-adapter-fn-checklist

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 29, 2026

Summary

  • Annotated Git core helper functions with named Effect.fn wrappers to improve traceability and consistency.
  • Refactored GitCore and GitManager internals without changing the underlying git behavior.
  • Marked the Codex adapter Effect.fn checklist as complete in docs/effect-fn-checklist.md.

Testing

  • Not run (PR content only).
  • No runtime behavior changes were exercised locally.
  • Existing project checks should still be run before merge: bun fmt, bun lint, bun typecheck, and bun run test.

Note

Medium Risk
Mostly a refactor for Effect tracing, but it touches core git execution/control flow and changes makeGitCore/makeGitManager from Effect values to factory functions, which can break wiring or subtly affect progress/error reporting.

Overview
Refactors GitCore and GitManager to use named Effect.fn("...") wrappers across most internal helpers (and extracts a few previously inline generators), improving traceability in Effect traces/logs.

Changes construction semantics by converting makeGitCore and makeGitManager from Effect.gen values into factory functions returning effects, updating call sites (GitManager.test.ts, GitManagerLive) accordingly.

Includes a small behavioral fix in GitCore.commit progress handling to preserve existing onStdoutLine/onStderrLine callbacks when onOutputLine isn’t provided, and updates the Effect.fn checklist doc.

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

Note

Annotate Git core helpers with named Effect.fn for tracing

  • Wraps functions in GitCore.ts and GitManager.ts with Effect.fn(name) to add named tracing spans to all major git operations.
  • Extracts several inline generators into named helper functions (e.g. handleTraceLine, emitCompleteLines, runGitCommand) with no logic changes.
  • Fixes makeGitManager call site in GitManager.test.ts and the GitManagerLive layer to invoke makeGitManager() as a function rather than referencing it as a value.
  • Behavioral Change: GitCore.commit now preserves existing onStdoutLine/onStderrLine progress fields when onOutputLine is not provided, fixing a prior silent drop of those fields.

Macroscope summarized aa4eb6d.

- Update the checklist entries for `CodexAdapter.ts`
- Mark the remaining nested callback wrappers as done
- Name Effect.fn helpers in GitCore for clearer traces
- Update the effect function checklist docs
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

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: 7bd9cc92-164f-4cac-ab9b-7e3b3b5032a5

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 feature/codex-adapter-fn-checklist

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

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 29, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Changing makeGitManager from Effect to function breaks caller
    • Changed makeGitManager.pipe( to makeGitManager().pipe( in GitManager.test.ts to correctly invoke the function before piping, matching the Effect.fn refactor.

Create PR

Or push these changes by commenting:

@cursor push 8164f0390f
Preview (8164f0390f)
diff --git a/apps/server/src/git/Layers/GitManager.test.ts b/apps/server/src/git/Layers/GitManager.test.ts
--- a/apps/server/src/git/Layers/GitManager.test.ts
+++ b/apps/server/src/git/Layers/GitManager.test.ts
@@ -525,7 +525,7 @@
     serverSettingsLayer,
   ).pipe(Layer.provideMerge(NodeServices.layer));
 
-  return makeGitManager.pipe(
+  return makeGitManager().pipe(
     Effect.provide(managerLayer),
     Effect.map((manager) => ({ manager, ghCalls })),
   );

@juliusmarminge juliusmarminge merged commit 7f3387a into main Mar 29, 2026
11 checks passed
@juliusmarminge juliusmarminge deleted the feature/codex-adapter-fn-checklist branch March 29, 2026 05:35
Chrono-byte pushed a commit to Chrono-byte/t3code that referenced this pull request Mar 31, 2026
xddinside pushed a commit to xddinside/t3code that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 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