feat: declare HWLAB production release lane

This commit is contained in:
Codex
2026-07-15 05:15:19 +02:00
parent 407ca55c70
commit cbc175014e
7 changed files with 171 additions and 4 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ import { runCommand, type CommandResult } from "./command";
import { resolveCliChildJsonCommandResult } from "./cli-child-json-recovery";
import { resolveAgentRunLaneTarget, type AgentRunLaneSpec } from "./agentrun-lanes";
import { resolveSecretSourceRoot } from "./agentrun/secrets";
import { hwlabRuntimeLaneSpecForNode, isHwlabRuntimeLane, type HwlabRuntimeLane, type HwlabRuntimeLaneSpec } from "./hwlab-node-lanes";
import { hwlabRuntimeLaneIds, hwlabRuntimeLaneSpecForNode, isHwlabRuntimeLane, type HwlabRuntimeLane, type HwlabRuntimeLaneSpec } from "./hwlab-node-lanes";
import { parseEnvFile, sha256Fingerprint, shQuote } from "./platform-infra-ops-library";
type FakeModelProviderAction = "plan" | "materialize" | "apply" | "status" | "smoke";
@@ -149,7 +149,7 @@ function parseFakeModelProviderOptions(args: string[]): FakeModelProviderOptions
const node = requiredOption(args, "--node");
if (!/^[A-Z][A-Z0-9_-]*$/u.test(node)) throw new Error("--node must be a simple node id such as NC01");
const laneRaw = requiredOption(args, "--lane");
if (!isHwlabRuntimeLane(laneRaw)) throw new Error(`--lane must be one of v02, v03; got ${laneRaw}`);
if (!isHwlabRuntimeLane(laneRaw)) throw new Error(`--lane must be one of ${hwlabRuntimeLaneIds().join(", ")}; got ${laneRaw}`);
const provider = optionValue(args, "--provider") ?? "fake-echo";
if (!/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/u.test(provider)) throw new Error("--provider must be a Kubernetes-safe id");
const confirm = args.includes("--confirm");
+15
View File
@@ -78,6 +78,11 @@ export interface HwlabRuntimeExternalPostgresRuntimeAccessSpec {
readonly port: number;
}
export interface HwlabRuntimeExternalPostgresMigrationLedgerSpec {
readonly identity: string;
readonly table: string;
}
export interface HwlabRuntimeExternalPostgresSpec {
readonly provider: string;
readonly configRef: string;
@@ -87,6 +92,7 @@ export interface HwlabRuntimeExternalPostgresSpec {
readonly runtimeAccess?: HwlabRuntimeExternalPostgresRuntimeAccessSpec;
readonly sslmode: "require";
readonly database: string;
readonly migrationLedger: HwlabRuntimeExternalPostgresMigrationLedgerSpec;
readonly cloudApi: HwlabRuntimeExternalPostgresComponentSpec;
readonly openfga: HwlabRuntimeExternalPostgresComponentSpec;
}
@@ -1415,6 +1421,14 @@ function externalPostgresRuntimeAccessConfig(value: unknown, path: string): Hwla
};
}
function externalPostgresMigrationLedgerConfig(value: unknown, path: string): HwlabRuntimeExternalPostgresMigrationLedgerSpec {
const raw = asRecord(value, path);
return {
identity: stringField(raw, "identity", path),
table: stringField(raw, "table", path),
};
}
function externalPostgresConfig(value: unknown, path: string): HwlabRuntimeExternalPostgresSpec | undefined {
if (value === undefined) return undefined;
const raw = asRecord(value, path);
@@ -1429,6 +1443,7 @@ function externalPostgresConfig(value: unknown, path: string): HwlabRuntimeExter
...(raw.runtimeAccess === undefined ? {} : { runtimeAccess: externalPostgresRuntimeAccessConfig(raw.runtimeAccess, `${path}.runtimeAccess`) }),
sslmode,
database: stringField(raw, "database", path),
migrationLedger: externalPostgresMigrationLedgerConfig(raw.migrationLedger, `${path}.migrationLedger`),
cloudApi: externalPostgresComponentConfig(raw.cloudApi, `${path}.cloudApi`),
openfga: externalPostgresComponentConfig(raw.openfga, `${path}.openfga`),
};
+1 -1
View File
@@ -600,7 +600,7 @@ export function parseNodeObservabilityOptions(args: string[]): NodeObservability
const node = requiredOption(args, "--node");
assertNodeId(node);
const laneRaw = requiredOption(args, "--lane");
if (!isHwlabRuntimeLane(laneRaw)) throw new Error(`--lane must be one of v02, v03; got ${laneRaw}`);
if (!isHwlabRuntimeLane(laneRaw)) throw new Error(`--lane must be one of ${hwlabRuntimeLaneIds().join(", ")}; got ${laneRaw}`);
const confirm = args.includes("--confirm");
const dryRun = args.includes("--dry-run");
if (confirm && dryRun) throw new Error("observability accepts only one of --confirm or --dry-run");
+2 -1
View File
@@ -55,7 +55,7 @@ export function parseNodeScopedDelegatedOptions(domain: DelegatedNodeDomain, arg
const node = requiredOption(args, "--node");
assertNodeId(node);
const laneRaw = requiredOption(args, "--lane");
if (!isHwlabRuntimeLane(laneRaw)) throw new Error(`--lane must be one of v02, v03; got ${laneRaw}`);
if (!isHwlabRuntimeLane(laneRaw)) throw new Error(`--lane must be one of ${hwlabRuntimeLaneIds().join(", ")}; got ${laneRaw}`);
const spec = hwlabRuntimeLaneSpecForNode(laneRaw, node);
const confirm = args.includes("--confirm");
const dryRun = args.includes("--dry-run");
@@ -201,6 +201,7 @@ export function nodeRuntimeExpected(spec: HwlabRuntimeLaneSpec): Record<string,
runtimeAccess: spec.externalPostgres.runtimeAccess ?? null,
sslmode: spec.externalPostgres.sslmode,
database: spec.externalPostgres.database,
migrationLedger: spec.externalPostgres.migrationLedger,
cloudApi: {
secretName: spec.externalPostgres.cloudApi.secretName,
secretKey: spec.externalPostgres.cloudApi.secretKey,