Skip to content

Commit 460b46b

Browse files
committed
fix: restore Effect.forkScoped for background upstream refresh
The merge from main incorrectly replaced Effect.forkScoped with Effect.sync(() => { Effect.runFork(...) }), which creates a bare runtime with no service layers. refreshCheckedOutBranchUpstream calls executeGit, which depends on ChildProcessSpawner and other contextual services that are unavailable under a naked Effect.runFork. The error was silently swallowed by Effect.ignoreCause, causing stale upstream tracking data after every branch checkout.
1 parent 6ee71f3 commit 460b46b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

apps/server/src/git/Layers/GitCore.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,11 +1941,9 @@ export const makeGitCore = Effect.fn("makeGitCore")(function* (options?: {
19411941
});
19421942

19431943
// Refresh upstream refs in the background so checkout remains responsive.
1944-
yield* Effect.sync(() => {
1945-
Effect.runFork(
1946-
refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.ignoreCause({ log: true })),
1947-
);
1948-
});
1944+
yield* Effect.forkScoped(
1945+
refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.ignoreCause({ log: true })),
1946+
);
19491947
},
19501948
);
19511949

0 commit comments

Comments
 (0)