REQ-DDB-QUERY-014: A stable, MCP-free export of the dossier and search replies

← Requirements

What it requires

  1. clew.query.export_dossier and clew.query.export_search return, for every subject and every search corpus, exactly the reply the MCP tool gives with only the MCP boundary removed — the byte budget, the neighbour cap and the target/staleness/sub-index stamps; a single-subject miss differs only by the routing advice.
  2. Both are re-exported from clew.query (semver-covered), stamp wire_version on every payload, and build through the same functions the MCP tools call, so the two surfaces cannot word one answer differently.
  3. The wire keys are listed by a manifest generated from the reply dataclasses and committed; a renamed or removed key fails the gate.
tier
PASS
declared
implemented
priority
P1

Where it lives

  • Answer: query engine + MCP server15
  • Build: docs, requirements and tests layers1

See it on the map

How it is met

implemented byresults (143 tests)_wire_shapebatch_payloadcompact_docscompact_neighbourscorpus_payloadcount_codeenvelopeexport_dossierexport_searchfiles_contextfiles_missquery_mainsubject_misssubject_payloadwire_manifestwith_limit_disclosure143 passed143 tests, a summary by result: every test is in the tests table below

Show on the map

Implemented by

Tests (143)

Linked directly

143 tests: 143 passed

143 passed
testresultlinked byimplementers exercisedcalls away
test_every_tier1_reply_names_the_target_it_answered_frompassedmeasured7 of 16—
test_every_tier1_wrapper_is_json_serializablepassedmeasured6 of 16—
test_the_api_answers_with_the_query_enginepassedmeasured6 of 16—
test_a_code_hit_inside_a_binding_names_the_bindingpassedmeasured5 of 16—
test_empty_results_are_explicit_not_barepassedmeasured5 of 16—
test_every_declared_corpus_answerspassedmeasured5 of 16—
test_every_tier1_tool_routes_and_omitting_the_target_keeps_the_derived_onepassedmeasured5 of 16—
test_a_files_miss_routes_rather_than_claiming_exhaustionpassedmeasured4 of 16: corpus_payload, envelope, files_context, files_miss—
test_the_class_subject_matches_the_r2_librarypassedmeasured4 of 16: _wire_shape, corpus_payload, envelope, subject_payload—
test_the_files_inventory_is_not_hidden_behind_an_omitted_argumentpassedmeasured4 of 16: corpus_payload, envelope, files_context, files_miss—
test_the_mcp_reply_carries_the_same_disclosurepassedmeasured4 of 16: corpus_payload, count_code, envelope, with_limit_disclosure—
test_the_parity_capabilities_survive_the_tool_cullpassedmeasured4 of 16: _wire_shape, corpus_payload, envelope, subject_payload—
test_the_server_serves_compact_only_when_askedpassedmeasured4 of 16: _wire_shape, compact_docs, compact_neighbours, subject_payload—
test_a_batch_returns_the_same_payload_per_symbol_as_the_single_callspassedmeasured3 of 16: _wire_shape, batch_payload, subject_payload—
test_a_body_literal_finds_its_functionpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_code_search_works_without_the_test_scope_tablepassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_conjunction_miss_names_the_dead_tokenpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_dotted_query_matches_its_partspassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_miss_with_every_token_matching_advises_fewer_tokenspassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_module_level_constant_is_foundpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_preprocessor_line_outside_any_function_is_searchablepassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_query_word_matches_as_a_prefixpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_recovered_c_function_body_is_searchablepassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_schema_stale_index_withdraws_the_definitive_claimpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_sessions_own_build_invalidates_its_stale_active_defaultpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_word_matches_inside_identifiers_and_e2e_ranks_lastpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_an_absent_symbol_keeps_the_definitive_notepassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_an_empty_reply_does_not_repeat_the_scope_DERIVATIONpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_an_empty_symbol_search_points_at_the_code_corpuspassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_an_index_without_the_corpus_is_not_definitivepassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_an_inflected_word_finds_its_stempassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_data_staleness_alone_keeps_the_definitive_claimpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_dossier_and_search_route_to_the_named_sub_indexpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_the_prose_corpus_returns_snippetspassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_the_token_diagnosis_is_cappedpassedmeasured3 of 16: corpus_payload, envelope, with_limit_disclosure—
test_a_bare_call_on_a_split_repo_answers_from_first_partypassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_built_first_party_outranks_a_registered_but_unbuilt_whole_indexpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_call_naming_no_target_answers_from_first_party_and_says_sopassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_class_dossier_names_its_merged_interfacepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_class_dossier_shows_its_declaration_and_prefers_the_classpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_constant_excerpt_covers_its_recorded_extentpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_current_index_does_not_annotate_its_query_repliespassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_dossier_reply_carries_a_wiki_url_only_while_the_hub_runspassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_dossier_without_a_bound_repo_root_still_answers_minus_the_bodypassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_failing_staleness_measurement_does_not_break_the_replypassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_first_party_miss_is_scoped_even_when_no_other_part_is_builtpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_first_party_miss_says_what_it_did_not_searchpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_hit_whose_callees_are_unresolved_says_which_parts_it_did_not_readpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_kind_filter_never_relabels_another_kindpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_kind_with_no_subject_refuses_by_naming_the_routepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_miss_also_carries_the_stalenesspassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_module_constant_is_a_variablepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_negative_does_not_invite_a_status_callpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_negative_from_first_party_is_scoped_even_with_nothing_else_on_recordpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_python_class_dossier_shows_its_declarationpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_qualified_spelling_with_an_unindexed_owner_still_gets_the_hintpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_qualified_subject_is_told_to_split_it_at_the_wirepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_query_against_a_stale_index_carries_the_stalenesspassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_query_during_a_long_first_build_says_so_without_waiting_againpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_query_on_an_unbuilt_repository_builds_it_and_then_answerspassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_query_takes_the_fast_tier_and_the_tick_runs_the_full_buildpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_repeated_name_is_answered_oncepassedmeasured2 of 16: _wire_shape, batch_payload—
test_a_requirement_carries_both_directions_of_satisfiespassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_requirement_lists_every_file_line_that_names_itpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_response_under_budget_is_left_alonepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_routed_reply_reads_the_routed_INDEX_not_only_its_namepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_routed_source_read_uses_the_routed_WORKING_TREEpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_server_with_no_derived_target_still_serves_its_registered_indexespassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_server_with_no_target_does_not_answer_from_a_previous_onepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_signature_candidate_reports_its_linepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_single_string_argument_is_unchanged_by_the_batch_pathpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_subject_with_no_traversal_seed_discloses_itpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_tool_set_with_no_resolver_refuses_a_target_rather_than_ignoring_itpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_type_alias_is_a_typedef_with_its_declarationpassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_variable_subject_reports_every_declaration_site_and_its_sourcepassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_widened_prose_search_says_so_in_the_envelopepassedmeasured2 of 16: corpus_payload, envelope—
test_ambiguity_disclosure_states_the_spread_it_cannot_resolvepassedmeasured2 of 16: _wire_shape, subject_payload—
test_ambiguity_is_not_disclosed_for_an_unambiguous_namepassedmeasured2 of 16: _wire_shape, subject_payload—
test_an_exact_indexed_path_resolves_rather_than_being_hinted_atpassedmeasured2 of 16: _wire_shape, subject_payload—
test_an_index_without_the_layer_leaves_both_keys_absentpassedmeasured2 of 16: _wire_shape, subject_payload—
test_an_index_without_the_table_leaves_the_field_absentpassedmeasured2 of 16: _wire_shape, subject_payload—
test_an_unbound_provider_annotates_nothingpassedmeasured2 of 16: _wire_shape, subject_payload—
test_an_unbuilt_split_repository_builds_first_party_never_the_wholepassedmeasured2 of 16: _wire_shape, subject_payload—
test_depth_one_carries_no_chain_and_deeper_doespassedmeasured2 of 16: _wire_shape, subject_payload—
test_dossier_body_survives_on_a_split_repo_with_no_whole_indexpassedmeasured2 of 16: _wire_shape, subject_payload—
test_gate_definitions_are_attached_to_the_payload_not_just_computablepassedmeasured2 of 16: _wire_shape, subject_payload—
test_neighbour_wire_keys_are_pinned_literallypassedmeasured2 of 16: _wire_shape, subject_payload—
test_one_process_answers_two_targets_in_sequencepassedmeasured2 of 16: _wire_shape, subject_payload—
test_one_unresolvable_name_misses_in_its_own_slot_and_the_rest_still_answerpassedmeasured2 of 16: _wire_shape, batch_payload—
test_other_corpora_keep_the_undiluted_definitive_notepassedmeasured2 of 16: corpus_payload, envelope—
test_over_the_batch_cap_answers_the_first_n_and_names_the_restpassedmeasured2 of 16: _wire_shape, batch_payload—
test_raising_the_cap_returns_every_callerpassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_background_pass_refreshes_only_indexes_this_session_usedpassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_config_subject_reply_is_not_a_negativepassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_default_cap_bounds_callers_and_discloses_the_totalpassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_dossier_body_caps_and_reports_truncationpassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_dossier_body_takes_the_repo_root_from_the_server_not_the_modelpassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_enum_subject_survives_the_mcp_flattenpassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_hint_reaches_each_entry_of_a_batched_misspassedmeasured2 of 16: _wire_shape, batch_payload—
test_the_hint_reaches_the_mcp_surface_on_a_single_misspassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_measurement_is_r2_and_the_dossier_withholds_nothingpassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_override_fields_reach_the_mcp_wirepassedmeasured2 of 16: _wire_shape, subject_payload—
test_the_prose_reply_labels_its_text_as_the_repositorys_ownpassedmeasured2 of 16: corpus_payload, envelope—
test_the_selector_reaches_the_mcp_tool_surfacepassedmeasured2 of 16: _wire_shape, subject_payload—
test_unknown_symbols_return_a_self_describing_miss_naming_the_targetpassedmeasured2 of 16: _wire_shape, subject_payload—
test_wrapper_content_reaches_the_r1_richnesspassedmeasured2 of 16: _wire_shape, subject_payload—
test_wrappers_match_the_r2_library_exactlypassedmeasured2 of 16: _wire_shape, subject_payload—
test_a_config_reply_with_hits_is_not_a_negativepassedmeasured1 of 16: corpus_payload—
test_an_empty_config_corpus_still_reads_as_emptypassedmeasured1 of 16: corpus_payload—
test_an_index_without_the_corpus_says_it_is_missingpassedmeasured1 of 16: corpus_payload—
test_an_unknown_subject_kind_is_refused_by_namepassedmeasured1 of 16: subject_payload—
test_depth_above_the_bound_is_refused_not_clampedpassedmeasured1 of 16: subject_payload—
test_the_kconfig_discovery_fact_is_still_reportedpassedmeasured1 of 16: corpus_payload—
test_thread_roster_answers_with_an_envelope_carrying_its_splitpassedmeasured1 of 16: corpus_payload—
test_the_export_api_is_publicpassedcatalogunknown—
test_the_verb_is_dispatched_by_the_clipassedcatalogunknown—
test_a_search_prints_the_export_payloadpassedmeasured7 of 161
test_every_corpus_exports_what_the_mcp_search_answerspassedmeasured7 of 161
test_a_cut_search_reports_the_true_totalpassedmeasured5 of 161
test_a_search_under_its_limit_has_no_limited_keypassedmeasured4 of 16: corpus_payload, envelope, export_search, with_limit_disclosure1
test_every_subject_exports_what_the_mcp_dossier_answerspassedmeasured4 of 16: _wire_shape, export_dossier, subject_miss, subject_payload1
test_a_batch_exports_what_the_mcp_batch_answerspassedmeasured3 of 16: _wire_shape, batch_payload, export_dossier1
test_a_dossier_prints_the_export_payloadpassedmeasured3 of 16: export_dossier, query_main, subject_payload1
test_several_subjects_are_one_batchpassedmeasured3 of 16: batch_payload, export_dossier, query_main1
test_a_case_is_never_listed_as_an_implementerpassedmeasured2 of 16: export_dossier, subject_payload1
test_a_multi_line_signature_starts_at_its_defpassedmeasured2 of 16: export_dossier, subject_payload1
test_a_requirement_dossier_names_its_catch2_testspassedmeasured2 of 16: export_dossier, subject_payload1
test_a_requirement_dossier_serves_its_modes_with_their_testspassedmeasured2 of 16: export_dossier, subject_payload1
test_an_out_of_line_member_keeps_its_bodys_linepassedmeasured2 of 16: export_dossier, subject_payload1
test_an_unknown_corpus_is_refused_by_namepassedmeasured2 of 16: corpus_payload, export_search1
test_a_detail_is_not_dropped_when_the_body_shown_is_truncatedpassedmeasured1 of 16: compact_docs1
test_a_detail_the_body_does_not_carry_is_keptpassedmeasured1 of 16: compact_docs1
test_a_detail_whose_words_merely_overlap_the_body_is_keptpassedmeasured1 of 16: compact_docs1
test_a_docstring_already_in_the_body_is_served_oncepassedmeasured1 of 16: compact_docs1
test_a_payload_without_neighbours_is_untouchedpassedmeasured1 of 16: compact_neighbours1
test_rows_are_grouped_by_file_and_shared_values_stated_oncepassedmeasured1 of 16: compact_neighbours1
test_stats_and_cull_are_cli_verbspassedmeasured1 of 16: query_main1
test_the_committed_wire_manifest_is_currentpassedmeasured1 of 16: wire_manifest1
test_the_compact_shape_is_losslesspassedmeasured1 of 16: compact_neighbours1
test_the_flow_json_shape_is_in_the_manifestpassedmeasured1 of 16: wire_manifest1
test_the_impact_report_shape_is_in_the_manifestpassedmeasured1 of 16: wire_manifest1
test_a_refused_request_exits_2_with_the_reasonpassedmeasured3 of 16: corpus_payload, export_search, query_main2
test_a_missing_index_is_refused_not_answeredpassedmeasured1 of 16: query_main2

Flows through it