---
name: shared-target-stale-false-green
description: "A shared cargo target dir can serve a STALE test binary linked to a FOREIGN rlib and report green in under a second; cargo check hides it (separate fingerprints); the tell is a test COUNT, not any error."
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 177a798c-d81c-4c7d-a89b-cefa9e94d9e1
  modified: 2026-08-01T17:08:24.849Z
---

Worktrees that junction `target` onto a shared `.worktrees/gate-target` can have
`cargo test` report **green off a binary built from another tree**. Observed
2026-08-01 on DOORBELL W3: `cargo test -p spt --bins` said `Finished in 0.69s`,
ran 521 tests, all passed — the binary predated two committed legs (none of
their tests existed in it) and linked a foreign `spt-store` rlib, so the
compiler claimed `MutualPreAuth has no field knock_id` and `could not find
contacts in spt_store` for source that plainly had both. `touch`ing the
dependency's sources forced the rebuild; everything then compiled and passed.

**Why:** `cargo check` and `cargo build` keep separate fingerprints, so a green
check lane hides a poisoned build lane entirely. And the failure signature is
GREEN — nothing in the run says stale. This is the same shape as
[[instrument-soundness-guards]]: a gate whose failure mode looks like success.
A gate rig sharing the same target dir can pass this way.

**How to apply:** after any lane run, confirm either that a `Compiling <crate>`
line appeared or that the **test count matches what you expect**. A lane that
goes green in under a second after a source edit has not run your code. Fix is
`touch` on the dependency's sources (not `cargo clean -p`, which nukes other
agents' artifacts in the shared dir). See [[worktree-target-junction]] for why
the junction exists and [[scratchpad-target-trees-eat-the-box]] for why a
private target dir is not the escape.

Second-order, re-paid the same day: a **mutation harness that opens with
`git checkout -- crates/`** destroys uncommitted work exactly like a manual
restore does. Commit the new test BEFORE running the harness that mutates
around it.
