Skip to content

fix(desktop): spawn the maxplayer binary, not the retired mobee name (#285) - #295

Merged
orveth merged 1 commit into
devfrom
fix/desktop-spawn-maxplayer-285
Jul 30, 2026
Merged

fix(desktop): spawn the maxplayer binary, not the retired mobee name (#285)#295
orveth merged 1 commit into
devfrom
fix/desktop-spawn-maxplayer-285

Conversation

@orveth

@orveth orveth commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #285.

Problem

crates/mobee-desktop launched the CLI by the name mobee, which no longer exists. Since #262 the shipped binary is maxplayer ([[bin]] name, flake mainProgram, apps.*.program). Both resolution paths failed:

  • the sibling probe dir.join(executable_name("mobee")) never found mobee next to the desktop executable, and
  • the PATH fallback Command::new("mobee") spawned a name nothing installs.

The crate is not in default-members, so a root cargo build stayed green while the app could never launch the CLI it exists to drive. This is the "eighth lexical form" from the #262 sweep — the name as a process to spawn, which neither a path-shaped nor an assertion-shaped grep reaches.

Fix — one constant, three sites

Introduced a single source of truth:

const CLI_BIN: &str = "maxplayer";

Routed all three former "mobee" literals through it — the sibling probe (:587), the PATH fallback (:593), and the test helper (:843) — so the spawned name has one definition rather than three copies that can drift apart.

resolve_cli_command(bin, current_exe) is split out of mobee_command so the spawned program name is assertable in a unit test without depending on the process' real current_exe.

Scope is deliberately narrow: the MOBEE_BIN env override and all other wire values / crate names / paths are left untouched — only the spawned bin name changed. This is a plain correctness fix, not a rename preview.

Red-prove (per acceptance)

New test resolve_cli_command_spawns_the_shipped_maxplayer_binary invokes the resolver (not the source / not --help):

  1. asserts the resolver targets maxplayer;
  2. red leg / positive control: the same resolver pointed at the retired mobee name resolves to mobee, and asserts the two differ — so the guard cannot pass while never running.

Demonstrated failing → passing by flipping the one value that matters:

  • CLI_BIN = "mobee"test ... FAILEDassertion `left == right` failed ... left: "mobee", right: "maxplayer"
  • CLI_BIN = "maxplayer" (restored) → test result: ok. 5 passed

Residual sweep (denominator emitted)

Spawn-shaped references to the old name across the tree (Command::new("mobee")): 2 hits, both the sites fixed in this PR. Zero elsewhere.

Verification

  • cargo build -p mobee-desktop (explicit — the crate is outside the default set): Finished, green.
  • cargo test -p mobee-desktop: 5 passed; 0 failed (was 4 before this PR — the new test moved the count 4 → 5).

Touches only crates/mobee-desktop/src/main.rs (fix + test module).

🤖 Generated with Claude Code

…285)

Since #262 the CLI ships as `maxplayer`, but mobee-desktop still probed a
`mobee` sibling and fell back to `Command::new("mobee")` on PATH — so both
resolution paths targeted a binary nothing installs. The crate is not in
default-members, so a root `cargo build` stayed green while the app could
never launch the CLI it exists to drive.

Fix: introduce a single `const CLI_BIN = "maxplayer"` as the one source of
truth for the spawned name, and route all three former `"mobee"` literals
(sibling probe, PATH fallback, and the test helper) through it, so the name
cannot drift across copies again. The `MOBEE_BIN` env override and other wire
values are left untouched — only the spawned bin name changed.

Red-prove: `resolve_cli_command` is split out of `mobee_command` so the
spawned program name is assertable without depending on the real
`current_exe`. The new test asserts the resolver targets `maxplayer`, with a
red leg asserting the same resolver pointed at the retired `mobee` name
resolves to `mobee` (positive control). Flipping `CLI_BIN` back to `"mobee"`
turns the test red (left: "mobee", right: "maxplayer"); restoring it passes.
Residual spawn-shaped sweep for the old name across the tree: 2 hits, both the
sites fixed here (denominator emitted, not a bare "none").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mobee Ready Ready Preview Jul 30, 2026 7:59am

Request Review

@orveth
orveth merged commit 43fdd10 into dev Jul 30, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant