fix: add durable cloud api runtime adapter

This commit is contained in:
Code Queue Review
2026-05-22 18:27:12 +00:00
parent dcb496bf95
commit b775aba196
20 changed files with 1543 additions and 43 deletions
+4
View File
@@ -96,6 +96,10 @@ async function run() {
assert.equal(health.body.runtime.durable, false);
assert.equal(health.body.runtime.status, "degraded");
assert.match(health.body.runtime.reason, /process-local/u);
assert.equal(health.body.readiness.components.db, "blocked");
assert.equal(health.body.readiness.components.runtime, "waiting_for_db");
assert.ok(health.body.blockerCodes.includes("db_runtime_config_blocked"));
assert.ok(health.body.blockerCodes.includes("runtime_durable_adapter_missing"));
logOk("health degraded DB contract");
const v1 = await requestJson(`${baseUrl}/v1`);
+2 -1
View File
@@ -545,6 +545,8 @@ function dockerfile(baseImage, port) {
"ENV PORT=$PORT",
"ENV HWLAB_PORT=$HWLAB_PORT",
"COPY package.json ./package.json",
"COPY package-lock.json* ./",
"RUN if [ -f package-lock.json ]; then npm ci --omit=dev --ignore-scripts; else npm install --omit=dev --ignore-scripts; fi",
"COPY internal ./internal",
"COPY cmd ./cmd",
"COPY web ./web",
@@ -766,7 +768,6 @@ async function buildService({ args, repo, commitId, shortCommit, service }) {
const argsList = [
"build",
"--pull=false",
"--network=none",
"--quiet",
"--build-arg",
`BASE_IMAGE=${args.baseImage}`
+4
View File
@@ -176,10 +176,14 @@ assert.equal(cloudApi.env.HWLAB_CLOUD_DB_SERVICE_NAME, DEV_DB_ENV_CONTRACT.dns.s
assert.equal(cloudApi.env.HWLAB_CLOUD_DB_SERVICE_NAMESPACE, DEV_DB_ENV_CONTRACT.dns.namespace, "cloud-api DB service namespace");
assert.equal(cloudApi.env.HWLAB_CLOUD_DB_HOST, DEV_DB_ENV_CONTRACT.dns.host, "cloud-api DB stable host");
assert.equal(cloudApi.env.HWLAB_CLOUD_DB_PORT, String(DEV_DB_ENV_CONTRACT.dns.port), "cloud-api DB stable port");
assert.equal(cloudApi.env.HWLAB_CLOUD_RUNTIME_ADAPTER, "postgres", "cloud-api runtime durable adapter");
assert.equal(cloudApi.env.HWLAB_CLOUD_RUNTIME_DURABLE, "true", "cloud-api runtime durable flag");
assert.equal(cloudApiWorkloadEnv.HWLAB_CLOUD_DB_SERVICE_NAME?.value, DEV_DB_ENV_CONTRACT.dns.serviceName, "cloud-api workload DB service name");
assert.equal(cloudApiWorkloadEnv.HWLAB_CLOUD_DB_SERVICE_NAMESPACE?.value, DEV_DB_ENV_CONTRACT.dns.namespace, "cloud-api workload DB service namespace");
assert.equal(cloudApiWorkloadEnv.HWLAB_CLOUD_DB_HOST?.value, DEV_DB_ENV_CONTRACT.dns.host, "cloud-api workload DB host");
assert.equal(cloudApiWorkloadEnv.HWLAB_CLOUD_DB_PORT?.value, String(DEV_DB_ENV_CONTRACT.dns.port), "cloud-api workload DB port");
assert.equal(cloudApiWorkloadEnv.HWLAB_CLOUD_RUNTIME_ADAPTER?.value, "postgres", "cloud-api workload runtime durable adapter");
assert.equal(cloudApiWorkloadEnv.HWLAB_CLOUD_RUNTIME_DURABLE?.value, "true", "cloud-api workload runtime durable flag");
assertCloudApiDbDnsContract(k8sServices, cloudApi.env);
assert.equal(cloudApi.env.HWLAB_CODE_AGENT_PROVIDER, "openai", "cloud-api Code Agent provider");
assert.equal(cloudApi.env.HWLAB_CODE_AGENT_MODEL, DEV_CODE_AGENT_PROVIDER_CONTRACT.model, "cloud-api Code Agent model");