test_the_mcp_reply_carries_the_same_disclosure

Tests › tests/test_search_total.py

passed Passed in the packaged run.

What this test is for

Why it exists

The MCP `search` tool, not only the export, says it was cut.

Given

  1. tools = QueryTools(lambda: rich_db, lambda: repo_root)
  2. full = tools.search("return", corpus="code", limit=1000)["count"]
  3. cut = tools.search("return", corpus="code", limit=3)
→

When

  1. —
→

Then

  1. ✓ cut["_limited"]["total_available"] equals full

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

clew — `main` (clew/cli.py) · 25 of 400 steps

… 209 earlier steps

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesopt (line 118)optmain210–211. _payload → export_search210export_search +1 more212. corpus_payload → _symbol_corpus212_symbol_corpus▶ test enters213. _symbol_corpus → search_counted213search_counted214. search_counted → connect214connect

… 51 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesopt (line 150)optmain266–267. _prune_rows → _prune_rows266_prune_rows +1 more268. _pruned_row → _absent268_absent▶ test enters269. _pruned_row → _prune_rows269_prune_rows270. search_emptiness → unsearched_corpora270unsearched_corpora271. unsearched_corpora → connect271connect

… 20 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesmain292. search_emptiness → _scope_sentence292_scope_sentence293. _symbol_corpus → with_limit_disclosure293with_limit_disclosure294. corpus_payload → _prose_corpus294_prose_corpus▶ test enters295. _prose_corpus → search_prose_graded295search_prose_graded296. search_prose_graded → _query_tokens296_query_tokens

… 14 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesopt (line 474)optmain311. prose_emptiness → token_hit_counts311token_hit_counts312. prose_emptiness → _render_counts312_render_counts313. corpus_payload → _code_corpus313_code_corpus▶ test enters314–327. _code_corpus → search_code314search_code +13 more328. corpus_payload → _files_corpus328_files_corpus329. _files_corpus → files_context329files_context330. files_context → directory_rollup330directory_rollup

… 14 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesmain345. list_files → _matches345_matches346. _files_corpus → files_miss346files_miss347. corpus_payload → lock_roster347lock_roster▶ test enters348. lock_roster → connect348connect349. lock_roster → table_exists349table_exists

… 9 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesmain359–360. lock_roster → _object_route359_object_route +1 more361. corpus_payload → one361one▶ test enters362. corpus_payload → one362one363. corpus_payload → thread_roster363thread_roster364. thread_roster → connect364connect365. thread_roster → table_exists365table_exists

… 10 steps between

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyother filesother filesother filesother filesmain376–377. thread_roster → _thread_origins376_thread_origins +1 more378. corpus_payload → _config_found_on_the_wire378_config_found_on_the_wire▶ test enters379. _config_found_on_the_wire → _compact_gate_panel379_compact_gate_panel380. corpus_payload → kconfig_space380kconfig_space

… 20 later steps

2 more

tests/test_search_total.py:38 · its file's page

What it checks (1)

  1. assert cut["_limited"]["total_available"] == full not attributed

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.

Also reaches 3 requirements

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