From c12853ed915fd86a78b5fd67f7015c5df511df09 Mon Sep 17 00:00:00 2001 From: Michael Neale Date: Mon, 27 Jul 2026 16:35:20 +1000 Subject: [PATCH] build(buzz-agent-core): emit the binary as `buzz-agent` buzz-acp derives harness identity from the command's BASENAME (normalize_agent_command_identity, buzz-acp/src/config.rs:600-615) and already has a "buzz-agent" arm meaning "no extra args" (default_agent_args, :617-624). Naming the binary `buzz-agent` makes this a drop-in swap: point BUZZ_ACP_AGENT_COMMAND at the built path and buzz-acp cannot tell the difference -- same identity, same args, same ACP contract, goose underneath. That is the whole premise, so the artifact should reflect it. Crate stays buzz-agent-core (it is workspace-excluded and owns its lockfile); only the emitted binary is renamed. 35 tests green. Signed-off-by: Michael Neale --- buzz-agent-core/Cargo.toml | 9 ++++++++- buzz-agent-core/tests/cancel.rs | 2 +- buzz-agent-core/tests/real_dev_mcp.rs | 2 +- buzz-agent-core/tests/reflect.rs | 2 +- buzz-agent-core/tests/stdio_turn.rs | 2 +- buzz-agent-core/tests/steer.rs | 2 +- buzz-agent-core/tests/stop_hook.rs | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/buzz-agent-core/Cargo.toml b/buzz-agent-core/Cargo.toml index 8e32304b42..5c348783c8 100644 --- a/buzz-agent-core/Cargo.toml +++ b/buzz-agent-core/Cargo.toml @@ -31,8 +31,15 @@ publish = false name = "buzz_agent_core" path = "src/lib.rs" +# Emitted as `buzz-agent`, not `buzz-agent-core`, on purpose. buzz-acp derives +# a harness identity from the command's BASENAME +# (`normalize_agent_command_identity`, buzz-acp/src/config.rs:600-615) and +# already has a `"buzz-agent"` arm meaning "no extra args" +# (`default_agent_args`, :617-624). Naming the binary this way makes it a +# drop-in swap: point BUZZ_ACP_AGENT_COMMAND at it and buzz-acp cannot tell the +# difference. [[bin]] -name = "buzz-agent-core" +name = "buzz-agent" path = "src/main.rs" # Test-only fake MCP server, copied from crates/buzz-agent. Built diff --git a/buzz-agent-core/tests/cancel.rs b/buzz-agent-core/tests/cancel.rs index a811f6af9d..601db76e9c 100644 --- a/buzz-agent-core/tests/cancel.rs +++ b/buzz-agent-core/tests/cancel.rs @@ -119,7 +119,7 @@ struct Harness { impl Harness { fn start(base_url: &str, home: &std::path::Path) -> Self { - let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent-core")) + let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent")) .env("BUZZ_AGENT_PROVIDER", "openai-compat") .env("BUZZ_AGENT_MODEL", "fake-model") .env("OPENAI_COMPAT_API_KEY", "k") diff --git a/buzz-agent-core/tests/real_dev_mcp.rs b/buzz-agent-core/tests/real_dev_mcp.rs index 734145b847..4f9d90f0ef 100644 --- a/buzz-agent-core/tests/real_dev_mcp.rs +++ b/buzz-agent-core/tests/real_dev_mcp.rs @@ -169,7 +169,7 @@ struct Harness { impl Harness { fn start(base_url: &str, home: &std::path::Path) -> Self { - let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent-core")) + let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent")) .env("BUZZ_AGENT_PROVIDER", "openai-compat") .env("BUZZ_AGENT_MODEL", "fake-model") .env("OPENAI_COMPAT_API_KEY", "k") diff --git a/buzz-agent-core/tests/reflect.rs b/buzz-agent-core/tests/reflect.rs index 0ddb40e779..b64308cedf 100644 --- a/buzz-agent-core/tests/reflect.rs +++ b/buzz-agent-core/tests/reflect.rs @@ -146,7 +146,7 @@ struct Harness { impl Harness { fn start(base_url: &str, home: &std::path::Path) -> Self { - let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent-core")) + let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent")) .env("BUZZ_AGENT_PROVIDER", "openai-compat") .env("BUZZ_AGENT_MODEL", "fake-model") .env("OPENAI_COMPAT_API_KEY", "k") diff --git a/buzz-agent-core/tests/stdio_turn.rs b/buzz-agent-core/tests/stdio_turn.rs index c2a46860ba..4f3983c449 100644 --- a/buzz-agent-core/tests/stdio_turn.rs +++ b/buzz-agent-core/tests/stdio_turn.rs @@ -154,7 +154,7 @@ struct Harness { impl Harness { fn start(base_url: &str, home: &std::path::Path) -> Self { - let exe = env!("CARGO_BIN_EXE_buzz-agent-core"); + let exe = env!("CARGO_BIN_EXE_buzz-agent"); let mut child = Command::new(exe) // Buzz-shaped config; config.rs translates these onto GOOSE_*. .env("BUZZ_AGENT_PROVIDER", "openai-compat") diff --git a/buzz-agent-core/tests/steer.rs b/buzz-agent-core/tests/steer.rs index 335bf10de8..6328f0afd4 100644 --- a/buzz-agent-core/tests/steer.rs +++ b/buzz-agent-core/tests/steer.rs @@ -151,7 +151,7 @@ struct Harness { impl Harness { fn start(base_url: &str, home: &std::path::Path) -> Self { - let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent-core")) + let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent")) .env("BUZZ_AGENT_PROVIDER", "openai-compat") .env("BUZZ_AGENT_MODEL", "fake-model") .env("OPENAI_COMPAT_API_KEY", "k") diff --git a/buzz-agent-core/tests/stop_hook.rs b/buzz-agent-core/tests/stop_hook.rs index 42b56b7d9f..cdfdf061fd 100644 --- a/buzz-agent-core/tests/stop_hook.rs +++ b/buzz-agent-core/tests/stop_hook.rs @@ -116,7 +116,7 @@ struct Harness { impl Harness { fn start(base_url: &str, home: &std::path::Path) -> Self { - let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent-core")) + let mut child = Command::new(env!("CARGO_BIN_EXE_buzz-agent")) .env("BUZZ_AGENT_PROVIDER", "openai-compat") .env("BUZZ_AGENT_MODEL", "fake-model") .env("OPENAI_COMPAT_API_KEY", "k")