Skip to content

fix(durable): resolve Pi host peers in managed installs - #220

Merged
monotykamary merged 2 commits into
fabric-runtime:mainfrom
0xCUB3:fix/durable-worker-host-peers
Oct 7, 2026
Merged

monotykamary merged 2 commits into
fabric-runtime:mainfrom
0xCUB3:fix/durable-worker-host-peers

Conversation

@0xCUB3

@0xCUB3 0xCUB3 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

pi-durable children could not start on a Pi-managed install. The worker imports Pi's packages by name, and Pi omits those peers from its extension install. Node and Bun both failed with ERR_MODULE_NOT_FOUND.

The fix passes the host package root to the worker as --pi-package-dir. Node resolves misses through a registerHooks fallback. Bun has no hooks, so the launcher sets NODE_PATH instead, and the worker removes it before tools run. The host lookup is shared with the capture interceptor in src/host-package.ts.

New tests boot the durable worker from a peerless install under both runtimes. They fail on main and pass here. bun run test:changed passes. Live pi-durable runs with tools completed under Bun and Node on macOS with Pi 1.0.4. Windows is untested.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

0xCUB3 and others added 2 commits October 6, 2026 05:51
Merge the current main branch into fabric-runtime#220 and retain the shipped private SDK
instead of falling back to arbitrary modules from the running Pi host.

Bun-launched durable workers now delegate the SDK host to Node.js 24+,
matching the declared package engine and preserving peer resolution hooks.
Add a real installed-package Bun parent/worker/tool regression and document
the runtime requirement.

@monotykamary monotykamary left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reconciled this PR with the pinned private SDK already shipped in 265d303. The original fallback could resolve arbitrary missing modules from the host tree and expanded NODE_PATH under Bun; that would weaken the worker's SDK isolation and duplicate startup lookup work.

76a9cff keeps the pinned SDK and uses the package's required Node.js 24+ runtime for the SDK host when Bun launches the parent. Added an installed-package Bun parent/worker/tool regression, while preserving peerless Node, conflicting-peer, missing-SDK, recovery, and recursive Fabric coverage. Documented the Node-on-PATH requirement.

Local targeted tests, typecheck, artifact guards, and fresh builds passed. Merging only after both platform checks pass.

@monotykamary
monotykamary merged commit f7bdf1e into fabric-runtime:main Oct 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants