feat: add temporal run engine integration

This commit is contained in:
chungyeong
2026-05-13 08:39:19 +09:00
parent 78ebd5ef78
commit aa3033771a
37 changed files with 7338 additions and 224 deletions

View File

@@ -17,6 +17,7 @@ describe("config loader", () => {
"DATABASE_URL=postgres://env:env@localhost:5432/env",
"WORKSPACE_ROOT=workspace",
"LOG_LEVEL=warn",
"TEMPORAL_ADDRESS=localhost:7233",
].join("\n"),
);
writeFileSync(join(root, ".env.local"), "LOG_LEVEL=debug\n");
@@ -44,6 +45,7 @@ describe("config loader", () => {
DATABASE_URL: "postgres://devflow:devflow@localhost:5432/devflow",
WORKSPACE_ROOT: workspace,
LOG_LEVEL: "info",
TEMPORAL_ADDRESS: "localhost:7233",
},
});
@@ -66,6 +68,7 @@ describe("config loader", () => {
DATABASE_URL: "postgres://devflow:devflow@localhost:5432/devflow",
WORKSPACE_ROOT: workspace,
LOG_LEVEL: "info",
TEMPORAL_ADDRESS: "localhost:7233",
PATH: binDir,
DEVFLOW_BACKENDS_JSON: JSON.stringify([{ id: "codex", enabled: true }]),
},
@@ -90,6 +93,7 @@ describe("config loader", () => {
DATABASE_URL: "postgres://devflow:devflow@localhost:5432/devflow",
WORKSPACE_ROOT: workspace,
LOG_LEVEL: "info",
TEMPORAL_ADDRESS: "localhost:7233",
PATH: emptyBin,
DEVFLOW_BACKENDS_JSON: JSON.stringify([{ id: "codex", enabled: true }]),
},
@@ -125,6 +129,23 @@ describe("config loader", () => {
expect((caught as DevflowError).cause).toBeDefined();
});
it("requires TEMPORAL_ADDRESS at M5", () => {
const root = mkdtempSync(join(tmpdir(), "devflow-config-"));
const workspace = join(root, "workspace");
mkdirSync(workspace);
expect(() =>
loadConfigFromSources({
cwd: root,
env: {
DATABASE_URL: "postgres://devflow:devflow@localhost:5432/devflow",
WORKSPACE_ROOT: workspace,
LOG_LEVEL: "info",
},
}),
).toThrow(DevflowError);
});
it("classifies malformed backend JSON as invalid config", () => {
const root = mkdtempSync(join(tmpdir(), "devflow-config-"));
const workspace = join(root, "workspace");
@@ -137,6 +158,7 @@ describe("config loader", () => {
DATABASE_URL: "postgres://devflow:devflow@localhost:5432/devflow",
WORKSPACE_ROOT: workspace,
LOG_LEVEL: "info",
TEMPORAL_ADDRESS: "localhost:7233",
DEVFLOW_BACKENDS_JSON: "{",
},
}),
@@ -154,6 +176,7 @@ describe("config loader", () => {
DATABASE_URL: "postgres://devflow:devflow@localhost:5432/devflow",
WORKSPACE_ROOT: workspace,
LOG_LEVEL: "info",
TEMPORAL_ADDRESS: "localhost:7233",
},
});