Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a blocked .git read no longer wedges the server during the session scan #15977

Closedazgul(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/15977/headopened View on GitHub

Showing 4 changed files with 158 additions and 6 deletions (loading 1).

x
0 of 4 viewed, 4 left
62 additions and 0 deletionsapps/server/src/project/AgentSessionScanner.test.tsModified
View file
@@ -1,3 +1,6 @@
+// @effect-diagnostics nodeBuiltinImport:off - FileSystem cannot create a FIFO.
+import * as NodeChildProcess from "node:child_process";
+import * as NodeFS from "node:fs";
import * as NodeServices from "@effect/platform-node/NodeServices";
import * as NodeOS from "node:os";
import { describe, expect, it } from "@effect/vitest";
@@ -8,6 +11,7 @@
ProviderInstanceId,
type ServerSettings as ContractServerSettings,
} from "@t3tools/contracts";
+import { HostProcessPlatform } from "@t3tools/shared/hostProcess";
import { symlinksSupported } from "@t3tools/shared/testing/symlinks";
import * as Effect from "effect/Effect";
import * as FileSystem from "effect/FileSystem";
@@ -3194,3 +3198,61 @@
expect(thread?.messages.at(-1)?.text).toBe("Assistant update 249");
+​
+// Real clock: a parked open() never returns, so only a wall-clock timeout ends a scan.
+describe("scan with a git config whose open() never returns", () => {
+ it.live.skipIf(HostProcessPlatform.defaultValue() === "win32")(
+ "returns without a remote and leaves the thread pool usable",
+ () =>
+ Effect.gen(function* () {
+ const fileSystem = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const claudeHomePath = yield* makeTempDir("t3code-claude-home-");