The exact-input key lists hermes_cli/ and hermes_platform/ modules by old path and hashes a missing
file as <missing>, so after a move an edit to those modules stops changing the key. Each input is
read at current_path(name) and still keyed by its listed name, so a move alone keeps the key. The
compat modules this now imports join the key, as the import-graph test requires.
The checkout lock, the child supervision and the heartbeat, watcher and
relay programs embedded as strings move out of node-deps.mjs:
node-deps-lock.mjs owns who may touch the trees, and the three programs are
real .mjs files (node-deps-heartbeat/-watcher/-relay.mjs) that lint and
navigation can see. node-deps.mjs keeps recovery, install and commit.
No behaviour change; the watcher's empty catches now say why.
The new files ship wherever node-deps.mjs did: the Dockerfile's
dependency layer, nix/webapp.nix, the webapp freshness inputs, the desktop
input-cache key, and the source-build test fixture.
The Python import probe parsed production source, which tests may not do.
Key scripts/bundles/*.py, scripts/build/*.py and apps/desktop/scripts/*.py
by glob, as pm/*.py already is, so a new module or late import there needs
no list edit; shared modules outside them stay listed. The Python test now
reads only sys.modules after importing the entry points, and a new test
proves a module added to a globbed package changes the key.
The Node graph check moves to tests-js, where JS-only PRs run it; it calls
desktop_build_cache.py's CLI for the key, and classify_changes routes an
edit of that owner to the JS lane too.
The previous change keyed the Node half of the preparation graph only.
desktop_prepare.py and the helpers it calls also import, mostly inside
functions, scripts/bundles/{desktop,payload,bytecode,msix_names}.py,
scripts/releases/{versioning,semver,bundle_env,commit_build}.py,
scripts/termux/deb_version.py, and hermes_cli/hermes_constants/
hermes_platform modules. Key those too.
A new test imports the Python entry points in a subprocess, follows the
late imports of the functions that can run (only the names each importer
takes, so setup_toolchain's archive-inputs subcommand stays out), fails
on a broken repo import, and requires an edit to every repo module that
loads to change the key. The Node probe now converts URLs with
fileURLToPath. Both probes miss dynamic import() in functions that do
not run at import time and PowerShell dot-sourcing; those stay listed
by hand.
The desktop dependency-cache digest listed node-deps.mjs and
electron-runtime.mjs but not the modules they import (pnpm-lock.mjs,
frontend-common.mjs, python.mjs, apps/desktop/scripts/utils.mjs,
macos-sysroot.mjs), the Python helpers desktop_build_cache.py and
native_prepared.py import (scripts/ci/pnpm_lock.py, scripts/build/inputs.py),
or scripts/build/windows-deps.ps1, the provider pm/native_build.py runs. An
edit to any of them reused a cache keyed on the old code.
The test resolves the module graph of the preparation programs with Node's
resolve hook and requires an edit to each module to change the key.
pnpm 12.15.0 (native executable) installs every JS workspace from one
pnpm-lock.yaml, imported from package-lock.json with the same resolved
versions. website/, the WhatsApp bridge and the photon sidecar stay separate
npm projects.
Configuration moves from .npmrc and the root manifest into
pnpm-workspace.yaml: the 14-day minimumReleaseAge and its excludes,
overrides, allowBuilds (the old allowScripts set, with strictDepBuilds
failing any unlisted build script), engineStrict, sideEffectsCache: false
(in-place rebuilds must not write into the store) and
verifyDepsBeforeRun: false (a `pnpm run` never installs).
The pnpm version is pinned in pm/lock.json and in root devEngines.
pmOnFail: ignore keeps that pin out of pnpm-lock.yaml: a leading pin
document makes osv-scanner read zero packages. scripts/build/node-deps.mjs
enforces the exact version instead, and every lock reader refuses a
multi-document lock. A root preinstall refuses `npm install`; devEngines
onFail is warn so npx (MCP servers, the tsc linter) keeps working inside
the checkout.
User-machine installs run --frozen-lockfile --trust-lockfile (release age is
checked when locking, in CI, not per user). node-deps removes npm-era
node_modules trees before the first pnpm install. Nix builds the store with
fetchPnpmDeps and a hash file that CI checks.
Electron 42 dropped the postinstall that unpacked its binary into
node_modules/electron/dist. The binary now appears on the first
require('electron'), so parallel vitest workers race to unpack it
("Text file busy" in #128267's CI), and `hermes desktop --source` finds
no path.txt to launch.
electron-runtime.mjs runs Electron's own install.js once: after npm ci
for the desktop workspace, and in CI before the parallel checks. It first
checks the installed package against the desktop pin and the lockfile,
and does nothing when the runtime is already in place. On the current
40.10.2 pin, whose postinstall still unpacks the binary, it is a no-op.
Salvaged from #137648 (the runtime-preparation subset only).
node-deps runs npm ci on every prepare (the receipt never matched across
runs in any sampled job), and npm ci deletes node_modules first. The
restored trees were GBs of tar/untar for nothing; npm's content cache
(npm/_cacache) is what lets npm ci skip downloads. The workspace path
validation only existed to guard those paths, so it goes too.
cryptography ships no win_arm64 wheel, so every Windows ARM64 venv sync
compiles it from the sdist and needs MSVC, Clang, Rust and static OpenSSL.
Only setup-hermes.ps1 (and so activate.ps1) prepared that environment,
between a `pm install --tools-only` and the real sync. install.ps1,
`hermes update` and repair ran the same sync without it and failed in
openssl-sys.
PM owns the sync, so PM prepares it. pm/native_build.py holds the adapter
(moved from scripts/build/windows_deps.py) plus source_build_environment(),
which prepares only on win32-arm64 when the synced project carries the
provider script. A payload has prebuilt dependencies and needs no compiler.
VenvPackage.apply and build_environment pass the result to uv children
only. It carries the bridged pip index settings, which managed_environment
applies only to the ambient environment. The state root stays the store
parent, so existing vcpkg/OpenSSL builds are reused.
setup-hermes.ps1 collapses to one `pm install`: the tools-only split existed
only for this preparation, and pm install already puts its tools on PATH
before the venv sync (pm/cli.py activate check).
Not yet verified live on Windows ARM64.
Merge origin/main at 8e806ae1b2. Keep native helper compilation in
prepareDesktopNativeDependencies and keep bundling/beforePack consume-only.
Bind helper sources and headers into preparation identities and cache keys;
copy admitted executable resources beside node_modules and preserve signing
semantics in product freshness checks.
Verified desktop typecheck, focused native/packaging/UI and gateway/cache
tests, and the real Linux preparation/copy/Xvfb execution path. Incoming
upstream anti-slop findings remain unchanged; no baseline was raised.
Dependency acquisition during packaging left native wheels and packager
inputs outside the pre-build cache save. Compose PM and existing providers
into a preparation phase, then require builds to consume admitted inputs.
Share native preparation with PM Bundle. Keep path-bound environments and
signing outputs separate from reusable caches. Use read-only cache tokens
for commit builds and preserve the one-command local build path.
Verify pinned tools through PM, probe PTYs under the prepared Electron,
and supply dmgbuild through a build-only PM package. Resolve bundled tool
stores from their payload manifest so relocation preserves discovery.
Validation: focused Python and JS tests, checkJs, Ruff, Windows checks,
anti-slop, cache relocation, and network-denied Linux AppImage builds.
Relocated runtime smoke passed with NixOS host libraries supplied.
Native Windows/macOS signing and live GitHub cache behavior remain untested.