From 0b13b58ecbfe7323a01237ad7eeff51f7929549b Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Thu, 1 Oct 2026 13:38:28 +0000 Subject: [PATCH] Gates start no dev backend: DOXA_NO_DEV_BACKEND=1 (set by the gate runner) keeps vite's offline answers and skips the PocketBase download, the process and its port --- internal/backend-dev-plugin.mjs | 5 +++++ internal/run-parallel.mjs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/internal/backend-dev-plugin.mjs b/internal/backend-dev-plugin.mjs index 1fa3f1a62..8f63b3c0f 100644 --- a/internal/backend-dev-plugin.mjs +++ b/internal/backend-dev-plugin.mjs @@ -226,6 +226,11 @@ export function backendDevPlugin(root, env = process.env) { process.once('SIGINT', () => { stopAll(); process.exit(0) }) process.once('SIGTERM', () => { stopAll(); process.exit(0) }) } + // ★ NO DEV BACKEND FOR A CHECK. A gate or a server-side-render check that boots vite from this config does not + // need PocketBase or the voice engine, and starting them cost a 32 MB download in a fresh worktree, a spawned + // process and a port clash (127.0.0.1:8090) with a dev server already running. DOXA_NO_DEV_BACKEND=1 keeps the + // quiet offline answers above and starts nothing; the gate runner (run-parallel.mjs) sets it for every gate. + if (process.env.DOXA_NO_DEV_BACKEND === '1') { logger.info('[dx-backend-dev] DOXA_NO_DEV_BACKEND=1: no dev backend started'); return } for (const b of backends) { if (b.remote) { logger.info(`[${b.name}] not started here: ${b.route} → ${b.remote}`) diff --git a/internal/run-parallel.mjs b/internal/run-parallel.mjs index 4bc8544eb..1781d2942 100644 --- a/internal/run-parallel.mjs +++ b/internal/run-parallel.mjs @@ -41,7 +41,7 @@ * USAGE * node internal/run-parallel.mjs --label=pre -- check:a check:b ... # runs `bun run ` * node internal/run-parallel.mjs --bundles # BUNDLE= bun x vite build, for every plugin-designs// - * env: GATES_CONCURRENCY (default min(cpus,6)) · BUILD_CONCURRENCY (default 4) + * env: GATES_CONCURRENCY (default min(cpus,6)) · BUILD_CONCURRENCY (default 4) · every step gets DOXA_NO_DEV_BACKEND=1 */ import { spawn, spawnSync } from 'node:child_process' import { readdirSync, existsSync, readFileSync } from 'node:fs' @@ -193,7 +193,7 @@ async function runStep(step) { const started = Date.now() const child = spawn(step.cmd, step.args, { cwd: ROOT, - env: { ...process.env, ...step.env }, + env: { DOXA_NO_DEV_BACKEND: '1', ...process.env, ...step.env }, // gates never start the dev backends (backend-dev-plugin.mjs) stdio: ['ignore', 'pipe', 'pipe'], }) let out = ''