Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep Codex SQLite state in one home #19861

ClosedTimpan4(GitHub profile, opens in a new tab)wants to merge 12 commits intomain fromrefs/pull/19861/headopened View on GitHub

Showing 17 changed files with 167 additions and 4 deletions (loading 14).

x
0 of 17 viewed, 17 left
115 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.test.tsModified
View file
@@ -63,6 +63,7 @@
import * as ProviderReplayHarness from "../testkit/ProviderReplayHarness.ts";
import * as ProviderAdapter from "@t3tools/provider-core/server/ProviderAdapter";
import type * as ProviderContinuationRequests from "@t3tools/provider-core/server/ProviderContinuationRequests";
+import { symlinksSupported } from "@t3tools/shared/testing/symlinks";
import * as CodexAdapterV2 from "./CodexAdapterV2.ts";
import { makeReplayServerConfig, withCodexReplayChildMetadata } from "./CodexAdapterV2.testkit.ts";
import * as CodexAdapterV2Testkit from "./CodexAdapterV2.testkit.ts";
@@ -782,6 +783,120 @@
}).pipe(Effect.provideService(HostProcess.Platform, "linux")),
​
+ it.effect.each(["sqlite", "config"] as const)(
+ "keeps paths in the construction cause, not the public %s error detail",
+ (entry) =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-codex-safe-detail-" });
+ const sharedHome = path.join(root, "shared");
+ const shadowHome = path.join(root, "shadow");
+ yield* fs.makeDirectory(sharedHome);
+ yield* fs.makeDirectory(shadowHome);
+ const name = entry === "sqlite" ? "state_5.sqlite" : "config.toml";
+ const target = path.join(sharedHome, name);
+ const link = path.join(shadowHome, name);
+ yield* fs.writeFileString(target, "shared");
+ if (entry === "sqlite") yield* fs.symlink(target, link);
+ else yield* fs.writeFileString(link, "private config");