feat: make Kafka projector the Workbench realtime authority

This commit is contained in:
root
2026-07-10 05:23:03 +02:00
parent a685be0b78
commit ce83ffdf49
74 changed files with 7746 additions and 9863 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ import {
parseArgs
} from "./dev-runtime-migration.mjs";
import {
CLOUD_CORE_MIGRATION_ID,
CLOUD_RUNTIME_DURABLE_MIGRATION_ID,
CLOUD_RUNTIME_DURABLE_ADAPTER_SCHEMA_VERSION,
CLOUD_RUNTIME_DURABLE_TABLE_COLUMNS
} from "../../internal/db/schema.ts";
@@ -60,7 +60,7 @@ test("cloud-api image migration entrypoint exposes the same non-secret source ch
assert.equal(report.actions.liveDbWriteAttempted, false);
assert.equal(report.safety.printsSecretValues, false);
assert.equal(report.safety.dbUrlValueRedacted, true);
assert.equal(report.migration.id, CLOUD_CORE_MIGRATION_ID);
assert.equal(report.migration.id, CLOUD_RUNTIME_DURABLE_MIGRATION_ID);
assert.equal(JSON.stringify(report).includes("secret-password"), false);
assert.equal(JSON.stringify(report).includes("db.example.test"), false);
});
@@ -306,7 +306,7 @@ test("apply mode records ledger and verifies durable runtime readiness", async (
assert.equal(report.gates.schema.status, "ready");
assert.equal(report.gates.migration.status, "ready");
assert.equal(report.gates.readiness.status, "ready");
assert.equal(report.runtime.migration.appliedMigrationId, CLOUD_CORE_MIGRATION_ID);
assert.equal(report.runtime.migration.appliedMigrationId, CLOUD_RUNTIME_DURABLE_MIGRATION_ID);
assert.equal(report.runtime.migration.appliedSchemaVersion, CLOUD_RUNTIME_DURABLE_ADAPTER_SCHEMA_VERSION);
assert.ok(queryClient.calls.some((call) => call.sql === "BEGIN"));
assert.ok(queryClient.calls.some((call) => call.sql.includes("INSERT INTO hwlab_schema_migrations")));
@@ -448,7 +448,7 @@ function createFakeQueryClient({ migrationReady, countErrorCode = null, migratio
rows: state.migrationReady
? [
{
id: CLOUD_CORE_MIGRATION_ID,
id: CLOUD_RUNTIME_DURABLE_MIGRATION_ID,
schema_version: CLOUD_RUNTIME_DURABLE_ADAPTER_SCHEMA_VERSION
}
]