test_one_index_call_clears_the_tally¶
Tests › tests/test_hook.py
What this test is for
Why it exists
THE DECAY THE OLD POLICY DID NOT HAVE, and the reason the note's own promise was a lie. Crediting three per clew call and never resetting made the tally monotonic: a session measured at 1,339 searches against 38 clew calls sat at pressure 1,225 against a threshold of 20, needing ~408 consecutive index calls to earn silence. It never would, so the loudest tier became permanent and a banner on every call reads as boilerplate.
Verifies REQ-DDB-WIKI-054
Given
spoken = ""for _ in range(hook._LOUD_AT + 2 * hook._LOUD_INTERVAL): spoken = _hook_once(tmp_path, "decay-probe") or spoken_hook_once(tmp_path, "decay-probe", used=True)
When
- —
Then
- ✓ _is_operator(spoken) holds
- ✓ _hook_once(tmp_path, "decay-probe") equals ""
- ✓ [_hook_once(tmp_path, "decay-probe") for _ in range(3)] equals ["", "", ""]
tests/test_hook.py:758 · its file's page
What it checks (3)
assert _is_operator(spoken), "a long ignoring session must reach the operator tier"observes_is_operatorassert _hook_once(tmp_path, "decay-probe") == "", "one index call must buy silence immediately"observes_hook_onceassert [_hook_once(tmp_path, "decay-probe") for _ in range(3)] == ["", "", ""], ( "and hold it below the quiet floor" )observes_hook_once
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_one_index_call_clears_the_tally→_hook_once→_is_operatorWhat 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 |