test_the_disable_switch_silences_it

Tests › tests/test_hook.py

passed Passed in the packaged run.

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

  1. result = _run(HOSTILE_EVENT, tmp_path, env={hook.DISABLE_ENV: "1"})
→

When

  1. list(tmp_path.glob("clew-hook-seen-*"))
→

Then

  1. ✓ result.returncode equals 0
  2. ✓ result.stdout equals ""
  3. ✓ list(tmp_path.glob("clew-hook-seen-*")) is false

tests/test_hook.py:545 · its file's page

What it checks (3)

  1. assert result.returncode == 0 observes _run via result
  2. assert result.stdout == "", "a disabled hook must emit nothing" observes _run via result
  3. assert not list(tmp_path.glob("clew-hook-seen-*")), ( "a disabled hook must not claim the session marker, or it would silence the next run" ) observes list

Where the product reaches it

  • main → _run (flow)
  • dossier → subject_payload → _flatten_subject → list (flow)

Call flow

test_the_disable_switch_silences_it→_run→list

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)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-054catalogunknown