feat: add tui recovery state machine
This commit is contained in:
@@ -50,6 +50,26 @@ describe("config loader", () => {
|
||||
});
|
||||
|
||||
expect(config.backends).toContainEqual({ id: "fake", enabled: true });
|
||||
expect(config.SESSION_MAX_HUNG_MS).toBe(20 * 60 * 1000);
|
||||
});
|
||||
|
||||
it("loads configurable session hung timeout", () => {
|
||||
const root = mkdtempSync(join(tmpdir(), "devflow-config-"));
|
||||
const workspace = join(root, "workspace");
|
||||
mkdirSync(workspace);
|
||||
|
||||
const config = loadConfigFromSources({
|
||||
cwd: root,
|
||||
env: {
|
||||
DATABASE_URL: "postgres://devflow:devflow@localhost:5432/devflow",
|
||||
WORKSPACE_ROOT: workspace,
|
||||
LOG_LEVEL: "info",
|
||||
TEMPORAL_ADDRESS: "localhost:7233",
|
||||
SESSION_MAX_HUNG_MS: "2500",
|
||||
},
|
||||
});
|
||||
|
||||
expect(config.SESSION_MAX_HUNG_MS).toBe(2500);
|
||||
});
|
||||
|
||||
it("resolves backend binaries from PATH during config load", () => {
|
||||
|
||||
@@ -22,6 +22,11 @@ const RawConfigSchema = z.object({
|
||||
LOG_LEVEL: LogLevel,
|
||||
TEMPORAL_ADDRESS: z.string().min(1),
|
||||
MAX_CONCURRENT_RUNS: z.coerce.number().int().positive().default(4),
|
||||
SESSION_MAX_HUNG_MS: z.coerce
|
||||
.number()
|
||||
.int()
|
||||
.positive()
|
||||
.default(20 * 60 * 1000),
|
||||
backends: z.array(BackendConfig).default([{ id: "fake", enabled: true }]),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user