fix(acp): accept missing_binary and unknown setup surfaces - #4085
Open
sniperguard wants to merge 1 commit into
Open
fix(acp): accept missing_binary and unknown setup surfaces#4085sniperguard wants to merge 1 commit into
sniperguard wants to merge 1 commit into
Conversation
`buzz-desktop` emits a `missing_binary` setup requirement when a managed
agent's configured harness command cannot be resolved in PATH
(desktop/src-tauri/src/managed_agents/runtime.rs). `buzz-acp` has no
matching `RequirementPayload` variant, so `SetupPayload::from_env()`
fails with a serde error and the harness exits 1 before it can nudge:
the agent crash-loops at startup and never comes online.
Add the `MissingBinary { command }` variant, and a `#[serde(other)]`
`Unknown` fallback so a surface added on the desktop side degrades to a
generic nudge instead of aborting the harness. Both sides ship in one
bundle but are versioned independently during development, so this skew
is reachable again.
Repro on Buzz Desktop 0.5.3 (macOS arm64): give a managed agent a bare
binary name that is not on the GUI app's PATH. The agent log shows the
serde error and exit code 1, retried twice ~185ms apart. Setting an
absolute path in Edit Agent -> Command works around it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: sniperguard <sniperguardltd@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buzz-desktopemits amissing_binarysetup requirement when a managed agent's configured harness command can't be resolved in PATH (desktop/src-tauri/src/managed_agents/runtime.rs).buzz-acp'sRequirementPayloadhas no matching variant, soSetupPayload::from_env()fails with a serde error and the harness exits 1 before it can nudge — the agent crash-loops at startup and never comes online. The user sees an agent that is simply dead, with no in-app explanation.Two changes:
MissingBinary { command }+ aninstruction()arm, so the surface deserializes and produces a nudge.#[serde(other)] Unknown, so any surface this build doesn't recognise degrades to a generic nudge instead of aborting the harness.(2) is why the failure mode was a crash-loop rather than merely a bad nudge: today an unrecognised surface is fatal. Desktop and
buzz-acpship in one bundle but are versioned independently during development, so the skew is reachable again the next time a surface is added desktop-side.Related issue
Searched first, per CONTRIBUTING:
fix(acp): accept missing_binary setup requirement in buzz-acp— already fixes (1), mergeable, green CI, reviewed.fix(acp): handle missing custom harness binaries— also fixes (1).So (1) here is a duplicate and I'd expect to defer to #3993. (2) is the part neither PR has. If #3993 lands first, I'm happy to rebase this down to just the
#[serde(other)]fallback, or split it out as a standalone PR now — whichever you prefer. Flagging rather than opening a competing fix quietly.One deliberate difference worth a reviewer's eye: #3993 and #3598 both fold
MissingBinaryinto theall_external/any_externalgroupings innudge_body(), matching the doc comment inreadiness.rs("No in-app action can fix this — the user must install the binary or update their PATH"). This PR keeps it Buzz-managed and points at Edit Agent → Command instead, because in the case that surfaced this the binary was installed and just wasn't on the GUI app's PATH — an absolute path in Edit Agent fixed it with nothing installed. Both readings are defensible; theirs matches the stated intent, this one matches what actually resolved it. Say which you want and I'll match it.Testing
cargo test -p buzz-acp --lib setup_mode→ 24 passed, 0 failed.cargo clippy -p buzz-acp --all-targetsandcargo fmt --checkclean.Two regression tests added:
setup_payload_deserializes_missing_binary_requirement— the exact payload the desktop emits parses, and the instruction names the command.setup_payload_tolerates_unknown_surface— an unknown surface parses toUnknowninstead of erroring. Fails without the#[serde(other)].Also verified against a release build on the real payload that caused the crash-loop (Buzz Desktop 0.5.3, macOS arm64):
buzz-acp→unknown variant \missing_binary``, exit 1buzz-acp→entering setup-listener mode,entering setup mode agent=… requirements=1Repro: give a managed agent a bare binary name that isn't on the GUI app's PATH. The agent log shows the serde error and exit code 1, retried twice ~185 ms apart. No UI change.
🤖 Generated with Claude Code