The wide net becomes a pull, and a tuned number carries the space it was measured in #164

Merged
bvandeusen merged 5 commits from dev into main 2026-09-17 18:50:50 -04:00
2 changed files with 12 additions and 3 deletions
Showing only changes of commit def144df06 - Show all commits
+7 -1
View File
@@ -32,8 +32,14 @@ def _logs(pairs):
def _session_with(rows):
"""`.all()` is SYNCHRONOUS on a Result, so it needs a MagicMock.
`make_mock_session` is an AsyncMock, and every child of an AsyncMock is one
too — leaving `.all` as it comes hands the service a coroutine where it
expects a list, the same trap the helper's docstring flags for `add`.
"""
session = make_mock_session()
session.execute.return_value.all.return_value = rows
session.execute.return_value = MagicMock(all=MagicMock(return_value=rows))
return session
+5 -2
View File
@@ -183,13 +183,16 @@ def test_the_tool_teaches_reading_the_records_not_the_percentile():
assert "69" in doc
def test_all_three_tools_are_registered():
def test_every_tool_in_the_module_is_registered():
from scribe.mcp.tools import retrieval_tuning as tool
from tests.helpers import FakeMCP
mcp = FakeMCP()
tool.register(mcp)
# Order is the module's, and asserted rather than sorted: an unregistered
# tool is invisible to every caller, so the list is worth reading literally.
assert mcp.names == [
"retrieval_surfaces", "tune_retrieval", "retrieval_tuning_history",
"retrieval_surfaces", "migrate_retrieval_floor",
"tune_retrieval", "retrieval_tuning_history",
]