A shared CARGO_TARGET_DIR across git worktrees makes a baseline: pass rvow verify fail on the base commit
Symptom#
rvow prove TSK-xxx on a task marked baseline: pass fails with error: "TSK-xxx says baseline: pass but fails on the base commit: cargo nextest run ...", even though the same command passes in a clean checkout of the base commit. The compile errors mention a type from a file that only changed in the working tree.
Cause#
rvow runs the baseline in its warm worktree at the base commit. Two checkouts of one repository built into the same CARGO_TARGET_DIR share the same -C metadata hash for a workspace member, so they share one artifact slot and one fingerprint. Cargo treats a source file older than the fingerprint's write time as clean, so a tree reuses the other tree's artifact.
The same clobber hits the proof. Whichever tree built last wrote the fingerprint, and the other tree then reuses the wrong artifact, so a proof can pass by running the base commit's test binary. The recorded test count and the test names are the tell: tests: 74 where the changed tree has 78, and the new test names are absent from the log.
Fix#
Run the prove with a private, empty target dir so each tree builds its own sources:
CARGO_TARGET_DIR=/tmp/rvow-target-fresh
For a baseline: pass task, use a new directory (or delete it) for each run: the proof runs after the baseline in the same directory and sees the baseline's artifacts as fresh, so it silently proves the base code. Read the recorded tests: count before trusting the proof.
To repair a proof that reused a base build: touch the changed sources, run rvow prove <task> again (the baseline is no longer pending, so only the proof runs) and confirm the count grew.
Evidence#
reagent (2026-10-17), rvow home mode, ~/.cargo/config.toml sets build.target-dir = ".cache/cargo-target". rvow prove TSK-1f0bxx failed with says baseline: pass but fails on the base commit; the log showed Compiling reagent-agent (.../rvow/worktrees/6b84c3b12f8c573c/crates/agent) and expected &str, found String at model: self.config.model.clone(), i.e. base agent_loop against the new borrowed Request. Both checkouts printed the same unit hash reagent_ai-a43fc24d858b00d0. CARGO_TARGET_DIR=/tmp/rvow-target-1 rvow prove TSK-1f0bxx then reported result: proved, tests: 109, but that 109 was the base suite: the second task recorded tests: 74 against 78 in the tree and the new test names were missing. Touching the changed sources and proving again recorded tests: 78 and tests: 113 with the new tests in the log.