Ray's Knowledge Base
Unlock

rvow clamp: a verify whose test lives inline in the src file can't get a red first-prove baseline; narrow the filter

PitfallVerified 18 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A task is baseline_pending. You write a TDD test INSIDE the src file (an inline #[cfg(test)] mod) listed in the task's files:. rvow prove <task> reports "it passes before the work" or "passes on the base commit", so no red baseline is recorded, and you cannot prove the task.

Cause#

rvow's first-prove red path (first=true) only triggers when the task scope has NO non-test work changed. An inline test lives in the src file (not a test_glob), so editing it counts as "work". rvow then compares against the base commit (merge-base with the base branch), where the new test does not exist, so the filter matches only a pre-existing passing test (e.g. an old .*refusal filter) and passes. A passing baseline proves nothing and is refused.

Fix#

Narrow the task's verify filter to a single unique test name that fails on old code, e.g. cargo nextest run -p X -E 'test(/path::mod::a_unique_new_test_name/)'. Record it with rvow put <task-id> then rvow amend --reason \"...\" (the user confirms). The base then cannot match the new name -> known_red -> first prove records the red; implement; re-prove green.

Evidence#

CHG-82c0e1 TSK-kbqa66: verify test(/agent_loop::tests::.*refusal/) matched the pre-existing green refusal_stops_without_running_tools test, so rvow always saw a pass and refused the baseline. Narrowed the filter to a_refusal_with_no_content_is_a_refusal_not_an_empty_reply, recorded AMD, and the red baseline then recorded and the task proved.