Skip to content

fix(runtime): preserve workspace bins through nested shims - #1207

Merged
jdx merged 1 commit into
mainfrom
agent/fix-workspace-shim-path
Aug 1, 2026
Merged

jdx merged 1 commit into
mainfrom
agent/fix-workspace-shim-path

Conversation

@jdx

@jdx jdx commented Aug 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • fall back to the workspace-root node_modules/.bin for recursive and member-local execs
  • put member and workspace-root bin directories on PATH for exec descendants
  • restore activated package-manager shims after aube node resolves the real Node executable
  • preserve wrapper-runtime PATH precedence while avoiding node-shim recursion
  • cover sequential/parallel recursive exec and Node-grandchild package-manager spawns

Root cause

Recursive exec resolved binaries only from each member's .bin, unlike pnpm's workspace-root extraBinPaths behavior. Separately, the activated node shim sanitized the shim directory before handing off to real Node, so Node tools such as Rspack could not subsequently spawn pnpm.

Validation

  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --check
  • focused BATS regressions for workspace-root exec and Node-descendant shim propagation

AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.


Note

Medium Risk
Touches exec PATH assembly and Node resolution paths used by scripts and nested spawns; behavior is regression-tested but affects runtime/shim ordering across workspaces and activation.

Overview
Recursive aube exec now resolves binaries from the member’s node_modules/.bin first, then the workspace root .bin when present, matching pnpm-style extraBinPaths. build_bin_command always sets child PATH from member plus root bin dirs (via path_entries_with_project_bins) instead of only wiring PATH in shell mode or for native shims.

aube node resolves the real Node binary before applying PATH (resolved_node_program), and uses node_child_path_entries so activated pnpm/npm/yarn shims stay visible to Node descendants without re-entering the node shim. BATS cover workspace-root recursive exec and pnpm reachable from a Node grandchild under activation.

Reviewed by Cursor Bugbot for commit e181824. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes

    • Improved command resolution for project and workspace-local binaries across sequential, parallel, and terminal execution.
    • Improved Node executable resolution while preserving explicitly specified paths.
    • Ensured activated package-manager shims remain available to Node child processes.
  • Tests

    • Added coverage for recursive execution of workspace-level binaries.
    • Added coverage for package-manager shim resolution through Node descendants.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 457c1598-35e5-445e-a4cb-25892168f17a

📥 Commits

Reviewing files that changed from the base of the PR and between abe4c1c and e181824.

📒 Files selected for processing (5)
  • crates/aube/src/commands/exec.rs
  • crates/aube/src/commands/node.rs
  • crates/aube/src/runtime.rs
  • test/exec.bats
  • test/runtime.bats

📝 Walkthrough

Walkthrough

aube exec now resolves project and workspace-root binaries across execution modes. Node commands now preserve runtime-specific tool shims in child PATH values and resolve bare or activated-shim Node programs.

Changes

Runtime-aware execution

Layer / File(s) Summary
Node child PATH resolution
crates/aube/src/runtime.rs, crates/aube/src/commands/node.rs, test/runtime.bats
Node child processes now receive runtime and activated-shim PATH entries. Bare and shim-based Node paths use node_on_path(), while explicitly qualified paths remain unchanged.
Workspace binary resolution
crates/aube/src/commands/exec.rs, test/exec.bats
exec searches project and workspace-root .bin directories for non-recursive, sequential, parallel, and terminal execution. Tests cover serial and parallel workspace binary execution.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • jdx/aube#1079: Modifies Node runtime resolution and PATH propagation.
  • jdx/aube#1086: Modifies executable resolution and child PATH construction across exec, node, and runtime code.
  • jdx/aube#1187: Extends activated-shim PATH handling to Node child execution.

Poem

A bunny hops through .bin bright,
From workspace roots to paths of light.
Node keeps its shims close behind,
Serial and parallel paths align.
“Run every tool!” the rabbit sings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the runtime fix for preserving workspace binaries through nested shims.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Preserves workspace-root binaries during local and recursive execs, restores activated package-manager shims for Node descendants, and adds regression coverage for sequential, parallel, and nested-runtime execution.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or non-blocking defects identified.

The changed binary lookup and PATH construction preserve local precedence, add the intended workspace fallback, and resolve the initial real Node executable before activated shims are restored for descendants.

Important Files Changed

Filename Overview
crates/aube/src/commands/exec.rs Adds member-first, workspace-root-fallback binary resolution and propagates both bin directories to exec descendants without an identified correctness issue.
crates/aube/src/commands/node.rs Resolves the real Node executable before restoring activated shims to descendant PATH, preventing immediate node-shim recursion.
crates/aube/src/runtime.rs Adds PATH composition for Node children that preserves wrapper precedence and activated package-manager shim availability.
test/exec.bats Covers workspace-root binary fallback for sequential and parallel recursive exec.
test/runtime.bats Covers package-manager shim availability from a Node grandchild.

Reviews (1): Last reviewed commit: "fix(runtime): preserve workspace bins th..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

Instruction counts

benchmark trend instructions Δ wall (min) Δ
graph ███▅▂▃▃▅▅▄▂▃▆▃▅▅▄▁▆▆ 16,717,856 → 16,717,931 +0.00% 3.73 → 3.21ms -13.95%
install ▁▂▃▃▂▂▃▂▂▂▂▅▄▄▅▅▅█▃▅ 103,126,646 → 103,193,484 +0.06% 33.10 → 25.57ms -22.75%
startup ▄▃█▅▁▄▁▂▆▅▅▁▇▅▂▂▂▁▂▃ 7,667,672 → 7,671,109 +0.04% 3.13 → 2.42ms -22.76%
tree ▂▂▂▁▁▁▂▁▂▁▇▇█▇███▇██ 17,803,447 → 17,802,016 -0.01% 3.71 → 3.38ms -8.89%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

e1818243e8aa vs ce0a768adfdf · measured on this runner, not pushed to the history.

@jdx
jdx merged commit 6796694 into main Aug 1, 2026
20 checks passed
@jdx
jdx deleted the agent/fix-workspace-shim-path branch August 1, 2026 17:30
@cursor cursor Bot mentioned this pull request Aug 1, 2026
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