Run the bundled harness, not whatever the checkout built - #22
Merged
Merged
Conversation
QuicksilverSlick
force-pushed
the
fix/bundled-harness
branch
from
September 14, 2026 00:29
5216d02 to
69741f8
Compare
A release build resolved bare sidecar commands from the workspace's target dir first: `workspace_root_dir()` is `CARGO_MANIFEST_DIR`, baked in at build time, so the installed app on the build machine spawned `<checkout>/target/release/buzz-acp.exe` instead of the copy bundled beside it. Confirmed on a running install. A `cargo build`, `cargo clean` or branch switch in that checkout silently changed the harness the live agents ran, including the one that starts at launch and answers guests. Release builds now look only next to their own executable, where the bundled sidecars are. Debug builds keep the target dirs first, since `just dev` builds fresh sidecars there. On top of that, a guest-facing agent (respond_to = allowlist) refuses to start in a release build unless its resolved harness sits in the bundle directory. The permission gate lives in that binary; a harness from PATH, a stale checkout or an override could predate it. Owner-only agents are unaffected. Every spawn now logs the resolved harness path. Tests: ordered_search_dirs (release = exe dir only; debug = target dirs first, exe dir last) and require_bundled_harness (guest + release + stray path refuses; owner-only, debug, and bundled paths pass). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
QuicksilverSlick
force-pushed
the
fix/bundled-harness
branch
from
September 14, 2026 01:28
69741f8 to
087e4ff
Compare
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.
What this fixes
A release build resolved bare sidecar commands from the workspace's
targetdir first.workspace_root_dir()isCARGO_MANIFEST_DIR, baked in at build time, so on the build machine the installed app spawned<checkout>/target/release/buzz-acp.exeinstead of the copy bundled beside it. Confirmed on a running install (buzz-desktop.exeunder%LOCALAPPDATA%\Dreamforge, childbuzz-acp.exeunderDesktop\Buzz\buzz\target\release).So a
cargo build,cargo cleanor branch switch in that checkout silently changed the harness the live agents ran, including the one that starts at launch and answers guests. Every later guarantee of the approval loop rests on the bundled harness being the one that runs.What changes
discovery.rs:command_search_dirs()now delegates toordered_search_dirs(release, exe_dir, cwd). A release build looks only next to its own executable. A debug build keeps the target dirs first (just devbuilds fresh sidecars there and never bundles them), then the exe dir.runtime.rs: every spawn logsharness: <path>to the agent log. A guest-facing agent (respond_to = allowlist) refuses to start in a release build unless its resolved harness sits in the bundle directory; owner-only agents and debug builds are unaffected.Tests
release_builds_look_for_sidecars_only_next_to_the_executableguest_facing_agents_only_run_the_bundled_harness_in_releasemanaged_agents::discoveryandmanaged_agents::runtimetest modules pass on Windows; clippy has no findings in the changed files.🤖 Generated with Claude Code