test_other_corpora_keep_the_undiluted_definitive_note

Tests › tests/test_emptiness.py

passed Passed in the packaged run.

What this test is for

Why it exists

The fix is scoped to the corpus whose emptiness can have a cause OTHER than absence. A grading applied everywhere would trade one wrong answer for fifteen vague ones — which is the failure mode this whole change is a reaction to, inverted.

Given

  1. absent = tools.search("no_such_token_anywhere_xyz", corpus="prose")
  2. inventory = tools.search("no_such_token_anywhere_xyz", corpus="threads")
  3. note = str(inventory.get("note", ""))
→

When

  1. —
→

Then

  1. ✓ absent["count"] equals 0
  2. ✓ absent["note"] contains "carries NO ingested markdown corpus"
  3. ✓ absent["note"] contains "NOT definitive"
  4. ✓ note does not contain "NOT definitive"

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) · 29 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

… 1 step 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.pyloop (line 1576)loopmain216. _memberdef_corpora → _expansion_sql216_expansion_sql217. _expansion_sql → has_columns217has_columns218. has_columns → table_exists218table_exists219. _memberdef_corpora → _memberdef_candidates219_memberdef_candidates220. _memberdef_candidates → table_exists220table_exists

… 40 steps between

command-line usercommand-line usercommand-line usercommand-line userother filesother filesother filesother filesmain261–262. search_emptiness → _scope_payload261_scope_payload +1 more263–267. one → _listed263_listed +4 more268–269. _pruned_row → _absent268_absent +1 more

… 22 steps between

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesother filesopt (line 1012)optopt (line 474)optmain292. 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_tokens297. search_prose_graded → connect297connect298. search_prose_graded → table_exists298table_exists299–300. search_prose_graded → _fts_match299_fts_match +1 more301. search_prose_graded → strip_xml301strip_xml302. search_prose_graded → list302list303. search_prose_graded → member_doc_rows303member_doc_rows304. member_doc_rows → table_exists304table_exists305. member_doc_rows → has_columns305has_columns306. search_prose_graded → _collapse306_collapse307. _prose_corpus → prose_emptiness307prose_emptiness308. prose_emptiness → has_prose_corpus308has_prose_corpus309. has_prose_corpus → connect309connect310. has_prose_corpus → table_exists310table_exists311. prose_emptiness → token_hit_counts311token_hit_counts312. prose_emptiness → _render_counts312_render_counts313. corpus_payload → _code_corpus313_code_corpus314–315. _code_corpus → search_code314search_code +1 more

… 10 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 filesmain326. count_code → _has_table326_has_table327. _code_corpus → with_limit_disclosure327with_limit_disclosure328. corpus_payload → _files_corpus328_files_corpus▶ test enters329. _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_exists366. thread_roster → has_columns366has_columns367. thread_roster → _thread_columns367_thread_columns

… 8 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_emptiness.py:364 · its file's page

What it checks (4)

  1. assert absent["count"] == 0 not attributed
  2. assert "carries NO ingested markdown corpus" in absent["note"], ( "a corpus that was never built must say so — 'we looked and it is not there' and " "'there was nothing to look in' are different facts" ) not attributed
  3. assert "NOT definitive" in absent["note"] not attributed
  4. assert "NOT definitive" not in note, ( f"an inventory corpus's emptiness IS absence — grading it would be exactly the dilution " f"this test exists to prevent: {note!r}" ) 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 6 requirements

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