Annotate Git core Effect.fn helpers#1511
Conversation
- 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
|
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 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Changing
makeGitManagerfrom Effect to function breaks caller- Changed
makeGitManager.pipe(tomakeGitManager().pipe(in GitManager.test.ts to correctly invoke the function before piping, matching the Effect.fn refactor.
- Changed
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 })),
);

Summary
Effect.fnwrappers to improve traceability and consistency.GitCoreandGitManagerinternals without changing the underlying git behavior.Effect.fnchecklist as complete indocs/effect-fn-checklist.md.Testing
bun fmt,bun lint,bun typecheck, andbun run test.Note
Medium Risk
Mostly a refactor for Effect tracing, but it touches core git execution/control flow and changes
makeGitCore/makeGitManagerfrom Effect values to factory functions, which can break wiring or subtly affect progress/error reporting.Overview
Refactors
GitCoreandGitManagerto use namedEffect.fn("...")wrappers across most internal helpers (and extracts a few previously inline generators), improving traceability in Effect traces/logs.Changes construction semantics by converting
makeGitCoreandmakeGitManagerfromEffect.genvalues into factory functions returning effects, updating call sites (GitManager.test.ts,GitManagerLive) accordingly.Includes a small behavioral fix in
GitCore.commitprogress handling to preserve existingonStdoutLine/onStderrLinecallbacks whenonOutputLineisn’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.fnfor tracingEffect.fn(name)to add named tracing spans to all major git operations.handleTraceLine,emitCompleteLines,runGitCommand) with no logic changes.makeGitManagercall site in GitManager.test.ts and theGitManagerLivelayer to invokemakeGitManager()as a function rather than referencing it as a value.GitCore.commitnow preserves existingonStdoutLine/onStderrLineprogress fields whenonOutputLineis not provided, fixing a prior silent drop of those fields.Macroscope summarized aa4eb6d.