fix(6247): a getter is seen by its pulls, so the silent list stops naming every pull door
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m5s
CI & Build / Python tests (push) Successful in 1m56s
CI & Build / Build & push image (push) Successful in 22s

usage and rule_usage gain pulled_by_source, read from the per-source rows
the readout already had, and _silent_surfaces counts those doors as having
emitted. The rules-listing points were seen as of the previous commit,
through rule_usage.by_source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 19:28:29 -04:00
co-authored by Claude Opus 5.5
parent d05d4f3632
commit 1fa9245bbf
3 changed files with 59 additions and 0 deletions
+13
View File
@@ -279,6 +279,19 @@ def test_a_point_seen_only_in_usage_counts_as_having_emitted() -> None:
assert "enter_project" not in quiet
def test_a_getter_seen_only_by_its_pulls_counts_as_having_emitted() -> None:
"""A getter surfaces nothing, so no `by_source` ever names it; its pulls
are the only sign it records. Without them every pull door reads silent
on every active window."""
quiet = {p["source"] for p in _silent_surfaces(
{}, {"pulled_by_source": {"mcp_get_note": 3}},
{"pulled_by_source": {"mcp_get_rule": 2}}, active=True)}
assert "mcp_get_note" not in quiet
assert "mcp_get_rule" not in quiet
# A door with no pulls is still reported.
assert "mcp_get_snippet" in quiet
# ── settings parsing ──────────────────────────────────────────────────────
@pytest.mark.parametrize("raw,fallback,want", [