test_one_index_call_clears_the_tally

Tests › tests/test_hook.py

passed Passed in the packaged run.

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

  1. spoken = ""
  2. for _ in range(hook._LOUD_AT + 2 * hook._LOUD_INTERVAL): spoken = _hook_once(tmp_path, "decay-probe") or spoken
  3. _hook_once(tmp_path, "decay-probe", used=True)
→

When

  1. —
→

Then

  1. ✓ _is_operator(spoken) holds
  2. ✓ _hook_once(tmp_path, "decay-probe") equals ""
  3. ✓ [_hook_once(tmp_path, "decay-probe") for _ in range(3)] equals ["", "", ""]

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

What it checks (3)

  1. assert _is_operator(spoken), "a long ignoring session must reach the operator tier" observes _is_operator
  2. assert _hook_once(tmp_path, "decay-probe") == "", "one index call must buy silence immediately" observes _hook_once
  3. assert [_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_operator

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