From a3d12f338635a07cd6b8926ac3626cf526105369 Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Fri, 9 Oct 2026 23:39:07 -0400 Subject: [PATCH] ci(release): read the watcher child from the supervisor's slot in the fault harness --- config/scripts/runtime-file-watcher-fault-harness.mjs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config/scripts/runtime-file-watcher-fault-harness.mjs b/config/scripts/runtime-file-watcher-fault-harness.mjs index 88fec4245fbe..7c6205c35ea5 100644 --- a/config/scripts/runtime-file-watcher-fault-harness.mjs +++ b/config/scripts/runtime-file-watcher-fault-harness.mjs @@ -56,6 +56,11 @@ async function loadSupervisor(bundleDir) { return require(outfile).WatcherProcessSupervisor } +// Why: release cuts run this harness from older tags too; #24863 moved the child and canary into `slot`. +function watcherSlot(supervisor) { + return supervisor.slot ?? supervisor +} + async function main() { if (process.platform === 'win32') { console.log('[runtime-file-watcher-fault] SKIP: SIGSEGV oracle is macOS/Linux only') @@ -115,7 +120,7 @@ async function main() { onInterruption: () => resolveInterruption() } ) - watcherCanaryDir = supervisor.canaryDir + watcherCanaryDir = watcherSlot(supervisor).canaryDir const beforeEvent = nextMatchingEvent( (listener) => { @@ -127,14 +132,14 @@ async function main() { await writeFile(join(rootPath, 'before.txt'), 'before') await Promise.race([beforeEvent, watcherError]) - const firstChildPid = supervisor.child?.pid + const firstChildPid = watcherSlot(supervisor).child?.pid if (!firstChildPid) { throw new Error('Watcher supervisor did not expose a live child') } process.kill(firstChildPid, 'SIGSEGV') await Promise.race([interrupted, watcherError]) - const replacementChildPid = supervisor.child?.pid + const replacementChildPid = watcherSlot(supervisor).child?.pid if (!replacementChildPid || replacementChildPid === firstChildPid) { throw new Error('Watcher supervisor did not replace the faulted child') }