Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): session import no longer offers T3 sandbox chats behind a symlinked base or a Codex project #42036

Mergedjuliusmarmingemerged 4 commits intomain fromrefs/pull/42036/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 177 additions and 0 deletions (loading 1).

x
0 of 2 viewed, 2 left
177 additions and 0 deletionsapps/server/src/project/AgentSessionScanner.test.tsModified
View file
@@ -1345,6 +1345,60 @@
+ it.effect("excludes sandboxes recorded by their real path when the base dir is a symlink", () =>
+ Effect.gen(function* () {
+ const path = yield* Path.Path;
+ const fileSystem = yield* FileSystem.FileSystem;
+ const claudeHomePath = yield* makeTempDir("t3code-claude-home-");
+ const codexHomePath = yield* makeTempDir("t3code-codex-home-");
+ const realBaseDir = yield* fileSystem.realPath(yield* makeTempDir("t3code-scanner-base-"));
+ const linkParent = yield* makeTempDir("t3code-scanner-links-");
+ const configBaseDir = path.join(linkParent, "t3-home");
+ yield* fileSystem.symlink(realBaseDir, configBaseDir);
+​
+ const worktreeCwd = path.join(realBaseDir, "worktrees", "t3code", "wt-4");
+ yield* fileSystem.makeDirectory(worktreeCwd, { recursive: true });
+ yield* writeTranscript({
+ filePath: path.join(claudeHomePath, "projects", "-slug", "a.jsonl"),
+ contents: claudeSessionLine(worktreeCwd),
+ mtimeMs: Date.parse("2026-01-01T00:00:00.000Z"),
+ });
+​
+ const result = yield* runScan({ claudeHomePath, codexHomePath, configBaseDir });
+​
+ expect(result.candidates).toEqual([]);
+ }),
+ );
+​
+ it.effect("offers an outside project reached through a link inside a symlinked base dir", () =>