Files
orca/src
Jinwoo Hong 8f396badaf Preload the daemon windowsHide shim via --require; wrap promisify custom (#7499)
The rc.6 shim shipped broken twice over:

1. Bundler ordering: rollup's CJS output hoists chunk requires above
   inlined module code, so daemon-entry's "first import" of the shim ran
   AFTER sibling chunks evaluated `promisify(childProcess.execFile)` at
   module scope. The shim is now its own self-contained bundle entry and
   the daemon fork preloads it with `node --require`, which runs before
   the module graph loads - immune to bundler ordering by construction.

2. promisify bypass: exec/execFile carry a util.promisify.custom
   implementation that calls the ORIGINAL function internally; copying
   the symbol verbatim onto the wrapper let every promisified call site
   (exactly what the daemon's CIM probes use) skip the injection. The
   wrapper now wraps each symbol-attached function with the same
   windowsHide-default injection.

Verified on Windows against the staged production Node 24 binary with
canary-titled probes (attributable amid ambient rc.6 flashing):
plain execFile and promisify(execFile) both flash 100% of trials
without the preload and 0% with it; promisify(execFile) under the
preload resolves to the injection wrapper; built preload bundle has
zero chunk requires; daemon boots and serves getForegroundProcess RPCs
end-to-end under --require.
2026-07-05 22:13:08 -07:00
..