test_text_escalates_and_never_repeats

Tests › tests/test_hook.py

passed Passed in the packaged run.

What this test is for

Why it exists

A CONSTANT STRING BECOMES WALLPAPER. Measured: ~1,900 byte-identical injections across one session changed nothing, and that session made 2 index calls against ~1,900 searches. A varying integer invalidates the prompt cache at that point, so the note must be processed rather than replayed — the defence is mechanical, not persuasive.

Verifies REQ-DDB-WIKI-054

Given

  1. emitted = [out for _ in range(30) if (out := _hook_once(tmp_path, "escalate-probe"))]
  2. capability = [e for e in emitted if not _is_operator(e)]
  3. operator = [e for e in emitted if _is_operator(e)]
→

When

  1. all(emitted.index(c) < emitted.index(o) for c in capability[:1] for o in operator[:1])
  2. first = capability[0].lower()
→

Then

  1. ✓ len(emitted) is greater than 5
  2. ✓ len(set(emitted)) equals len(emitted)
  3. ✓ capability holds
  4. ✓ operator holds
  5. ✓ all(emitted.index(c) < emitted.index(o) for c in capability[:1] for o in operator[:1]) holds
  6. ✓ first contains "verbatim"
  7. ✓ first contains "dossier"

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

What it checks (5)

  1. assert len(emitted) > 5, "the policy must emit something over 30 misses" observes _hook_once via emitted
  2. assert len(set(emitted)) == len(emitted), ( "every injection must be unique or it is filtered as boilerplate" ) observes _hook_once via emitted
  3. assert capability and operator, "both tiers must be reachable in one ramp" observes _is_operator via capability
  4. assert all(emitted.index(c) < emitted.index(o) for c in capability[:1] for o in operator[:1]), ( "the capability tier must precede the operator tier" ) observes all
  5. assert "verbatim" in first and "dossier" in first, ( f"the first note must state that dossier returns source verbatim; believing otherwise is " f"what sent a measured session to grep for twenty turns. Got: {capability[0][:200]}" ) observes _is_operator via capability

Where the product reaches it

  • dossier → _rank_enum_over_mirror → _class_side_is_only_enum_mirrors → all (flow)

Call flow

test_text_escalates_and_never_repeats→_hook_once→_is_operator→all

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.

test_text_escalates_and_never_repeats · 5 checksallREQ-DDB-WIKI-054 · catalog

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-054catalog1 of 18: all