test_a_comment_is_pushed_as_a_channel_notification

Tests › tests/test_wiki_channel.py

passed Passed in the packaged run.

What this test is for

Why it exists

On a handshake-era session the push is `notifications/claude/channel`.

Given

  1. sent = []
  2. async def notify(session, method, params): # noqa: ANN001, ANN202 sent.append((method, params))
6 more
  1. monkeypatch.setattr(channel, "raw_notify", notify)
  2. monkeypatch.setattr(channel, "protocol_version", lambda session: "2025-06-18")
  3. hub = channel.Channel()
  4. hub.session = object()
  5. comment = { "page": "test-x.html", "anchor": "checks", "quote": "a < 2", "body": "Bound?", "id": "ab", }
  6. method, params = sent[0]
→

When

  1. all(k.replace("_", "").isalnum() for k in params["meta"])
→

Then

  1. ✓ anyio.run(lambda: hub.send("clew-123", comment)) is True
  2. ✓ method equals "notifications/claude/channel"
  3. ✓ params["content"] contains "Bound?"
  4. ✓ params["content"] contains "test-x.html"
  5. ✓ params["meta"] equals {"repo": "clew-123", "page": "test-x.html", "comment_id": "ab"}
  6. ✓ all(k.replace("_", "").isalnum() for k in params["meta"]) holds

tests/test_wiki_channel.py:48 · its file's page

What it checks (5)

  1. assert anyio.run(lambda: hub.send("clew-123", comment)) is True not attributed
  2. assert method == "notifications/claude/channel" not attributed
  3. assert "Bound?" in params["content"] and "test-x.html" in params["content"] not attributed
  4. assert params["meta"] == {"repo": "clew-123", "page": "test-x.html", "comment_id": "ab"} not attributed
  5. assert all(k.replace("_", "").isalnum() for k in params["meta"]) observes all

Where the product reaches it

  • dossier → _rank_enum_over_mirror → _class_side_is_only_enum_mirrors → all (flow)

Call flow

test_a_comment_is_pushed_as_a_channel_notification→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_a_comment_is_pushed_as_a_channel_notification · 5 checksallREQ-DDB-WIKI-054 · measured
Also reaches 1 requirement

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