You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: stop requiring node-pty in the Windows desktop package - #413
Desktop 2.0.1 and every desktop Nightly fail on Windows in Stage desktop runtime with desktop Host is missing a real Windows node-pty file: ...\node-pty\prebuilds\win32-x64\pty.node. Refs #412.
Bug Reproduction Steps
Look at desktop release run 43552830250 (tag desktop-v2.0.1), or Nightly runs 43585467313 and 43706525483.
The windows job fails in scripts/stage-runtime.ts at the assertWindowsNodePty check.
Root Cause
#402 removed the PTY terminal API and dropped node-pty from the @pymodel/pythinker-code optional dependencies and the lockfile. No workspace package depends on node-pty now, so pnpm deploy never installs it.
Desktop 2.0.0 then failed in afterPack because afterPack still required the win32 node-pty addons. #408 read that failure as a symlink/junction problem and added a staging check that requires the same files. The files can never exist, so every Windows desktop build now fails.
This is a fundamental fix: the requirement is stale, so it is removed.
Code Changes
apps/desktop/scripts/stage-runtime.ts: remove the node-pty dereference and the Windows pty.node check.
apps/desktop/scripts/verify-packaged-runtime.ts: afterPack checks only the Host entrypoints (dist/main.mjs, dist-web/index.html) on all platforms. The Windows node-pty restore and check are removed.
Root package.json: remove the fix-node-pty-perms.mjs postinstall and delete the script. It only logs "Cannot find module 'node-pty'" now.
Tests: remove the node-pty tests. Add a test that a Windows shell without any node-pty addon passes afterPack.
Tries to chmod node-pty spawn-helper, logs "skipped"
Step removed
Nobody: node-pty is not installed
None needed
macOS and Linux packaging is unchanged: the removed checks ran only for win32. Coverage: apps/desktop/tests/stage-runtime.spec.ts and apps/desktop/tests/verify-packaged-runtime.spec.ts.
The macOS desktop job still fails until the Apple Developer agreement is renewed (notarytool HTTP 403). That is account state, not code.
I have linked a related issue (external PRs: issue must have a maintainer's /approve).
I have added tests that prove my feature works.
The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
Ran gen-changesets skill, or this PR needs no changeset.
Ran gen-docs skill, or this PR needs no doc update.
Summary by CodeRabbit
Bug Fixes
Fixed an issue affecting Windows desktop installer builds.
Improved packaged-runtime verification across desktop platforms, helping ensure required application components are present in builds.
The terminal API removal dropped node-pty from the CLI dependencies, but
desktop staging and afterPack still required its win32-x64 addons, so every
Windows desktop build (2.0.1 and each Nightly) failed in stage-runtime.
Remove the stale requirement and the dead node-pty postinstall fixup.
Reviewing files that changed from the base of the PR and between 57fcf3b and ab6cf5d.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The Windows desktop runtime changes remove node-pty-specific staging and packaging checks, along with a postinstall permission-repair script. The packaged-runtime tests now accept packages that contain the required Host entrypoints without a Windows node-pty addon.
Staging no longer dereferences node-pty symlinks or checks for Windows addon files. afterPack verifies Host entrypoints without repairing or checking node-pty files. Tests now expect verification to pass when the Host entrypoints exist without a node-pty addon. The Host supervisor comment refers to surviving child processes as “shells,” and the changeset records a patch release for a Windows installer build fix.
This change removes node-pty-specific Windows packaging checks and a permission-repair postinstall that the removed terminal feature made unnecessary. This should let the Windows desktop installer build again. No concrete regression was found, so the merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title uses the conventional-commit prefix "fix:", is 59 characters (under 72), and summarizes the main change: the Windows desktop package no longer requires node-pty. The title is in imperative m…
Description check
The description follows the repository template: it has Requirement or Bug, Bug Reproduction Steps, Root Cause (stating it is a fundamental fix), Code Changes, Behavior Changes and Affected Users (tab…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title uses the conventional-commit prefix "fix:", is 59 characters (under 72), and summarizes the main change: the Windows desktop package no longer requires node-pty. The title is in imperative mood, matching the stated requirement.
Full details: Description check
Explanation
The description follows the repository template: it has Requirement or Bug, Bug Reproduction Steps, Root Cause (stating it is a fundamental fix), Code Changes, Behavior Changes and Affected Users (table with before/after, affected users, escape hatch, and coverage), and the checklist. It names the affected test files. Minor gaps: the requirement line refers to #412 rather than a linked approved issue, and the checklist items are all ticked without a visible approval reference, but the description is substantially complete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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
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.
Requirement or Bug
Desktop 2.0.1 and every desktop Nightly fail on Windows in
Stage desktop runtimewithdesktop Host is missing a real Windows node-pty file: ...\node-pty\prebuilds\win32-x64\pty.node. Refs #412.Bug Reproduction Steps
desktop-v2.0.1), or Nightly runs 43585467313 and 43706525483.windowsjob fails inscripts/stage-runtime.tsat theassertWindowsNodePtycheck.Root Cause
#402 removed the PTY terminal API and dropped
node-ptyfrom the@pymodel/pythinker-codeoptional dependencies and the lockfile. No workspace package depends onnode-ptynow, sopnpm deploynever installs it.Desktop 2.0.0 then failed in
afterPackbecauseafterPackstill required the win32node-ptyaddons. #408 read that failure as a symlink/junction problem and added a staging check that requires the same files. The files can never exist, so every Windows desktop build now fails.This is a fundamental fix: the requirement is stale, so it is removed.
Code Changes
apps/desktop/scripts/stage-runtime.ts: remove thenode-ptydereference and the Windowspty.nodecheck.apps/desktop/scripts/verify-packaged-runtime.ts:afterPackchecks only the Host entrypoints (dist/main.mjs,dist-web/index.html) on all platforms. The Windowsnode-ptyrestore and check are removed.package.json: remove thefix-node-pty-perms.mjspostinstall and delete the script. It only logs "Cannot find module 'node-pty'" now.node-ptytests. Add a test that a Windows shell without anynode-ptyaddon passesafterPack.Behavior Changes and Affected Users
node-ptywin32 addonsnode-ptynode-ptysince #402pnpm installpostinstallnode-ptyspawn-helper, logs "skipped"node-ptyis not installedmacOS and Linux packaging is unchanged: the removed checks ran only for
win32. Coverage:apps/desktop/tests/stage-runtime.spec.tsandapps/desktop/tests/verify-packaged-runtime.spec.ts.The macOS desktop job still fails until the Apple Developer agreement is renewed (notarytool HTTP 403). That is account state, not code.
Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Summary by CodeRabbit