Skip to content

fix(acp): harden env-shebang startup#858

Merged
matt2e merged 3 commits into
mainfrom
installation-env-interpreter-fixes
Jul 6, 2026
Merged

fix(acp): harden env-shebang startup#858
matt2e merged 3 commits into
mainfrom
installation-env-interpreter-fixes

Conversation

@matt2e

@matt2e matt2e commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Share doctor binary resolution with ACP discovery.
  • Resolve env-shebang ACP launchers against the captured home environment before spawning.
  • Thread interpreter snapshots into staged action detection and badge generation, with regression tests.

matt2e added 2 commits July 6, 2026 15:57
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>
@matt2e
matt2e requested review from baxen and wesbillman as code owners July 6, 2026 07:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@matt2e
matt2e merged commit 74e25c7 into main Jul 6, 2026
6 checks passed
@matt2e
matt2e deleted the installation-env-interpreter-fixes branch July 6, 2026 11:07
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