Repository navigation
Conversation
Lands daemon-protocol-facts.mjs from the Windows update diagnostic branch with a stricter parser, and adds check-daemon-protocol-crossing.mjs (rule R1): the working tree must attach the newest release tag's daemon. Rollback crossing is reported only. Runs in the cross-version-wire job, which already has full tags; tag selection moves to config/scripts/stable-release-tags.mjs so both use one rule.
The profile preflight parser now takes the expected runtime identity from the caller (shipped callers pass the pinned Bun identity), and the native preflight is renamed to orcad-runtime-native-preflight with neutral wording.
… check Add src/shared/node-runtime-pin.ts (NODE_RUNTIME_PIN, SERVER_TARGETS, NODE_RUNTIME_ASSETS for all 8 server targets plus the headers tarball), generated by config/scripts/update-node-runtime-pin.mjs from the nodejs.org and unofficial-builds SHASUMS. check-node-runtime-pin.mjs verifies, with no network, that the pin tracks the locked Electron, matches engines.node's major, and covers exactly SERVER_TARGETS; it runs in the static analysis job. ORCAD_BUN_TARGETS consumers now read SERVER_TARGETS so there is one target list; orcad's Bun runtime and build output are unchanged.
# Conflicts: # src/shared/orcad-bun-runtime.ts
# Conflicts: # package.json
…s at N-API 8 - build-orcad-prebuilds.mjs adds win32-x64/arm64 (conpty.node, the vendored conpty.dll/OpenConsole.exe, upstream's N-API conpty_console_list.node), compiles in a scratch copy against the hash-verified pinned headers (node.lib pinned per Windows arch) with NAPI_VERSION=8, rejects post-8 node_api_* imports, and writes a schema 2 manifest with per-file sha256, N-API level and the glibc need. - --require-slots [slots] verifies files against hashes; --smoke loads the slot under the pinned Node and spawns a PTY; --print-slot names the host slot. - The slot installer gates on N-API, libc, arch, glibc and file hashes instead of the exact NODE_MODULE_VERSION, and installs nested files (conpty/). - bun-profile-tests.yml builds, verifies and smokes each runner's slot.
…uild slots musl's unversioned libc cannot satisfy openpty@GLIBC_* references at link time, so the Alpine slot compile would fail. Pin the staged pty.cc guard to __GLIBC__ and assert both musl transforms against the installed patch.
|
| shell: bash | ||
| run: | | ||
| pnpm build:orcad-prebuilds | ||
| pnpm build:orcad-prebuilds --require-slots "$(node config/scripts/build-orcad-prebuilds.mjs --print-slot)" |
There was a problem hiding this comment.
Full matrix remains unchecked Each CI runner passes only its own slot to
--require-slots (the other lanes do the same), and the runners do not combine their prebuild trees. This verifies individual builds but never checks that a release contains all eight slots, so a missing slot in the assembled release could go unnoticed. Please add a check against the combined release artifact.
| problems.push(`${slot}: not built`) | ||
| continue | ||
| } | ||
| for (const [file, expected] of Object.entries(entry.files ?? {})) { |
There was a problem hiding this comment.
There was a problem hiding this comment.
ℹ️ No critical issues — one small hardening gap inline and one scope question below.
Reviewed changes
- Loader gate rewritten (
src/main/orcad/node-pty-prebuilt-slot.ts):NODE_MODULE_VERSIONcheck replaced by N-API ≤ host, libc, arch, glibc floor and per-file sha256; schema-2 manifest validated with zod; slot-file keys guarded against path escape. - Build script (
config/scripts/build-orcad-prebuilds.mjs): compiles in a scratch copy (nevernode_modules/node-pty) against the pinned, hash-verified Node headers at N-API 8; 8 slots incl.win32-{x64,arm64}; adds--require-slots [slots],--smoke,--print-slot. - Slot contents (
config/scripts/orcad-prebuild-slot-contents.mjs): slot file lists, Windows ConPTY payload,findPostBaselineNodeApiNames, schema-2mergeManifest/findSlotProblems. - Pinned downloads (
config/scripts/pinned-node-downloads.mjs): hash-verified headers,node.liband node executable. - Smoke (
orcad-prebuild-smoke.mjs+-child.cjs): stages the slot binary-only and runs a PTY echo under the pinned Node. - Pin schema (
src/shared/node-runtime-pin.ts,update-node-runtime-pin.mjs,check-node-runtime-pin.mjs): addswindowsImportLibs,nodeRuntimeHeadersUrl,isWindowsServerTarget. - CI (
.github/workflows/bun-profile-tests.yml): every runner/container lane builds, hash-verifies and smoke-loads its own slot. - musl (
f2c6d30): the patch's glibc.symverpins and-l:libutil.so.1are scoped to__GLIBC__builds.
Verified locally: 128 targeted tests pass across the 8 changed test files, windows-cmd-shim-spawn-boundary passes, pnpm run check:code-quality:changed reports 0 findings, and check:node-runtime-pin passes. I also confirmed the scratch copy contains everything the win32 conpty target needs at compile time, that node-gyp resolves <nodedir>/include/node/common.gypi, that SLOT_FILE blocks ../absolute/backslash keys, and that every N-API 9/10 addition Node exposes really is node_api_*-prefixed (so findPostBaselineNodeApiNames' heuristic is sound).
ℹ️ The full-matrix release gate is not exercised anywhere
--require-slots with no argument is the only path that checks all eight slots, but every call site in bun-profile-tests.yml passes a single slot and the runners never combine their out/orcad/prebuilds trees. The docs and script comments still say --require-slots "fails a release with a hole in the matrix," so a release assembled with a missing slot would pass this workflow unnoticed.
Technical details
# Full-matrix gate has no caller
## Affected sites
- `.github/workflows/bun-profile-tests.yml:108,150,186` — each lane passes exactly its own slot to `--require-slots`, and each job's `out/orcad/prebuilds` is discarded at job end.
- `config/scripts/build-orcad-prebuilds.mjs:245-256` — `requireSlots(slots)` checks only the requested slots.
- `docs/reference/linux-glibc-compatibility.md:120-124` — still states `--require-slots` fails a release with a hole in the matrix.
## Open questions for the human
- Is the assembled-release check intended for Phase 2 alongside relay consumption, or should this PR add one full-matrix run against the merged artifact? If the former, the doc sentence is ahead of the pipeline.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| problems.push(`${slot}: not built`) | ||
| continue | ||
| } | ||
| for (const [file, expected] of Object.entries(entry.files ?? {})) { |
There was a problem hiding this comment.
A slot entry whose files map is empty passes --require-slots without checking anything, and installPrebuiltSlot would report { installed: true } after copying no addon. Since these two exports exist to prove a slot is intact, require the slot's primary addon (pty.node, or conpty.node on win32) to be listed before treating it as complete.
Technical details
# Empty slot passes verification
## Affected sites
- `config/scripts/orcad-prebuild-slot-contents.mjs:161` — `Object.entries(entry.files ?? {})` iterates nothing for an empty map.
- `src/main/orcad/node-pty-prebuilt-slot.ts:169-197` — same empty loop, then returns `installed: true, spawnHelper: false` with nothing copied; the subsequent load probe is the only thing that catches it.
## Required outcome
- `findSlotProblems` and `installPrebuiltSlot` reject a slot that does not list the platform's primary native module.
## Open questions for the human
- Not reachable from `slotSourceFiles` (it always lists at least one addon and throws if the source is missing), so this is hardening of the integrity gate rather than a live bug.The official Node headers' config.gypi sets clang: 0, so common.gypi skips its gnu++20 xcode_settings and Apple clang 15 (macos-14 runners) compiles node-addon-api as C++98.
There was a problem hiding this comment.
✅ No new issues found in the commit since the last review.
Reviewed changes
- Pinned the macOS C++ standard in the prebuild compile gypi:
prebuildCompileGypi(renamed fromnapiVersionGypi) now adds anOS=="mac"condition settingCLANG_CXX_LANGUAGE_STANDARD: gnu++20andCLANG_CXX_LIBRARY: libc++, so node-gyp's DarwinXcodeSettingssupplies the standard Node'scommon.gypiskips whenconfig.gypireportsclang: 0. - Renamed the generated include to
prebuild-compile.gypiand updated the pin test to assert the macOS condition.
Verified against real gyp sources (node-gyp 12.3.0): target_defaults.conditions is deep-copied into each target and evaluated at PHASE_LATE, target-level xcode_settings is pushed into configurations, and the Darwin make generator's GetCflagsCC honors CLANG_CXX_LANGUAGE_STANDARD/CLANG_CXX_LIBRARY (node-pty's own cflags_cc is ignored on mac). Also confirmed the load-bearing comment: the pinned node-v24.21.0-headers.tar.gz (hash matches the pin) ships a config.gypi with "clang": 0. The 30 focused tests across the two touched test files pass.
The prior pullfrog review's empty-slot hardening thread remains open (this commit does not touch it), so this is not an approval.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…ilds # Conflicts: # config/scripts/check-node-runtime-pin.mjs # config/scripts/check-node-runtime-pin.test.mjs # config/scripts/update-node-runtime-pin.mjs # config/scripts/update-node-runtime-pin.test.mjs # package.json # src/shared/node-runtime-pin.ts # src/shared/orcad-bun-runtime.ts
| const pause = count(capacity.normalAdmissionPause, 'normal admission pause') | ||
| const used = Math.max( | ||
| count(capacity.observedConnections, 'observed connections'), | ||
| count(capacity.enforcedConnectionUnits, 'enforced connection units') | ||
| ) | ||
| const reserved = count(capacity.pendingControlReservations, 'pending control reservations') | ||
| return Math.max(0, pause - used - reserved) |
There was a problem hiding this comment.
Drain gate misses request capacity The new pre-drain check counts free connection slots but not request reservations. If a general cell has connection headroom while its request reservations have reached capacity, this check can approve a drain even though placement will exclude that cell. Hosts may then keep redialling the drained cell instead of moving.
Knowledge Base Used:
| case 'unusable': | ||
| report(legacy) | ||
| return NO_LEGACY_JOURNAL_RECORDS |
There was a problem hiding this comment.
Unusable records become unrecoverable If both copies of the legacy session-record file are unparseable, this branch completes the version-4 migration without importing them. Later version-4 opens do not retry the file, so repairing a retained copy will not automatically restore the sessions it held.
|
|
||
| // Why a separate upload URL above 32MB: the direct endpoint rejects larger | ||
| // files, and every Orca installer is far past that. | ||
| async function uploadArtifact(filePath, apiKey) { |
There was a problem hiding this comment.
There was a problem hiding this comment.
ℹ️ No new issues in this PR's own files — this update is a sync merge. One scope observation below.
Reviewed changes
- Merged
origin/maininto the branch (ae1f235): every prebuild, loader, pin and CI file this PR authors is byte-identical to16a3893, and the merge deletes nothing frommain. - Resolved main's rename of the native preflight (
src/main/orcad): kept this branch'sorcad-runtime-native-preflightfile andpreflightOrcadNativeRuntimeexport over main'sorcad-bun-native-preflightrename; no dangling references remain andORCAD_BUN_RUNTIME_IDENTITYis still exported. - Added
config/scripts/pr-code-change-scope-daemon-protocol.test.mjs: a 21-line test for the daemon-protocolcross-version-wirerouting already present inpr-code-change-scope.mjs.
ℹ️ The merge inflates the PR diff against its base to 1502 files
OrcaWin/node-rt-phase1 is still at de2822e and does not contain main, so merging origin/main into the feature branch makes the base ← head diff include every file main changed since the fork. Before this merge the PR changed 25 files; it now reports 1502. This PR's own changes are buried, and automated reviewers are now reporting on unrelated main work — greptile's review at ae1f235 raised findings against cloud/dev/scripts/check-relay-same-cap-headroom.mjs, config/scripts/scan-release-artifacts-antivirus.mjs and src/main/runtime/agent-session-legacy-record-import.ts, none of which this PR authors.
Technical details
# Stacked PR diff includes all of main
## Affected sites
- `OrcaWin/node-rt-phase1` (`de2822e`) — base branch, does not contain `main`.
- `ae1f235` — merge of `3135fbb` (`origin/main`) into `OrcaWin/node-rt-prebuilds`.
- `git diff --stat --merge-base OrcaWin/node-rt-phase1` reports 25 files at `16a3893` and 1502 files at `ae1f235`.
## Required outcome
- The PR's reviewable diff should contain only this PR's prebuild changes.
## Open questions for the human
- Is the plan to merge `main` into `OrcaWin/node-rt-phase1` (so the base advances and the diff shrinks), or to retarget this PR once phase1 lands? If the branch is meant to carry main ahead of its base, the current diff is expected noise.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Comments Outside DiffThese findings could not be posted inline.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (25)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe prebuild matrix now includes Windows x64 and arm64 and builds slots using hash-verified Node runtime assets. Schema-v2 manifests record slot compatibility metadata and file hashes. Installation checks the host runtime and verifies slot files before copying them. CI builds, verifies, and smoke-tests slots on their runner platforms. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The prebuild pipeline checks host compatibility and file integrity before installation. The Windows linking and Alpine runtime concerns were disproved; the change is mergeable subject to normal CI checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change strengthens compatibility and integrity checks for shipped native binaries. No introduced security vulnerability was established, but local file ownership and interrupted or concurrent installation remain insufficiently verified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 48.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 54 functions across 22 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Merged
origin/maininto the branch (068b4ee): a sync merge that leaves every prebuild, loader, pin and CI file this PR authors byte-identical to the previous review (16a3893/ae1f235). Its only net tree effect is 35 unrelated native-chat files from main's#24267and#23935; main's#24088and#24089are content-identical to the equivalent commits already in the branch, so they produce no diff. - Base retargeted to
main: the PR now reviews the 25 files it authors rather than the 1502-file tree that came with the earlier staleOrcaWin/node-rt-phase1base, so the earlier diff-scope observation no longer applies.
The prior inline hardening thread (a slot with an empty files map passing the integrity gate) is untouched by this merge and remains open, so this is not an approval.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
Superseded: the cutover PR #24110 contains every change here, built on top of it, plus current main. Landing them together saves a second multi-hour CI cycle. |

ELI5
Remote servers currently compile the terminal library (node-pty) on the host, which fails without a compiler. This builds node-pty in Orca's CI for all 8 server platforms, against the exact pinned Node, and checks each build before the loader will use it.
What Changed
build-orcad-prebuilds.mjs:conpty.node, the bundledconpty.dll/OpenConsole.exe, and upstream's N-APIconpty_console_list.node.--nodedir), and on Windows againstnode.lib, which is also pinned.NAPI_VERSION=8explicitly, so host Node 18 can load the addon.--require-slots(hash verification) and--smoke(load the addon under the pinned Node and run a PTY).verify-linux-glibc-floor.cjsgate..symverpins and thelibutil.so.1link flag to glibc builds.node-pty-prebuilt-slot.ts): the exact Node ABI check is replaced by N-API ≤ host, libc, arch, glibc floor and file hashes. New refusal reasons:napi-unsupported,libc-mismatch,arch-mismatch,glibc-too-old,hash-mismatch, and path escapes.bun-profile-tests.ymlbuilds, verifies and smoke-tests its own slot.Why
This extends the existing script rather than adding a new pipeline. N-API (not the Node ABI) is what makes one binary per platform enough.
Linked Issue
Part of the Node runtime plan (design D2 and D6). Addresses the root cause of #1693, #20386 and #22159 once the relay uses these builds (Phase 2). Stacked on
OrcaWin/node-rt-phase1.Visual Proof
N/A. This changes the build pipeline and the loader, with no UI.
Testing
darwin-arm64, built locally with the pinned Node 24.21.0: the build,
--require-slotsand--smokeall pass. The samepty.nodeloads and runs a PTY under Node 18.0.0.The desktop's
pty.nodehash is unchanged after the builds.356 targeted tests pass.
pnpm tcand the changed-code gate pass.Not yet built anywhere: win32 x64/arm64, the linux glibc slots (ubuntu:20.04) and the musl slots (Alpine). This PR's CI is their first run.
Open question: glibc slots are gated at 2.31 (the desktop floor), but the pinned Node runs on 2.28. That leaves hosts on 2.28–2.30 refused.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.