From 5ae293d91973f25477dfb8ee38ddb6bb64113aef Mon Sep 17 00:00:00 2001 From: ci-check Date: Wed, 28 Oct 2026 04:43:39 +0800 Subject: [PATCH 1/5] fix(launcher): adopt the proven-healthy child at bring-up timeout instead of killing it (#4994) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the 60s spawn budget expires, the spawner killed its own spawned child unconditionally. If the health probe on the preferred port already answered with pid == our child's pid (the instance handshake merely never matched), that kill destroyed a proxy that was bound and serving — and the lane then degraded to direct uncompressed traffic until a host restart. - diagnosePort now returns { text, selfHealthy } so the timeout path can act on the same evidence it already collected; all user-facing strings are byte-identical to before. - Rung 1: selfHealthy (health pid match on the preferred port) -> settle the zone sticky port, start the owner heartbeat, attach and return — no kill. - Rung 2: the child may have laddered to another port after EADDRINUSE (src/server.ts ladder); find it via its own pid-tagged listen line in the per-port log (bytes written since spawn) and adopt it with the same strict proof (health ok + pid match). - Unproven cases keep today's behavior exactly: burn the budget, taskkill /F /T, throw the same error text. --- src/launcher.ts | 96 ++++++++-- tests/issue4994-spawn-timeout-adopt.test.ts | 185 ++++++++++++++++++++ 2 files changed, 266 insertions(+), 15 deletions(-) create mode 100644 tests/issue4994-spawn-timeout-adopt.test.ts diff --git a/src/launcher.ts b/src/launcher.ts index 04ccd7f72d..ba0cd2df26 100644 --- a/src/launcher.ts +++ b/src/launcher.ts @@ -5108,7 +5108,12 @@ export async function ensureProxyRunning( return ""; } }; - const diagnosePort = async (childAlive: boolean): Promise => { + // #4994: returns the structured verdict beside the prose — at budget + // exhaustion "our child serves the preferred port" (health pid === the + // pid we spawned) is an adoption DECISION, not just a diagnosis. The + // same identity proof already vouches in the stale-record fallback + // above; the timeout path must be able to act on it instead of killing. + const diagnosePort = async (childAlive: boolean): Promise<{ text: string; selfHealthy: boolean }> => { const origin = proxyOrigin(opts.host, port); let info: HealthInfo | undefined; let det: ProbeOutcome = { ok: false, detail: "probe error" }; @@ -5119,31 +5124,32 @@ export async function ensureProxyRunning( } catch { /* observability only — keep the generic clause */ } + const selfHealthy = Boolean(info?.ok && child.pid !== undefined && info.pid === child.pid); if (info?.ok) { - return info.pid === child.pid - ? `port ${port} finally answers healthy from our child (pid ${info.pid}) but its instance handshake never matched — check the instance-file/registry state dir` - : `port ${port} is held by a different process${info.pid !== undefined ? ` (pid ${info.pid})` : ""} — the spawned child never bound it`; + return selfHealthy + ? { text: `port ${port} finally answers healthy from our child (pid ${info.pid}) but its instance handshake never matched — check the instance-file/registry state dir`, selfHealthy } + : { text: `port ${port} is held by a different process${info.pid !== undefined ? ` (pid ${info.pid})` : ""} — the spawned child never bound it`, selfHealthy: false }; } // A 200 that is not bili's health payload (foreign dev servers // answer ANY path with their index page) must not fall into the // generic "probe failed" clause — the probe SUCCEEDED. if (det.ok) { - return `port ${port} answered but not with bili's health payload — a foreign service likely holds it`; + return { text: `port ${port} answered but not with bili's health payload — a foreign service likely holds it`, selfHealthy: false }; } const d = det.detail ?? "unknown error"; if (/^(ECONNREFUSED|ECONNRESET|EHOSTUNREACH|ENETUNREACH|EPIPE)$/i.test(d)) { - return `nothing is listening on port ${port} — the spawned child (${childAlive ? "still alive" : "already exited"}, pid ${child.pid ?? "?"}) never bound it`; + return { text: `nothing is listening on port ${port} — the spawned child (${childAlive ? "still alive" : "already exited"}, pid ${child.pid ?? "?"}) never bound it`, selfHealthy: false }; } if (/^HTTP \d{3}$/.test(d)) { - return `port ${port} answered ${d} — the listener there is not reporting bili health`; + return { text: `port ${port} answered ${d} — the listener there is not reporting bili health`, selfHealthy: false }; } // #3654: a timeout with a live TCP listener underneath is the // event-loop-saturation signature (connect succeeds, JS never runs) // — name it instead of letting it read as a dead port. if (/^timeout after \d+ms$/i.test(d) && (await (deps.isConnectable ?? tcpConnectable)(origin))) { - return `port ${port} accepts TCP connections but never answers /__bili/health within the probe budget — the instance there is BUSY (event loop saturated, typically a large compression), not dead (#3654)`; + return { text: `port ${port} accepts TCP connections but never answers /__bili/health within the probe budget — the instance there is BUSY (event loop saturated, typically a large compression), not dead (#3654)`, selfHealthy: false }; } - return `last health probe failed with ${d}`; + return { text: `last health probe failed with ${d}`, selfHealthy: false }; }; const deadline = now() + SPAWN_BUDGET_MS; @@ -5156,7 +5162,7 @@ export async function ensureProxyRunning( if (!slowStartNoticed && now() >= deadline - SLOW_START_GRACE_MS) { slowStartNoticed = true; console.error( - `bili: spawned proxy not healthy after ${SPAWN_WAIT_MS}ms — child pid ${child.pid ?? "?"} is still starting up; extending wait to ${SPAWN_BUDGET_MS}ms total (${await diagnosePort(true)}) (log: ${logPath}${logTail()})`, + `bili: spawned proxy not healthy after ${SPAWN_WAIT_MS}ms — child pid ${child.pid ?? "?"} is still starting up; extending wait to ${SPAWN_BUDGET_MS}ms total (${(await diagnosePort(true)).text}) (log: ${logPath}${logTail()})`, ); } await sleepImpl(HEALTH_POLL_INTERVAL_MS); @@ -5286,22 +5292,82 @@ export async function ensureProxyRunning( const detail = childExit.code !== null ? `code ${childExit.code}${childExit.code === TWIN_ADOPT_EXIT_CODE ? " (twin-collision signal)" : ""}` : childExit.signal ? `signal ${childExit.signal}` : "unknown reason"; - throw new Error(`bili: proxy child exited before becoming healthy (${detail}) — ${await diagnosePort(false)} (runtime: ${runtime}) (log: ${logPath}${logTail()})`); - } + throw new Error(`bili: proxy child exited before becoming healthy (${detail}) — ${(await diagnosePort(false)).text} (runtime: ${runtime}) (log: ${logPath}${logTail()})`); + } + // #4994: where THIS child says it bound, parsed from its own log + // segment ([spawnLogOffset..end] — no other spawn's lines can answer; + // a shrunken file means rotation under us, so sample the tail instead). + // The listen line carries the child's pid (`acp-proxy v… (pid N, id …) + // listening on http://host:port`), which must match OUR spawned pid AND + // be corroborated by a live health probe before anything trusts it. + const childLogBoundOrigin = (): { origin: string; port: number } | undefined => { + try { + const size = fs.statSync(logPath).size; + let start = spawnLogOffset; + if (size < start) start = Math.max(0, size - 8192); + if (size <= start) return undefined; + const fd = fs.openSync(logPath, "r"); + let seg: Buffer; + try { + seg = Buffer.alloc(size - start); + const n = fs.readSync(fd, seg, 0, seg.length, start); + seg = seg.subarray(0, n); + } finally { + fs.closeSync(fd); + } + const text = seg.toString("utf8"); + const re = /\(pid (\d+), id [^)]+\) listening on (https?:\/\/\S+)/g; + let m: RegExpExecArray | null; + let last: RegExpExecArray | undefined; + while ((m = re.exec(text)) !== null) last = m; + if (!last || Number(last[1]) !== child.pid) return undefined; + const u = new URL(last[2]); + const p = Number(u.port); + if (!Number.isInteger(p) || p <= 0) return undefined; + return { origin: u.origin, port: p }; + } catch { + return undefined; + } + }; // #2260(A)/#2187: the timeout is the ONE terminal path where the // spawned child is STILL ALIVE. Abandoning it leaked a detached proxy // per failed bring-up — dsh plan-time retries re-arm every 10s, so a // persistently slow host accumulated ~1 zombie per ~70s (each also - // stranding the lane sticky-port ladder). Hard-kill before failing. + // stranding the lane sticky-port ladder). Hard-kill before failing — + // EXCEPT when the spawner itself can identify a healthy victim (#4994): + // killing a child you just proved is serving was the defect, and the + // leak rationale does not apply to a child that is serving. // #3116: classify the port WHILE THE CHILD IS STILL ALIVE — probing // after the kill turns "bound but hung" into a misleading // ECONNREFUSED. const diagnosis = await diagnosePort(true); + if (diagnosis.selfHealthy) { + // Rung 1: the preferred port answers healthy with OUR child's pid — + // the same identity proof the stale-record fallback trusts per-poll, + // reached here because clobbered records starved it for the budget. + settleZonePort(port); + startOwnerHeartbeat(proxyOrigin(opts.host, port), watchPid); + attachDiag(`bili: adopting our own healthy child (pid ${child.pid}) at ${proxyOrigin(opts.host, port)} after ${SPAWN_BUDGET_MS}ms — the instance handshake never matched but the health probe proves this child serves the port; keeping it instead of killing (#4994)`); + return { origin: proxyOrigin(opts.host, port), port, child, logPath }; + } + // Rung 2: the child laddered off the preferred port (EADDRINUSE hop) and + // its records were clobbered too — find where IT says it bound and prove + // identity there before adopting. + const bound = childLogBoundOrigin(); + if (bound) { + const info = await fetchHealthInfo(bound.origin); + if (info?.ok && info.pid === child.pid) { + settleZonePort(bound.port); + startOwnerHeartbeat(bound.origin, watchPid); + attachDiag(`bili: adopting our own healthy child (pid ${child.pid}) at ${bound.origin} after ${SPAWN_BUDGET_MS}ms — it bound ${bound.port} per its own listen line and answers health under our pid; keeping it instead of killing (#4994)`); + return { origin: bound.origin, port: bound.port, child, logPath }; + } + } killAbandonedChild(child); console.error( - `bili: killed spawned proxy (pid ${child.pid ?? "?"}) after ${SPAWN_BUDGET_MS}ms without health — ${diagnosis} (log: ${logPath}${logTail()})`, + `bili: killed spawned proxy (pid ${child.pid ?? "?"}) after ${SPAWN_BUDGET_MS}ms without health — ${diagnosis.text} (log: ${logPath}${logTail()})`, ); - throw new Error(`bili: proxy did not become healthy within ${SPAWN_BUDGET_MS}ms — ${diagnosis} (runtime: ${runtime}) (log: ${logPath}${logTail()})`); + throw new Error(`bili: proxy did not become healthy within ${SPAWN_BUDGET_MS}ms — ${diagnosis.text} (runtime: ${runtime}) (log: ${logPath}${logTail()})`); } finally { if (claimed) clearStartingMarker(launchToken); } diff --git a/tests/issue4994-spawn-timeout-adopt.test.ts b/tests/issue4994-spawn-timeout-adopt.test.ts new file mode 100644 index 0000000000..1d2012a95a --- /dev/null +++ b/tests/issue4994-spawn-timeout-adopt.test.ts @@ -0,0 +1,185 @@ +// #4994: when the launchToken handshake starves for the whole budget because +// clobbered instance records hide our child from every per-poll fallback, the +// timeout path must NOT kill a child the spawner itself can prove healthy — +// the health payload's pid matching the spawned pid is the same identity proof +// the stale-record fallback trusts per-poll. Rung 1: the preferred port answers +// under our pid. Rung 2: the child laddered off the preferred port and its own +// listen line (pid-tagged) points at where it bound. Unproven children are +// still hard-killed exactly as before (#2260(A)/#2187 zombie rationale holds +// whenever identity cannot be established). + +import test from "node:test"; +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import type { ProxyInstanceFile } from "../src/instance.ts"; +import { ensureProxyRunning, SPAWN_BUDGET_MS, type SpawnChild, type SpawnFn } from "../src/launcher.ts"; + +const FP_SCRIPT = path.join(os.tmpdir(), `bili-fp-4994-${process.pid}.js`); +fs.writeFileSync(FP_SCRIPT, "// fingerprint fixture\n"); +const FP_HASH = createHash("sha256").update(fs.readFileSync(FP_SCRIPT)).digest("hex"); + +const CHILD_PID = 43310; +const SQUATTER_PID = 43311; + +/** A LIVE foreign record (alive pid, different launchToken) — the clobber that + * starves the launchToken match AND blocks the stale-record fallback (the + * record's owner pid is alive, so the record is not "stale"). */ +function foreignInstance(port: number): ProxyInstanceFile { + return { + origin: `http://127.0.0.1:${port}`, + instanceId: "foreign-1", + pid: process.pid, + startedAt: Date.now(), + host: "127.0.0.1", + port, + passthrough: false, + mitmDomains: [], + modelWindows: {}, + launchToken: "somebody-else", + codeFingerprint: "not-our-build", + }; +} + +function makeFakeChild(pid: number, kills: Array, logPath?: string): SpawnChild { + return { + pid, + unref() {}, + kill(signal) { + kills.push(signal); + return true; + }, + on() {}, + }; +} + +function fakeClock() { + let ticks = 0; + return { + now: () => ticks * 1000, + sleep: () => { + ticks += 1; + return Promise.resolve(); + }, + ticks: () => ticks, + }; +} + +const PORTS = [18991, 18992, 18993, 18994, 18995]; +for (const p of PORTS) { + const lp = path.join(os.tmpdir(), `bili-proxy-${p}.log`); + try { fs.unlinkSync(lp); } catch {} + try { fs.unlinkSync(`${lp}.old`); } catch {} +} + +test("#4994 rung 1: proven-healthy child on the preferred port is adopted, not killed", async () => { + const clock = fakeClock(); + const kills: Array = []; + const port = PORTS[0]; + const preferred = `http://127.0.0.1:${port}`; + const handle = await ensureProxyRunning( + { host: "127.0.0.1", port, passthrough: false, debug: false, parentPid: 1 }, + { + fetchImpl: async () => ({ ok: true }), + // The starvation shape: records clobbered live (no token match, no + // registry entry, record not stale) so no per-poll fallback ever + // fires — but the health endpoint tells the truth about who serves. + fetchHealthInfo: async (origin) => (origin === preferred ? { ok: true, pid: CHILD_PID } : { ok: false }), + spawnImpl: (): SpawnChild => makeFakeChild(CHILD_PID, kills), + now: clock.now, + sleep: clock.sleep, + readInstanceFile: () => foreignInstance(port), + listRegistryInstances: () => [], + }, + ); + assert.equal(handle.origin, preferred); + assert.equal(handle.port, port); + assert.ok(handle.child, "the healthy child was kept, not abandoned"); + assert.deepEqual(kills, [], "a proven-healthy child is never killed"); + assert.ok(clock.ticks() >= 59, `adoption happens AT budget exhaustion (${clock.ticks()}s), not earlier`); +}); + +test("#4994 rung 2: laddered child found via its own pid-tagged listen line is adopted", async () => { + const clock = fakeClock(); + const kills: Array = []; + const port = PORTS[1]; + const ladderPort = PORTS[2]; + const preferred = `http://127.0.0.1:${port}`; + const ladder = `http://127.0.0.1:${ladderPort}`; + const logPath = path.join(os.tmpdir(), `bili-proxy-${port}.log`); + const handle = await ensureProxyRunning( + { host: "127.0.0.1", port, passthrough: false, debug: false, parentPid: 1 }, + { + fetchImpl: async () => ({ ok: true }), + // Preferred port is held by a squatter (different pid); the child + // hopped +N and announced its real bind in its own log segment. + fetchHealthInfo: async (origin) => + origin === preferred ? { ok: true, pid: SQUATTER_PID } : origin === ladder ? { ok: true, pid: CHILD_PID } : { ok: false }, + spawnImpl: (): SpawnChild => { + // Simulate the child's bind announcement landing AFTER the + // spawner captured spawnLogOffset (append-only port log). + fs.appendFileSync( + logPath, + `2026-10-27T15:48:00.000Z [info] acp-proxy v0.1.208 (pid ${CHILD_PID}, id deadbeef) listening on ${ladder}\n`, + ); + return makeFakeChild(CHILD_PID, kills); + }, + now: clock.now, + sleep: clock.sleep, + readInstanceFile: () => foreignInstance(port), + listRegistryInstances: () => [], + }, + ); + assert.equal(handle.origin, ladder, "the child's self-reported bind wins over the squatted preferred port"); + assert.equal(handle.port, ladderPort); + assert.ok(handle.child); + assert.deepEqual(kills, []); +}); + +test("#4994 negative: an UNPROVEN child still burns the budget and gets killed (unchanged)", async () => { + const clock = fakeClock(); + const kills: Array = []; + const port = PORTS[3]; + await assert.rejects( + ensureProxyRunning( + { host: "127.0.0.1", port, passthrough: false, debug: false, parentPid: 1 }, + { + fetchImpl: async () => ({ ok: false }), + fetchHealthInfo: async () => ({ ok: false }), + spawnImpl: (): SpawnChild => makeFakeChild(CHILD_PID, kills), + now: clock.now, + sleep: clock.sleep, + readInstanceFile: () => foreignInstance(port), + listRegistryInstances: () => [], + }, + ), + new RegExp(`did not become healthy within ${SPAWN_BUDGET_MS}ms`), + ); + assert.ok(clock.ticks() >= 59, `the full budget was consumed before failing, got ${clock.ticks()}s`); + assert.deepEqual(kills, ["SIGKILL"], "an unidentifiable child is hard-killed exactly once"); +}); + +test("#4994 negative: a healthy FOREIGN responder on the preferred port is never adopted", async () => { + const clock = fakeClock(); + const kills: Array = []; + const port = PORTS[4]; + const preferred = `http://127.0.0.1:${port}`; + await assert.rejects( + ensureProxyRunning( + { host: "127.0.0.1", port, passthrough: false, debug: false, parentPid: 1 }, + { + fetchImpl: async () => ({ ok: false }), + fetchHealthInfo: async (origin) => (origin === preferred ? { ok: true, pid: SQUATTER_PID } : { ok: false }), + spawnImpl: (): SpawnChild => makeFakeChild(CHILD_PID, kills), + now: clock.now, + sleep: clock.sleep, + readInstanceFile: () => foreignInstance(port), + listRegistryInstances: () => [], + }, + ), + new RegExp(`did not become healthy within ${SPAWN_BUDGET_MS}ms`), + ); + assert.deepEqual(kills, ["SIGKILL"], "a squatter's health answer must not mask the dead-end"); +}); From 1f6b10d22fc38431ff9aef22529f4bd7b5bb1003 Mon Sep 17 00:00:00 2001 From: ci-check Date: Wed, 28 Oct 2026 05:14:05 +0800 Subject: [PATCH 2/5] fix(launcher): publish the listen-success line to the per-port log so timeout adoption rung 2 can find it (#4994) Review finding on 5ae293d91: rung 2 of the timeout adoption parses the child's pid-tagged listen line out of the per-port log, but post-#2864 a launcher-spawned child mutes its stderr leg into bili.log once the file leg is live - so the banner (the only producer of that line) never reaches the port log and rung 2 was unreachable for a healthy child in the primary starvation shape (clobbered records, healthy state dir). The listen-failed paths already carry this explicit write for exactly this reason; mirror it on the success path (one short line per spawn, best-effort append). Behavior change (additive): launcher-spawned children now append ONE listen-success line to %TMPDIR%/bili-proxy-.log per spawn (previous content unchanged; rotation at PORT_LOG_MAX_BYTES untouched). No config surface, wire, or persistence-format changes. --- src/server.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/server.ts b/src/server.ts index f29398d857..b3ab13feec 100644 --- a/src/server.ts +++ b/src/server.ts @@ -1256,6 +1256,18 @@ export async function startServer(opts: ProxyOptions): Promise { + (opts.mitm.enabled ? ` — MITM proxy on (whitelist)${opts.mitm.domains.length ? ` +${opts.mitm.domains.join(",")}` : ""}` : "") + (opts.passthrough ? " — PASSTHROUGH (compression OFF)" : ""), ); + // #4994 rung 2: the spawner's timeout adoption parses THIS child's + // pid-tagged listen line out of the per-port log when it laddered off + // the preferred port — but post-#2864 the muted stderr leg means the + // banner above never reaches that file (same explicit-write pattern + // as the listen-failed paths below; the line names the actual bound + // origin while the file stays keyed on the preferred port). + if (launchToken !== undefined) { + writeSpawnPortLog( + opts.port, + `${logTimestamp()} [info] acp-proxy v${VERSION} (pid ${process.pid}, id ${instanceId.slice(0, 8)}) listening on http://${displayHost}:${actualPort}`, + ); + } if (opts.passthrough) { log( "warn", From 082b5d4a20af9cc849cda1b778b4444567aeb2f9 Mon Sep 17 00:00:00 2001 From: ci-check Date: Wed, 28 Oct 2026 05:27:06 +0800 Subject: [PATCH 3/5] fix(ci): register the #4994 adoption suite in LIVE_FILES (#4994) --- scripts/live-files.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/live-files.mjs b/scripts/live-files.mjs index e2a58f9f45..fbe7c7fbb4 100644 --- a/scripts/live-files.mjs +++ b/scripts/live-files.mjs @@ -68,6 +68,12 @@ export const LIVE_FILES = [ // servers; every socket is listen(0), spawns are mocked, so the zone band // is belt-and-braces like #3890's — the entry is for the tripwire "tests/issue4811-dsh-busy-drop-selfheal.test.ts", + // #4994: ensureProxyRunning timeout-adoption rows drive fully mocked + // children + a fake clock; nothing is spawned and no socket is bound + // (the 1899x ports appear only in tmpdir log-file names) — like #3890's + // the entry is for the tripwire (its SPAWN_RE hit is the identifier + // "spawnLogOffset" in a code comment) + "tests/issue4994-spawn-timeout-adopt.test.ts", ]; /** Band width per live file: the zone ladder drifts +1 per EADDRINUSE retry; From af58907ee99ddc8a9933904c9278302c6b9ef260 Mon Sep 17 00:00:00 2001 From: ranxianglei Date: Thu, 29 Oct 2026 17:20:21 +0800 Subject: [PATCH 4/5] test: restore lost newline at end of LIVE_FILES array (#5010 sync) --- scripts/live-files.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/live-files.mjs b/scripts/live-files.mjs index 2b7b122dc4..fc5192f222 100644 --- a/scripts/live-files.mjs +++ b/scripts/live-files.mjs @@ -78,7 +78,8 @@ export const LIVE_FILES = [ // (the 1899x ports appear only in tmpdir log-file names) — like #3890's // the entry is for the tripwire (its SPAWN_RE hit is the identifier // "spawnLogOffset" in a code comment) - "tests/issue4994-spawn-timeout-adopt.test.ts",]; + "tests/issue4994-spawn-timeout-adopt.test.ts", +]; /** Band width per live file: the zone ladder drifts +1 per EADDRINUSE retry; * 32 gives every file's in-file ladder more headroom than any suite uses From e331f44f66065e7f15be25b8024cf7321e75f23f Mon Sep 17 00:00:00 2001 From: ranxianglei Date: Thu, 29 Oct 2026 22:54:54 +0800 Subject: [PATCH 5/5] test: register the #4994 suite in LIVE_FILES (#1248) The previous sync commit resolved the live-files.hunk to the master side and dropped this PR's own registration row; CI's tripwire would have red every shard for it. --- scripts/live-files.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/live-files.mjs b/scripts/live-files.mjs index af0caac351..b4a7aeb499 100644 --- a/scripts/live-files.mjs +++ b/scripts/live-files.mjs @@ -73,6 +73,12 @@ export const LIVE_FILES = [ // in-memory-only value, so no zone band is needed — the entry is for the // tripwire "tests/issue4982-draining-twin-ladder.test.ts", + // #4994: ensureProxyRunning timeout-adoption rows drive fully mocked + // children + a fake clock; nothing is spawned and no socket is bound + // (the 1899x ports appear only in tmpdir log-file names) — like #3890's + // the entry is for the tripwire (its SPAWN_RE hit is the identifier + // "spawnLogOffset" in a code comment) + "tests/issue4994-spawn-timeout-adopt.test.ts", // #5114: contract test for the storage-baseline preload's XDG dir sandbox; // spawns a bare `node -e` child that only prints env — no ports, no // servers, so the zone band is irrelevant; the entry is for the tripwire