REQ-DDB-QUERY-007: An empty result is graded, and names the scope that produced it¶
What it requires
- An empty
searchorlist_filesreply states which corpora were searched, carries the indexed scope (source, reason, file count, covered top-level directories and extensions), and claims only the confidence it has earned. - THREE cases are distinguished — a single token matching nothing anywhere keeps the full definitive wording; a
list_filespattern whose extension appears in NO indexed file is definitive about the index with the reason stated, and explicitly not a claim about the working tree; a multi-tokensearchmiss is NOT definitive and reports per-token hit counts naming the token that emptied the conjunction. - The per-token diagnosis is computed only on a zero result and only up to MAX_DIAGNOSED_TOKENS.
- The extension certainty is derived from the UNCAPPED extension list, so a truncated display list cannot manufacture a false negative.
- A CORPUS MISS NAMES ITS OWN BOUNDARY AND ROUTES ONWARD rather than asserting the index is exhausted — the files corpus holds indexed SOURCE files, so a build script or a Doxyfile is absent there by construction, and its miss note says so and names
doc_scopeand the directory inventory — both of which accompany EVERY files reply, hit or miss, so the route is data the caller already has rather than another call. doc_scopereturns the repository's DECLARED doxyfile and vendored roots, and returns empty when nothing is declared, which is a different fact from no doc build existing.
- tier
- PASS
- declared
- implemented
- priority
- P1
How it is met
Implemented by
_not_indexedclew/query/corpus.py:832class_rowsclew/query/corpus.py:1074doc_scopeclew/query/corpus.py:1539file_doc_rowsclew/query/corpus.py:600gate_symbol_rowsclew/query/corpus.py:1129has_file_docsclew/query/corpus.py:768has_prose_corpusclew/query/corpus.py:746index_scopeclew/query/corpus.py:794indexed_extensionsclew/query/corpus.py:854member_doc_rowsclew/query/corpus.py:690prose_emptinessclew/query/emptiness.py:445search_emptinessclew/query/emptiness.py:303token_hit_countsclew/query/symbols.py:1837undocumented_path_rowsclew/query/corpus.py:636unsearched_corporaclew/query/symbols.py:1934
Tests (97)
Linked directly
91 tests: 91 passed
91 passed
| test | result | linked by | implementers exercised | calls away |
|---|---|---|---|---|
test_a_conjunction_miss_names_the_dead_token | passed | measured | 9 of 15 | — |
test_a_miss_with_every_token_matching_advises_fewer_tokens | passed | measured | 9 of 15 | — |
test_a_schema_stale_index_withdraws_the_definitive_claim | passed | measured | 9 of 15 | — |
test_a_sessions_own_build_invalidates_its_stale_active_default | passed | measured | 9 of 15 | — |
test_an_absent_symbol_keeps_the_definitive_note | passed | measured | 9 of 15 | — |
test_an_empty_reply_does_not_repeat_the_scope_DERIVATION | passed | measured | 9 of 15 | — |
test_an_empty_symbol_search_points_at_the_code_corpus | passed | measured | 9 of 15 | — |
test_an_index_without_the_corpus_is_not_definitive | passed | measured | 9 of 15 | — |
test_data_staleness_alone_keeps_the_definitive_claim | passed | measured | 9 of 15 | — |
test_dossier_and_search_route_to_the_named_sub_index | passed | measured | 9 of 15 | — |
test_the_token_diagnosis_is_capped | passed | measured | 9 of 15 | — |
test_empty_results_are_explicit_not_bare | passed | measured | 8 of 15 | — |
test_every_declared_corpus_answers | passed | measured | 6 of 15 | — |
test_every_tier1_reply_names_the_target_it_answered_from | passed | measured | 6 of 15 | — |
test_every_tier1_wrapper_is_json_serializable | passed | measured | 5 of 15 | — |
test_the_prose_corpus_returns_snippets | passed | measured | 5 of 15 | — |
test_a_conceptual_query_reaches_the_relevant_file | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_config_symbol_does_not_outrank_a_function_it_gates | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_documented_file_is_not_displaced_by_a_name_only_match | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_generated_symbol_loses_a_tie | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_name_match_still_outranks_a_path_match | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_name_that_is_both_a_function_and_a_type_returns_both | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_parsed_row_carries_no_brief_and_nothing_pretends_otherwise | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_parsed_row_is_distinguishable_from_a_doxygen_row_at_every_surface | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_recovered_global_is_findable_through_search_and_typed_as_a_variable | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_registered_file_is_findable_in_the_default_corpus | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_symbol_is_findable_by_the_file_it_lives_in | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_a_typedef_is_findable | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_an_enumeration_is_findable_and_says_it_is_one | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_an_exact_search_for_a_generated_symbol_still_finds_it_first | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_an_over_specified_query_is_reported_not_answered | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_build_index_against_a_rust_repo_is_queryable | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_every_tier1_tool_routes_and_omitting_the_target_keeps_the_derived_one | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_file_hits_are_labelled_and_do_not_displace_symbols | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_search_discloses_a_dropped_row_only_when_provenance_DIFFERS | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_search_finds_a_gating_symbol_by_name | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_search_finds_a_macro_by_its_expansion | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_search_finds_a_macro_by_name | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_search_reaches_a_file_by_concept | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_search_still_prefers_a_function_when_a_name_scores_equally | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_the_api_answers_with_the_query_engine | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | — |
test_other_corpora_keep_the_undiluted_definitive_note | passed | measured | 3 of 15: has_prose_corpus, member_doc_rows, prose_emptiness | — |
test_a_files_miss_routes_rather_than_claiming_exhaustion | passed | measured | 1 of 15: doc_scope | — |
test_a_widened_prose_search_says_so_in_the_envelope | passed | measured | 1 of 15: member_doc_rows | — |
test_the_parity_capabilities_survive_the_tool_cull | passed | measured | 1 of 15: member_doc_rows | — |
test_the_prose_reply_labels_its_text_as_the_repositorys_own | passed | measured | 1 of 15: member_doc_rows | — |
test_a_conjunction_miss_still_names_its_dead_token | passed | measured | 9 of 15 | 1 |
test_a_genuinely_absent_token_still_gets_the_definitive_note | passed | measured | 9 of 15 | 1 |
test_a_type_only_token_is_not_blamed_for_the_conjunction | passed | measured | 9 of 15 | 1 |
test_an_undocumented_file_is_not_assumed_searchable | passed | measured | 8 of 15 | 1 |
test_an_unread_corpus_downgrades_the_verdict | passed | measured | 8 of 15 | 1 |
test_the_unread_set_is_derived_from_the_database | passed | measured | 8 of 15 | 1 |
test_a_prose_miss_is_graded_by_what_the_index_holds_elsewhere | passed | measured | 5 of 15 | 1 |
test_extension_certainty_reads_the_uncapped_list | passed | measured | 3 of 15: _not_indexed, index_scope, indexed_extensions | 1 |
test_the_token_diagnosis_counts_macros | passed | measured | 3 of 15: class_rows, file_doc_rows, token_hit_counts | 1 |
test_token_counts_span_symbols_and_file_docs | passed | measured | 3 of 15: class_rows, file_doc_rows, token_hit_counts | 1 |
test_token_hit_counts_sees_the_class_corpus | passed | measured | 3 of 15: class_rows, file_doc_rows, token_hit_counts | 1 |
test_absent_corpus_is_reported_as_absent | passed | measured | 2 of 15: file_doc_rows, has_file_docs | 1 |
test_an_index_built_before_this_release_claims_nothing | passed | measured | 2 of 15: _not_indexed, index_scope | 1 |
test_index_scope_summarises_provenance_and_shape | passed | measured | 2 of 15: _not_indexed, index_scope | 1 |
test_the_query_layer_serves_what_the_build_stamped | passed | measured | 2 of 15: _not_indexed, index_scope | 1 |
test_doc_scope_is_empty_rather_than_invented_when_nothing_is_declared | passed | measured | 1 of 15: doc_scope | 1 |
test_the_files_inventory_is_not_hidden_behind_an_omitted_argument | passed | measured | 1 of 15: doc_scope | 1 |
test_prose_search_reaches_documentation_attached_to_a_member | passed | measured | 1 of 15: member_doc_rows | 2 |
test_search_prose_does_not_widen_a_query_that_already_matched | passed | measured | 1 of 15: member_doc_rows | 2 |
test_search_prose_punctuation_only_tokens_never_reach_fts5 | passed | measured | 1 of 15: member_doc_rows | 2 |
test_search_prose_single_token_miss_reports_no_widening | passed | measured | 1 of 15: member_doc_rows | 2 |
test_search_prose_widens_to_or_when_one_absent_word_empties_the_and | passed | measured | 1 of 15: member_doc_rows | 2 |
test_a_limitation_documented_only_in_help_is_searchable | passed | measured | 1 of 15: member_doc_rows | 3 |
test_kconfig_prose_must_be_ingested_after_the_markdown_ingest | passed | measured | 1 of 15: member_doc_rows | 3 |
test_prompt_and_symbol_name_both_reach_the_prose_corpus | passed | measured | 1 of 15: member_doc_rows | 3 |
test_search_prose_absent_table_is_empty | passed | measured | 1 of 15: member_doc_rows | 3 |
test_search_prose_limit_and_bad_expression | passed | measured | 1 of 15: member_doc_rows | 3 |
test_search_prose_returns_a_snippet | passed | measured | 1 of 15: member_doc_rows | 3 |
test_the_class_subject_matches_the_r2_library | passed | measured | 1 of 15: member_doc_rows | 3 |
test_every_corpus_exports_what_the_mcp_search_answers | passed | measured | 14 of 15 | 4 |
test_a_search_prints_the_export_payload | passed | measured | 6 of 15 | 4 |
test_a_cut_search_reports_the_true_total | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_a_search_under_its_limit_has_no_limited_key | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_name_accessors_degrade_gracefully_on_table_less_db | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_empty_and_unmatched_queries_stay_empty | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_excludes_stl_compounds_but_lookup_class_still_reaches_them | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_finds_a_class_by_its_brief | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_finds_a_class_by_name | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_finds_known_symbol | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_for_an_absent_class_name_is_still_empty | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_is_capped_and_the_cap_is_caller_controlled | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_matches_every_token_not_the_literal_phrase | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_ranking_is_unchanged_on_a_db_with_no_compounds | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_ranks_name_matches_above_prose_matches | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
test_search_still_finds_a_function_unchanged | passed | measured | 4 of 15: class_rows, file_doc_rows, gate_symbol_rows, undocumented_path_rows | 4 |
Reached through calls
6 tests: 6 passed
6 passed
| test | result | linked by | implementers exercised | calls away |
|---|---|---|---|---|
test_an_unknown_corpus_is_refused_by_name | passed | inferred | 14 of 15 | 4 |
test_stats_and_cull_are_cli_verbs | passed | inferred | 14 of 15 | 6 |
test_a_dossier_prints_the_export_payload | passed | inferred | 14 of 15 | 7 |
test_a_missing_index_is_refused_not_answered | passed | inferred | 14 of 15 | 7 |
test_a_refused_request_exits_2_with_the_reason | passed | inferred | 14 of 15 | 7 |
test_several_subjects_are_one_batch | passed | inferred | 14 of 15 | 7 |