@devries-cameron20 / t3code Mirror · read-only / commits / d90e15d1d7
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 06:15 UTC

fix(server): extend negative repository identity cache ttl (#2083)

m9d5m committed Apr 16, 2026 at 16:57 UTC d90e15d1d7ecba302d6977315977d5c2a748bf36
2 files changed +6 -4
apps/server/src/project/Layers/RepositoryIdentityResolver.test.ts
+5 -3
@@ -140,7 +140,7 @@ it.layer(NodeServices.layer)("RepositoryIdentityResolverLive", (it) => {
140 );
141
142 it.effect(
143 - "refreshes cached null identities after the negative TTL when a remote is configured later",
143 + "keeps null identities cached across repeated resolves until the negative TTL expires",
144 () =>
145 Effect.gen(function* () {
146 const fileSystem = yield* FileSystem.FileSystem;
@@ -156,8 +156,10 @@ it.layer(NodeServices.layer)("RepositoryIdentityResolverLive", (it) => {
156
157 yield* git(cwd, ["remote", "add", "origin", "git@github.com:T3Tools/t3code.git"]);
158
159 - const cachedIdentity = yield* resolver.resolve(cwd);
160 - expect(cachedIdentity).toBeNull();
159 + for (const _attempt of [1, 2, 3]) {
160 + const cachedIdentity = yield* resolver.resolve(cwd);
161 + expect(cachedIdentity).toBeNull();
162 + }
163
164 yield* TestClock.adjust(Duration.millis(120));
165
apps/server/src/project/Layers/RepositoryIdentityResolver.ts
+1 -1
@@ -68,7 +68,7 @@ function buildRepositoryIdentity(input: {
68
69 const DEFAULT_REPOSITORY_IDENTITY_CACHE_CAPACITY = 512;
70 const DEFAULT_POSITIVE_CACHE_TTL = Duration.minutes(1);
71 -const DEFAULT_NEGATIVE_CACHE_TTL = Duration.seconds(10);
71 +const DEFAULT_NEGATIVE_CACHE_TTL = Duration.minutes(1);
72
73 interface RepositoryIdentityResolverOptions {
74 readonly cacheCapacity?: number;