fix(desktop): prefer packaged sidecars in release builds#2655
fix(desktop): prefer packaged sidecars in release builds#2655amanning3390 wants to merge 2 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Hey @amanning3390 — really glad you're pushing Buzz packaging quality here. Direction looks right: pure Two intentional things that will help this land: 1) DCO is red (merge blocker)Buzz requires a git commit --amend -s --no-edit
git push --force-with-lease(or 2) Release still falls back into workspace
|
Co-authored-by: amanning3390 <adam.manning@pro-serveinc.com> Signed-off-by: amanning3390 <adam.manning@pro-serveinc.com>
The existing search-order tests assert directory ordering with synthetic paths, so they cannot catch a regression in the behavior this PR is actually about: which binary gets picked when real files exist in more than one candidate directory. Adds two resolution tests that place real executables on disk and apply the same first-executable-wins rule as resolve_workspace_command: - both bundled and workspace dirs contain buzz-acp -> the packaged sidecar beside the app executable wins in release profile. - the packaged sidecar exists but is not executable -> resolution falls through to the workspace artifact. The second case documents the fallback contract explicitly rather than leaving it incidental. The workspace fallback is deliberately retained: removing it would change behavior for developers who run a release profile from a checkout, which is outside this PR's scope. Unix-gated, matching the existing permission-sensitive test in this file. Co-authored-by: amanning3390 <adam.manning@pro-serveinc.com> Signed-off-by: amanning3390 <adam.manning@pro-serveinc.com>
91deae6 to
f0b9214
Compare
|
Thanks @Bartok9 — both items addressed. 1) DCO — greenSignoff added via 2) Release fallback — proof added, fallback deliberately keptYou identified the real hole precisely: the existing tests assert directory ordering with synthetic paths, so nothing verified which binary actually gets picked when real files exist in more than one candidate dir. Order tests can't catch that regression class. I took your option 2 (keep the fallback, add the proof) rather than option 1, and I want to be explicit about why: dropping the workspace/cwd target dirs whenever New commit: Two resolution tests that place real executables on disk and apply the same first-executable-wins rule as
That second test is the one that directly answers your "bundled wins when both exist and when bundled is broken" point. It makes the fallback contract explicit and visible instead of incidental, so if someone later tightens the precedence, this test is the thing that tells them exactly what behavior they're changing. Both are
On the Justfile ↔ bundle-sidecars.sh mirrorAgreed, and noted in the PR body. The crate list in the release recipe and One transparency note on the test suiteRunning the full
So it's a pre-existing test-isolation issue around the shared login-shell PATH cache under parallel execution, not something this PR introduces. Flagging it rather than quietly leaving a red test unexplained — happy to open a separate issue for it if that's useful. Thanks for the careful review on both PRs. |
|
Both addressed cleanly — thank you. DCO green and the hardening landing as an additive commit (keeping the review diff readable) is the right shape. On the fallback: taking option 2 and keeping the workspace/cwd fallback is the correct conservative call — release-from-a-checkout is a real workflow, and gating it behind a new env var would be a behavior change plus config surface beyond this PR's scope. The two resolution tests with real executables on disk are exactly what was missing: Good transparency on the pre-existing Ready from my side. Deferring to Buzz maintainers on merge. |
Problem
In release builds, the desktop app's sidecar discovery (
command_search_dirs) can find stale debug workspace artifacts instead of the bundled target-suffixed sidecars shipped beside the executable. This causes runtime failures when debug and release binaries are incompatible.What This Changes
Refactors
command_search_dirsintocommand_search_dirs_for_profilewith explicit profile awareness:Justfilerelease recipe now callsscripts/bundle-sidecars.shbefore Tauri packagingScope
desktop/src-tauri/src/managed_agents/discovery.rs—command_search_dirsrefactoreddesktop/src-tauri/src/managed_agents/discovery/tests.rs— release/debug precedence testsJustfile— release recipe uses canonical sidecar bundlingVerification