fix(runner): link pinned packages into the outer hop - #1397
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
WalkthroughThe runtime dependency set updates Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant prepareRunDir
participant populateOuterHop
participant linkPinnedPackages
participant depsRoot
prepareRunDir->>populateOuterHop: pass depsRoot
populateOuterHop->>linkPinnedPackages: link pinned packages after install
linkPinnedPackages->>depsRoot: read pinned packages
linkPinnedPackages-->>populateOuterHop: create links in runDir/node_modules
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Note
PR body AI drafted & edited as needed
Overview of Changes
qawolf flows runfails withERR_MODULE_NOT_FOUND: Cannot find package '@qawolf/flows'when a project dependency (e.g.@qawolf/pom) peer-depends on a pinned executor package. The fallbacknpm install --legacy-peer-depsnever installs peer deps, and the inner hop that owns the pinned packages is not on the resolution path of packages living in the outer hop — Node resolution only walks upward, andexec/node_modulesis a sibling subtree. Flows built on the page-object pattern hit this on every install-mode run, on all three channels (node, bun, compiled binary).How it works
outerHop.ts): after the fallback install, every pinned package is linked from the managed runtime intorunDir/node_modulesvialinkPinnedPackages— extracted frompopulateInnerHopand now shared by both hops. Executor names are already stripped from the install list so no collision is possible, and an npm-installed copy of a pinned package (regular transitive dep) is replaced — the whole run resolves a single instance of each executor package through the shared realpath. Symlink-mode outer hops are untouched: we never inject into the user's tree, and package managers install peers there natively.@qawolf/flows0.1.1 → 0.1.4, satisfying@qawolf/pom's^0.1.4peer range. 0.1.4 addsexpect-webdriverioas a peer and imports it fromconfigureFlowRuntime(loaded on every run), so it is pinned too (5.6.5) — the--legacy-peer-depsmanaged-runtime install would otherwise never provide it.Testing
bun run typecheck bun run lint bun run format:check bun run knip bun run test bun run buildouterHop.install.test.ts(file-size cap).@qawolf/pomwith no localnode_modules:@qawolf/pomdep), node CLICannot find package '@qawolf/flows'from@qawolf/pom/distResolveMessage: Cannot find module '@qawolf/flows/web'latest+workspace:*specs)Checklist