Repository navigation
feat(embed): allow runtimes to leave PATH unchanged - #1189
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Greptile SummaryAdds an embedder runtime option that preserves inherited
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "feat(embed): allow runtimes to leave PAT..." | Re-trigger Greptile |
Instruction counts
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.
|
710bc00 to
a36c67a
Compare
Summary
EmbedderRuntime::without_path()to preserve the inheritedPATHNODEpath_dir(...)andwithout_path()follow last-call-wins builder semanticsWhy
Embedding hosts may need to supply the Node program and npm exec path without changing how bare
nodecommands resolve. Previously, wrapper runtimes always derived a PATH entry fromnode_program.parent(), so that configuration was not expressible.This is a stacked follow-up to #1188 and targets its branch so this PR contains only the explicit PATH opt-out. It can be retargeted to
mainafter #1188 merges.Validation
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo testAI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.
Note
Low Risk
Additive embedder builder API with unchanged defaults; only affects hosts that opt in via
without_path().Overview
Adds
EmbedderRuntime::without_path()so embedding hosts can keep the inheritedPATHwhile still settingNODE,npm_node_execpath, and using the configured program for direct aube spawns. Wrapper runtimes no longer always prepend the shim’s parent directory toPATH.path_dir(...)andwithout_path()use last-call-wins builder semantics (path_dirclears the opt-out;without_pathwins if called last).selectorwithwithout_path()still resolvesnode_programfrom the bin dir but does not prepend it toPATH.Docs and unit tests cover wrapper, selector, and builder ordering.
Reviewed by Cursor Bugbot for commit a36c67a. Bugbot is set up for automated code reviews on this repo. Configure here.