feat(lanes): add --qc boot flag + QC_BOOT_ENV for deterministic QC stacks (E1)

This commit is contained in:
2026-08-04 17:51:03 +07:00
parent c37933adfe
commit 31f984c750
6 changed files with 195 additions and 8 deletions
+4 -2
View File
@@ -41,7 +41,7 @@ const {
portBase,
dbName,
} = require("./lane-slots");
const { resolveProfile, profileSearchPaths, runHook } = require("./lane-profile");
const { resolveProfile, profileSearchPaths, parseQcBootEnv, runHook } = require("./lane-profile");
const { isListening, listenerPids } = require("./ports");
const { seedEnv } = require("./lane-env");
const { ensureDatabase, dropDatabase } = require("./lane-services");
@@ -343,7 +343,7 @@ async function removeLaneData(lane, profile, options = {}) {
*/
async function upLane(lane, options = {}) {
const profile = requireProfile(lane);
const { build = true, onLine } = options;
const { build = true, qc = false, onLine } = options;
let current = lane;
if (!current.slot) {
@@ -374,9 +374,11 @@ async function upLane(lane, options = {}) {
await runRequiredHook(current, profile, "migrate", { onLine }, "EMIGRATEFAILED");
if (db.created) await runRequiredHook(current, profile, "seed", { onLine }, "ESEEDFAILED");
const bootExtraEnv = qc ? parseQcBootEnv(profile.env.QC_BOOT_ENV) : undefined;
const boot = await runHook(current, profile, "boot", build ? [] : ["--no-build"], {
onLine,
timeoutMs: BOOT_TIMEOUT_MS,
extraEnv: bootExtraEnv,
});
if (boot.code !== 0) {
throw Object.assign(new Error(`boot hook exited ${boot.code}`), {