fix(server): pin background service to a stable Node path - #1
Draft
cestercian wants to merge 414 commits into
Draft
cestercian wants to merge 414 commits into
cestercian wants to merge 414 commits into
Conversation
…1407) Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
…de_modules (pingdotgg#11750) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…og (pingdotgg#11753) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
… only (pingdotgg#11770) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…gg#11572) Co-authored-by: maria-rcks <maria@kuuro.net>
…e palette open (pingdotgg#11762) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
… on the clone (pingdotgg#11774) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…1765) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…nect login (pingdotgg#11794) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ingdotgg#11811) Co-authored-by: Bil0000 <bilal.bakr.elsherif@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…rets (pingdotgg#11760) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…7861) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…exists (pingdotgg#12540) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Homebrew Node realpaths process.execPath into a Cellar keg that brew upgrade deletes. Persist the prefix shim in launchd/systemd units and spawn managed runtimes through the same durable path.
Versioned node@ formulas are keg-only, so rewriting Cellar execPath to $prefix/bin/node can pick a different major. Persist $prefix/opt/node@N/bin/node instead, and ignore argv0 unless it resolves to the same executable as execPath.
Keg-only node@ Cellar paths already rewrite to $prefix/opt/node@N/bin. Do not put an exec -a alias such as /tmp/not-node on the service PATH; prefer host.execPath unless argv0 resolves to the same Node binary.
cursor
Bot
force-pushed
the
cursor/macos-service-stable-node-path-9093
branch
from
September 19, 2026 11:39
cebee96 to
7b286d3
Compare
systemd units do not embed PATH. Check the launchd plist so a Cellar linuxbrew execPath still contributes $prefix/bin, not the keg.
launchd already received the durable host-Node directory. systemd ignored environmentPath, so Linuxbrew Cellar rewrites never reached the unit. Emit Environment=PATH=... and compare argv0 identity with bigint stats so large inodes cannot collide.
Thread transfer impact
This comment will update automatically after the next completed run. |
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.
What Changed
t3 service install/updatenow persist a durable absolute Node path in launchd and systemd units instead of Homebrew's versioned Cellar realpath. The service launcher uses the same path when handing off managed runtimes, so a laterbrew upgrade nodedoes not leaveProgramArguments[0]/ExecStartpointing at a deleted keg.Keg-only
node@*formulas rewrite to$prefix/opt/node@N/bin/noderather than$prefix/bin/node.process.argv0is kept only when it is an absolute non-keg path that resolves to the same executable asexecPath.Why
Homebrew's
/opt/homebrew/bin/nodeis a symlink. Node realpathsprocess.execPathto/opt/homebrew/Cellar/node/<version>/bin/node. That keg disappears on upgrade even though the prefix shim still works. The renderer already requires an absolute Node (noPATHlookup); the bug was pinning the keg realpath.node@22is keg-only, so$prefix/bin/nodecan be missing or a different major.exec -acan makeargv0a path that does not exist, so it is not trusted without a realpath/inode check.Fixes pingdotgg#11054
Checklist