refactor(config): pin runtime snapshot and drop ttl cache

This commit is contained in:
Peter Steinberger
2026-03-29 22:56:35 +01:00
parent 22ffe7b1de
commit 168ab94eee
26 changed files with 213 additions and 404 deletions

View File

@@ -30,7 +30,7 @@ vi.mock("../../runtime.js", () => ({
}));
const { runDaemonInstall } = await import("./install.js");
const { clearConfigCache } = await import("../../config/config.js");
const { clearConfigCache, clearRuntimeConfigSnapshot } = await import("../../config/config.js");
async function readJson(filePath: string): Promise<Record<string, unknown>> {
return JSON.parse(await fs.readFile(filePath, "utf8")) as Record<string, unknown>;
@@ -64,6 +64,7 @@ describe("runDaemonInstall integration", () => {
beforeEach(async () => {
vi.clearAllMocks();
resetRuntimeCapture();
clearRuntimeConfigSnapshot();
// Keep these defined-but-empty so dotenv won't repopulate from local .env.
process.env.OPENCLAW_GATEWAY_TOKEN = "";
process.env.OPENCLAW_GATEWAY_PASSWORD = "";