Skip to content

fix(orchestrate): stage the agent's dependencies where npx hoists them - #8

Merged
psanders merged 1 commit into
mainfrom
fix/agent-hoisted-deps
Nov 4, 2026
Merged

psanders merged 1 commit into
mainfrom
fix/agent-hoisted-deps

Conversation

@psanders

@psanders psanders commented Nov 4, 2026

Copy link
Copy Markdown
Member

The second DigitalOcean run (fonoster/routr Benchmarks run 41757164731) created the droplets and then failed with perfkit: dependency commander is not installed in /home/runner/.npm/_npx/…/node_modules/perfkit. Teardown deleted everything; 0 droplets remain.

Under npx, perfkit's dependencies are hoisted beside it in npx's node_modules, not nested inside it. stageAgentPackage looked only inside, so it couldn't find them. It now finds each dependency the way Node resolves it: the nearest node_modules in the package's directory or any parent. The new tests cover the nested layout, the npx-hoisted layout (with a transitive dependency) and a missing dependency. Version 0.1.2.

Verified with the exact failing path: npx -y npm@11 exec --package=github:fonoster/perfkit#<this branch> -- perfkit run --local on examples/minimal.

🤖 Generated with Claude Code

Under npx, perfkit's dependencies sit beside it in npx's node_modules, not inside it, so the agent upload failed with 'dependency commander is not installed'. Dependencies are now found the way Node resolves them: the nearest node_modules in the package's directory or any parent.
@psanders
psanders merged commit 21cf6f0 into main Nov 4, 2026
2 checks passed
@psanders
psanders deleted the fix/agent-hoisted-deps branch November 5, 2026 14:26
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.

1 participant