Skip to content

Support Freebuff binary and environment variable in tmux test helper - #1205

Open
nordicnode wants to merge 1 commit into
CodebuffAI:mainfrom
nordicnode:fix-tmux-freebuff-binary
Open

Support Freebuff binary and environment variable in tmux test helper#1205
nordicnode wants to merge 1 commit into
CodebuffAI:mainfrom
nordicnode:fix-tmux-freebuff-binary

Conversation

@nordicnode

Copy link
Copy Markdown

Support Freebuff binary and environment variable in tmux test helper

Summary

• Updates scripts/tmux/tmux-start.sh so testing with --binary (-b) detects the compiled Freebuff binary (cli/bin/freebuff) in addition to Codebuff (cli/bin/codebuff).
• Prioritizes FREEBUFF_BINARY alongside CODEBUFF_BINARY in environment variable checks (${FREEBUFF_BINARY:-${CODEBUFF_BINARY:-}}).
• Updates the missing-binary guidance message to include bun run build:freebuff.
• Prevents Binary not found: .../cli/bin/codebuff failures when running tmux tests against a compiled binary in the Freebuff repository.

Test plan

[✓] Tested ./scripts/tmux/tmux-start.sh -b resolving ./cli/bin/freebuff cleanly without arguments
[✓] Tested FREEBUFF_BINARY override
[✓] Verified PR hygiene checks pass cleanly

@codebuff-team

Copy link
Copy Markdown
Contributor

Nice, minimal change. The logic in tmux-start.sh is sound: checking for cli/bin/freebuff before falling back to cli/bin/codebuff, and letting FREEBUFF_BINARY take precedence over CODEBUFF_BINARY in the env-var fallback chain, matches the existing style of the script and doesn't break current Codebuff-only usage (default binary path resolution is unchanged when only codebuff exists).

A couple of minor things worth considering before porting:

  1. The updated help comment says 'checks ./cli/bin/freebuff then ./cli/bin/codebuff' — that's accurate, but it might be worth flipping the priority (or making it configurable) if Codebuff remains the primary product in this tree; right now Freebuff silently wins if both binaries happen to exist, which could surprise Codebuff-focused testers.
  2. The updated error message ('Build with: bun run build:freebuff (or cd cli && bun run build:binary)') assumes a build:freebuff script exists at the repo root — worth double-checking that target actually exists in package.json so the guidance isn't misleading.

Overall this is scoped correctly (dev script, not touching forbidden paths) and the diff is small enough to review cleanly. Worth porting with a quick sanity check on the binary-priority order and the referenced build script name.

@codebuff-team codebuff-team added bot:triaged Classified by the community triage bot pr:port-candidate Worth porting into the private source tree labels Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:triaged Classified by the community triage bot pr:port-candidate Worth porting into the private source tree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants