fix(acp): harden env-shebang startup#858
Conversation
Route simple ACP launches through the shared env-shebang interpreter resolver and let Staged one-shot callers provide the home/global interpreter snapshot while preserving the spawned agent environment. Add DoctorEnv guardrail tests covering agent resolution and auth execution against login-shell PATH rewrites. Signed-off-by: Matt Toohey <contact@matttoohey.com>
Route ACP command discovery and env-shebang interpreter PATH lookup through doctor resolver helpers. Expose doctor's PATH-only executable resolver so doctor remains independent while ACP depends on it. Signed-off-by: Matt Toohey <contact@matttoohey.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f06d1c759a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| { | ||
| true | ||
| } | ||
| doctor::resolve::resolve_binary(cmd).path |
There was a problem hiding this comment.
Require executable ACP paths from doctor resolution
When no login-shell/common-path match exists, this delegation can now return a stale npm-global entry that merely exists but is not executable, because doctor::resolve_binary's npm fallback accepts path.exists() rather than an executable file. In that case discover_providers/find_acp_agent* will report the ACP provider as installed, but the later session or action-detection spawn will fail with a non-executable path; the old ACP resolver only returned executable files. Please either filter the returned path here or tighten the shared resolver before using it for ACP spawning.
Useful? React with 👍 / 👎.
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Summary: