When adding or updating test/verification logic, treat the harness setup as part of the test and ensure the evidence is causally attributable and non-vacuous.
Standard
node_modules, document and enforce when that’s a clean control. If dependency inputs change (e.g., package.json/lockfiles), either run a dependency-aware control or explicitly record the confound.realpath of resolved modules) and gate pass/fail of the verification on that.startswith, and you filter by bot author). Also ensure ids are re-resolved at patch time when threads/comments may have mixed order.Example pattern (monorepo control isolation)
# Run from the base worktree.
# 1) Resolve what the code under test actually loads.
REALPATH=$(node -p "require('fs').realpathSync(require.resolve('@qwen-code/qwen-code-core'))")
# 2) Assert it points into the base tree (pseudo-check).
case "$REALPATH" in
*tmp/base-tree/*) echo "OK wiring: $REALPATH" ;;
*) echo "FAIL: base control resolved to non-base code: $REALPATH" ; exit 1 ;;
esac
Example pattern (non-vacuity rule)
Example pattern (harness regression tests)
startswith (not contains) and filters by bot login, so a future edit can’t silently reintroduce clobbering behavior.