feat: add cloud-api runtime DB image entrypoints

This commit is contained in:
Code Queue Review
2026-05-24 06:10:48 +00:00
parent f4d766c6eb
commit 92c3d200a1
11 changed files with 218 additions and 26 deletions
+38
View File
@@ -215,6 +215,13 @@ function assertDurableRuntimeRunbook(value) {
"Moved:",
"Still blocked:",
"No full M3, M4, or M5 acceptance is allowed while runtime durability is blocked",
"node cmd/hwlab-cloud-api/provision.mjs --check",
"node cmd/hwlab-cloud-api/provision.mjs --dry-run --allow-live-db-read --confirm-dev --report /tmp/hwlab-dev-gate/dev-runtime-provisioning-report.json",
"node cmd/hwlab-cloud-api/provision.mjs --apply --confirm-dev --confirmed-non-production --report /tmp/hwlab-dev-gate/dev-runtime-provisioning-report.json",
"node cmd/hwlab-cloud-api/migrate.mjs --check",
"node cmd/hwlab-cloud-api/migrate.mjs --dry-run --report /tmp/hwlab-dev-gate/dev-runtime-migration-report.json",
"node cmd/hwlab-cloud-api/migrate.mjs --apply --confirm-dev --confirmed-non-production --report /tmp/hwlab-dev-gate/dev-runtime-migration-report.json",
"DEV CD runtime migration Job uses",
"node scripts/dev-runtime-provisioning.mjs --check",
"node scripts/dev-runtime-provisioning.mjs --dry-run --allow-live-db-read --confirm-dev --report /tmp/hwlab-dev-gate/dev-runtime-provisioning-report.json",
"node scripts/dev-runtime-provisioning.mjs --apply --confirm-dev --confirmed-non-production --report /tmp/hwlab-dev-gate/dev-runtime-provisioning-report.json",
@@ -229,6 +236,31 @@ function assertDurableRuntimeRunbook(value) {
}
}
function assertCloudApiImageRuntimeEntrypoints({ packageJson, ciJson, artifactPublisher, devCdApplySource }) {
const label = "cloud-api image runtime maintenance entrypoints";
for (const expected of [
"COPY internal ./internal",
"COPY cmd ./cmd",
"COPY scripts ./scripts",
"COPY package.json ./package.json"
]) {
assertIncludes(artifactPublisher, expected, `${label} artifact publisher`);
}
for (const expected of [
"cmd/hwlab-cloud-api/provision.mjs",
"cmd/hwlab-cloud-api/migrate.mjs"
]) {
assertIncludes(devCdApplySource, expected, `${label} DEV CD job command`);
assertIncludes(packageJson.scripts?.check, `node --check ${expected}`, `${label} package check`);
assertIncludes(packageJson.scripts?.check, `node ${expected} --check`, `${label} package runtime check`);
}
assert.equal(
ciJson.commands?.some((command) => command.run === "npm run check"),
true,
`${label} CI must run npm run check`
);
}
function assertGuardFixture(guard) {
assert.equal(guard.guard, "hwlab-runtime-boundary");
assert.equal(guard.schemaVersion, "v1");
@@ -406,6 +438,12 @@ assertProdDisabled(
await readJSON(guard.requiredK3sSkeleton.prodDisabledPath)
);
assertDurableRuntimeRunbook(await readText("docs/reference/dev-runtime-boundary.md"));
assertCloudApiImageRuntimeEntrypoints({
packageJson: await readJSON("package.json"),
ciJson: await readJSON("CI.json"),
artifactPublisher: await readText("scripts/dev-artifact-publish.mjs"),
devCdApplySource: await readText("scripts/src/dev-cd-apply.mjs")
});
console.log(
`validated HWLAB runtime boundary guard for ${SERVICE_IDS.length} services; forbidden substitutes: ${forbiddenRuntimeSubstitutes.join(", ")}`