---
name: workspace-bin-name-collision
description: "Cargo [[bin]] target names must be unique across ALL workspace crates — same name in two crates clobbers a shared target/<profile>/ output + mis-resolves CARGO_BIN_EXE; verify cross-crate fixtures with the FULL matrix, not -p onecrate"
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 3d725ad6-3a8a-44b3-aad2-0e65f49b6165
---

A `[[bin]]` target name must be unique across the **whole workspace**, not just its crate. Two crates declaring a bin of the same name (e.g. a test fixture `xlate_choreo_fixture` in both `spt` and `spt-daemon`) write the SAME `target/<profile>/<name>.exe` and **clobber each other** — cargo warns "output filename collision" but does not fail. Worse: `CARGO_BIN_EXE_<name>` then resolves to whichever crate's copy won the build race, so a sibling test in the OTHER crate silently runs the WRONG binary (this caused PR#28's Windows gate-escape: spt-daemon's `g3_content_free_ping` resolved to the `spt` crate's emit-only fixture, whose ping/stdin-log machinery was stripped → fail).

**Why:** the workspace shares one `target/` dir; bin output filenames are flat (no per-crate namespacing).

**How to apply:**
1. When re-homing / copying a test fixture bin into another crate, give it a DISTINCT name (e.g. `translate_proof_fixture`, not the original `xlate_choreo_fixture`). Add an inline must-stay-distinct comment so it can't silently regress.
2. Verify cross-crate fixture/bin changes with the FULL workspace test matrix (`cargo build -p A -p B --tests` to surface the collision warning; run BOTH crates' affected suites) — NOT `cargo test -p onecrate`, which never links the sibling consumer and hides the clobber. This is the [[delegate-tests-to-spt-test-engineer]] / shared-seam class doyle flags.

Also a process note from the same fix: `git add <path>` with ANY non-matching pathspec (e.g. a path already `git mv`'d away) fatals and stages NOTHING — always re-check `git status --short` and the commit diffstat before pushing; a commit showing "1 file, 0 insertions" after edits means the add silently no-op'd. Related: [[spt-verification-gates]].
