Repository navigation
test runtime: refuse a local run on a Node major other than the pin (orca #48, slice 13) - #64
Merged
nachumi-a2zoperations merged 1 commit intoNov 16, 2026
Conversation
…orca #48, slice 13) Vitest's Node lane runs on whatever node started run-vitest.mjs. On the MacBook that is Node 26.7.0, whose node:sqlite backup() settles only on the event loop's next wake-up (probed outside Orca; Node 26.0.0 and the pinned 24.22.1, Electron 43.8.6's runtime, settle at once). Under Vitest the next wake-up is the test timeout, so sync-database-concurrent-backup and profile-state-pre-migration-backup timed out with no hint of the cause. The product is unaffected. run-vitest.mjs now checks process.versions.node against engines.node and stops with one line naming the binary, its version and the pin. ORCA_ALLOW_NODE_MISMATCH=1 runs anyway with a warning. CI is left alone: its matrix picks the version on purpose (node-next-compat runs 24 and 26). Refs #48 Signed-off-by: Nachumi Eliyahu <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #48 (slice 13:
src/main/sqlite/sync-database-concurrent-backup.test.tsandsrc/main/persistence/profile-state/profile-state-pre-migration-backup.test.ts, both red when run alone, 2 of 2, on Node).Cause (probed outside Orca, with no Orca code)
Both tests wait on
node:sqlite'sbackup(). Vitest's Node lane runs on whatever node startedrun-vitest.mjs. On the MacBook that is Node 26.7.0 (SQLite 3.53.4); the repo pinsengines.node24, and the runtime pin is 24.22.1.On 26.7.0,
backup()does its work, but its promise settles only on the event loop's next wake-up. A 2-page database shows it:Under Vitest the next wake-up is the test's own timeout (20 s / 30 s), so both tests time out.
Node 26.0.0 and Electron 43.8.6's bundled Node 24.22.1 (the pin) settle at once in all three cases.
The product is unaffected. It runs on Electron's Node 24.22.1.
Fix (the lane lead's pick, option A)
config/scripts/test-runtime/execution-policy/node-major-guard.mjs.run-vitest.mjschecksprocess.versions.nodeagainst a plainengines.nodemajor. On a mismatch it stops with one line naming the binary, its version and the pin, and exits 1.ORCA_ALLOW_NODE_MISMATCH=1runs anyway, with a warning.CIset). Its matrix picks the Node version on purpose: upstream'snode-next-compat.ymlruns the units on 24 and 26 every day, and a hard refusal there would break it. This is the one change from the brief.Tests (red first)
node-major-guard.test.mjs, 12 tests:x; a range means no check);d18bbcf4it failed at import, because the module did not exist.run-vitest.mjsunder Electron's Node 24.22.1 (ELECTRON_RUN_AS_NODE=1), the two SQLite files + the guard test = 17/17, with no guard line.ORCA_ALLOW_NODE_MISMATCH=1, a warning, then 12/12;CI=1, 12/12.Gates (MacBook)
pnpm check:changed --base=origin/blowzer/fork-only(withORCA_ALLOW_NODE_MISMATCH=1, since the host is 26.7): 13/13.scripts/fleet/orca-gates-remote.shin BLOWzer) was not used: its default mode callsconfig/scripts/check-changed.mjs, which has since moved toconfig/scripts/preflight/changed-checks/. That is noted for its owner.After merge
run-viteston the MacBook, preflight's unit step included, stops until Node 24 is first on PATH for the repo. That is the owner/host step, passed to the Leader. Until then, a deliberate run setsORCA_ALLOW_NODE_MISMATCH=1.