test_the_disable_switch_silences_it¶
Tests › tests/test_hook.py
What this test is for
Why it exists
THE MEASUREMENT DEPENDS ON THIS. A standing "prefer the index" nudge makes the one arm that measures UNPROMPTED reach-for-it unmeasurable, and that arm is worth roughly nine points by this project's own union analysis. The acceptance harness sets this variable, so shipping the mitigation does not destroy the measurement that would justify it.
Verifies REQ-DDB-WIKI-054
Given
result = _run(HOSTILE_EVENT, tmp_path, env={hook.DISABLE_ENV: "1"})
When
list(tmp_path.glob("clew-hook-seen-*"))
Then
- ✓ result.returncode equals 0
- ✓ result.stdout equals ""
- ✓ list(tmp_path.glob("clew-hook-seen-*")) is false
tests/test_hook.py:545 · its file's page
What it checks (3)
assert result.returncode == 0observes_runviaresultassert result.stdout == "", "a disabled hook must emit nothing"observes_runviaresultassert not list(tmp_path.glob("clew-hook-seen-*")), ( "a disabled hook must not claim the session marker, or it would silence the next run" )observeslist
Where the product reaches it
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-054 | catalog | unknown |