fix(workbench): delegate L2 runtime policy to owning YAML

This commit is contained in:
root
2026-07-23 07:55:01 +02:00
parent 551ee2bdfd
commit 8c907103be
2 changed files with 11 additions and 5 deletions
+11 -2
View File
@@ -27,6 +27,17 @@ test("v03 Workbench API declares its preferred Bun idle timeout in owning YAML",
assert.equal(service.env?.WORKBENCH_API_IDLE_TIMEOUT_SECONDS, "60");
});
test("v03 delegates L2 Workbench debug and empty-session policy to the owning runtime YAML", async () => {
const deploy = parseYaml(await readFile("deploy/deploy.yaml", "utf8"));
const cloudApi = deploy.lanes.v03.serviceDeclarations["hwlab-cloud-api"];
const cloudWeb = deploy.lanes.v03.serviceDeclarations["hwlab-cloud-web"];
assert.ok(cloudApi, "missing v03 hwlab-cloud-api service declaration");
assert.ok(cloudWeb, "missing v03 hwlab-cloud-web service declaration");
assert.equal(cloudApi.env?.HWLAB_WORKBENCH_KAFKA_DEBUG_REPLAY_ENABLED, undefined);
assert.equal(cloudApi.env?.HWLAB_WORKBENCH_EMPTY_SESSION_GC_ENABLED, undefined);
assert.equal(cloudWeb.env?.HWLAB_WORKBENCH_KAFKA_DEBUG_REPLAY_ENABLED, undefined);
});
test("production migration uses its YAML-declared database Secret key", async () => {
const deploy = parseYaml(await readFile("deploy/deploy.yaml", "utf8"));
assert.deepEqual(deploy.lanes.production.workbench.rawHwlabEventWindow, {
@@ -713,7 +724,6 @@ test("v03 render keeps node identity as data instead of generated structure", as
assert.equal(cloudApiEnv.get("HWLAB_KAFKA_TRANSACTIONAL_PROJECTOR_ENABLED"), "false");
assert.equal(cloudApiEnv.get("HWLAB_KAFKA_PROJECTION_OUTBOX_RELAY_ENABLED"), "false");
assert.equal(cloudApiEnv.get("HWLAB_WORKBENCH_PROJECTION_REALTIME_ENABLED"), "false");
assert.equal(cloudApiEnv.get("HWLAB_WORKBENCH_KAFKA_DEBUG_REPLAY_ENABLED"), "true");
assert.equal(cloudApiEnv.get("HWLAB_KAFKA_BOOTSTRAP_SERVERS"), "platform-infra-kafka-kafka-bootstrap.platform-infra.svc.cluster.local:9092");
assert.equal(cloudApiEnv.get("HWLAB_KAFKA_STDIO_TOPIC"), "codex-stdio.raw.v1");
assert.equal(cloudApiEnv.get("HWLAB_KAFKA_AGENTRUN_EVENT_TOPIC"), "agentrun.event.v1");
@@ -747,7 +757,6 @@ test("v03 render keeps node identity as data instead of generated structure", as
assert.equal(cloudWebEnv.get("HWLAB_WORKBENCH_LIVE_KAFKA_SSE_ENABLED"), "true");
assert.equal(cloudWebEnv.get("HWLAB_WORKBENCH_KAFKA_REFRESH_REPLAY_ENABLED"), "true");
assert.equal(cloudWebEnv.get("HWLAB_WORKBENCH_PROJECTION_REALTIME_ENABLED"), "false");
assert.equal(cloudWebEnv.get("HWLAB_WORKBENCH_KAFKA_DEBUG_REPLAY_ENABLED"), "true");
assert.equal(cloudWebEnv.get("HWLAB_WORKBENCH_RAW_HWLAB_EVENT_WINDOW_ENABLED"), "1");
assert.equal(cloudWebEnv.get("HWLAB_WORKBENCH_RAW_HWLAB_EVENT_WINDOW_MAX_ENTRIES"), "200");
assert.equal(cloudWebEnv.get("HWLAB_WORKBENCH_RAW_HWLAB_EVENT_WINDOW_MAX_RETAINED_BYTES"), "1048576");