test_waiting_wiki_comments_are_announced_by_count

Tests › tests/test_hook.py

passed Passed in the packaged run.

What this test is for

Why it exists

2.1 (owner Q/A 2026-11-24): the hook says how many comments wait and where to read them — never their text. It speaks when the count changes, not on every call.

Given

  1. env = _comment_env(tmp_path, "3")
  2. note = json.loads(_hook_used(env))["hookSpecificOutput"]["additionalContext"]
2 more
  1. _comment_env(tmp_path, "4")
  2. _comment_env(tmp_path, "0")
→

When

  1. —
→

Then

  1. ✓ note contains "3 new wiki comments"
  2. ✓ note contains "action='comments'"
  3. ✓ _hook_used(env) equals ""
  4. ✓ _hook_used(env) contains "4 new wiki comments"
  5. ✓ _hook_used(env) equals ""

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

What it checks (4)

  1. assert "3 new wiki comments" in note and "action='comments'" in note observes _hook_used via note
  2. assert _hook_used(env) == "", "the same count is not repeated" observes _hook_used
  3. assert "4 new wiki comments" in _hook_used(env) observes _hook_used
  4. assert _hook_used(env) == "" observes _hook_used

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_waiting_wiki_comments_are_announced_by_count→_comment_env→_hook_used

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_waiting_wiki_comments_are_announced_by_count · 4 checks_comment_envpending_keyREQ-DDB-WIKI-054 · measured
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.