test_a_search_prints_the_export_payload

Tests › tests/test_query_cli.py

passed Passed in the packaged run.

What this test is for

Why it exists

`clew query search TEXT --corpus C` == export_search, as JSON.

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) · 135 of 400 steps

… 201 earlier steps

command-line usercommand-line usercommand-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/init_command.pyclew/query/symbols.pyclew/query/symbols.pyclew/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/_common.pyclew/query/_common.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesother filesother filesother filesopt (line 4018)opttry (line 155)tryloop (line 1576)looploop (line 1494)loopopt (line 1497)optloop (line 1507)loopmain202. _execute → _print_next_steps202_print_next_steps203. main → query_main203query_main204. query_main → _parser204_parser▶ test enters205. query_main → _locate205_locate206–208. _locate → target_for206target_for +2 more209–212. query_main → _payload209_payload +3 more213. _symbol_corpus → search_counted213search_counted214. search_counted → connect214connect215–216. search_counted → _memberdef_corpora215_memberdef_corpora +1 more217. _expansion_sql → has_columns217has_columns218. has_columns → table_exists218table_exists219. _memberdef_corpora → _memberdef_candidates219_memberdef_candidates220. _memberdef_candidates → table_exists220table_exists221. _memberdef_candidates → documented_first221documented_first222–223. documented_first → records_provenance222records_provenance +1 more224. _memberdef_candidates → symbol_provenance224symbol_provenance225. symbol_provenance → records_provenance225records_provenance226. _memberdef_candidates → self_declared_paths226self_declared_paths227–228. _memberdef_candidates → _one_line227_one_line +1 more229. _memberdef_candidates → strip_xml229strip_xml230. _memberdef_candidates → _search_rank230_search_rank231. _memberdef_candidates → symbol_provenance231symbol_provenance232. search_counted → _class_candidates232_class_candidates233. _class_candidates → _search_rank233_search_rank234. _class_candidates → class_rows234class_rows235. class_rows → table_exists235table_exists236. class_rows → strip_xml236strip_xml237. search_counted → _config_candidates237_config_candidates238. _config_candidates → _search_rank238_search_rank239. _config_candidates → gate_symbol_rows239gate_symbol_rows240. gate_symbol_rows → table_exists240table_exists241. gate_symbol_rows → has_columns241has_columns242. search_counted → _file_candidates242_file_candidates243. _file_candidates → self_declared_paths243self_declared_paths244–245. _file_candidates → _search_rank244_search_rank +1 more246. _file_candidates → file_doc_rows246file_doc_rows247. file_doc_rows → table_exists247table_exists248. _file_candidates → undocumented_path_rows248undocumented_path_rows249. undocumented_path_rows → table_exists249table_exists250. undocumented_path_rows → has_columns250has_columns251. undocumented_path_rows → table_exists251table_exists252. _symbol_corpus → search_emptiness252search_emptiness253. search_emptiness → index_scope253index_scope254. index_scope → connect254connect255. index_scope → _scope_provenance255_scope_provenance256. _scope_provenance → table_exists256table_exists257. index_scope → _indexed_paths257_indexed_paths258. _indexed_paths → table_exists258table_exists

… 2 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 filesmain261–262. search_emptiness → _scope_payload261_scope_payload +1 more263–269. one → _listed263_listed +6 more270. search_emptiness → unsearched_corpora270unsearched_corpora271. unsearched_corpora → connect271connect

… 19 steps between

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/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 1014)optmain291. has_file_docs → table_exists291table_exists292. search_emptiness → _scope_sentence292_scope_sentence293. _symbol_corpus → with_limit_disclosure293with_limit_disclosure294. corpus_payload → _prose_corpus294_prose_corpus295. _prose_corpus → search_prose_graded295search_prose_graded296. search_prose_graded → _query_tokens296_query_tokens297. search_prose_graded → connect297connect298. search_prose_graded → table_exists298table_exists299. search_prose_graded → _fts_match299_fts_match300. search_prose_graded → _fts_match300_fts_match301. 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 → connect309connect

… 1 step between

command-line usercommand-line usercommand-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/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.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.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesother filesother filesother filesopt (line 474)optopt (line 504)optloop ×2 (line 1488)loop ×2loop ×2 (line 555)loop ×2loop ×2 (line 944)loop ×2main311. prose_emptiness → token_hit_counts311token_hit_counts312. prose_emptiness → _render_counts312_render_counts313–329. corpus_payload → _code_corpus313_code_corpus +16 more330. files_context → directory_rollup330directory_rollup331. directory_rollup → connect331connect332–333. directory_rollup → has_columns332has_columns ×2334. directory_rollup → rollup_meaning334rollup_meaning335. files_context → one335one336. files_context → doc_scope336doc_scope337. doc_scope → connect337connect338. doc_scope → _scope_provenance338_scope_provenance339. _files_corpus → directory_rollup339directory_rollup340. _files_corpus → one340one341. _files_corpus → list_files341list_files342. list_files → connect342connect343. list_files → has_columns343has_columns344. list_files → table_exists344table_exists345. list_files → _matches345_matches346. _files_corpus → files_miss346files_miss347. corpus_payload → lock_roster347lock_roster348. lock_roster → connect348connect349. lock_roster → table_exists349table_exists350–351. lock_roster → _entries350_entries +1 more352. _roster_sql → has_columns352has_columns353–354. lock_roster → nestings_on353nestings_on +1 more355. _layer_present → table_exists355table_exists356. nestings_on → table_exists356table_exists357–360. lock_roster → _nesting_pairs357_nesting_pairs +3 more361–362. corpus_payload → one361one ×2363. corpus_payload → thread_roster363thread_roster364. thread_roster → connect364connect365. thread_roster → table_exists365table_exists366. thread_roster → has_columns366has_columns367. thread_roster → _thread_columns367_thread_columns368. _thread_columns → has_columns368has_columns369–370. _thread_columns → has_columns369has_columns ×2371. thread_roster → _build_thread371_build_thread372. _build_thread → name_of372name_of373. _build_thread → table_exists373table_exists374. _build_thread → _spawn_attribution374_spawn_attribution375. _spawn_attribution → has_columns375has_columns376–377. thread_roster → _thread_origins376_thread_origins +1 more378–380. corpus_payload → _config_found_on_the_wire378_config_found_on_the_wire +2 more381. kconfig_space → connect381connect382. kconfig_space → _meta382_meta383. _meta → table_exists383table_exists384. kconfig_space → _symbols384_symbols385. _symbols → table_exists385table_exists386. kconfig_space → table_exists386table_exists387. kconfig_space → _gate_layer_state387_gate_layer_state388. _gate_layer_state → table_exists388table_exists389. kconfig_space → _gate_symbol_names389_gate_symbol_names390. _gate_symbol_names → table_exists390table_exists391. kconfig_space → _gates391_gates392. _gates → table_exists392table_exists393. _gates → _gate_columns393_gate_columns

… 7 later steps

2 more

tests/test_query_cli.py:67 · its file's page

Where the product reaches it

  • main → _run (flow)
  • main → query_main → _payload → export_search (flow)

Call flow

test_a_search_prints_the_export_payload→_run→export_search

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.

test_a_search_prints_the_export_payload_run… 4 calls …records_provenanceREQ-DDB-INDEX-004 · measured_runquery_main_locatetarget_forREQ-DDB-MCP-001 · inferred_run… 3 calls …read_build_signatureREQ-DDB-PIPE-005 · inferredexport_searchcorpus_payloadlock_rosterREQ-DDB-QUERY-001 · measuredexport_searchcorpus_payload_files_corpusdirectory_rollupREQ-DDB-QUERY-002 · measuredexport_searchcorpus_payloadkconfig_spacetable_existsREQ-DDB-QUERY-003 · measuredexport_search… 4 calls …_in_default_buildREQ-DDB-QUERY-004 · inferred_run… 7 calls …_make_nodeREQ-DDB-QUERY-005 · inferredexport_searchcorpus_payloadkconfig_spaceREQ-DDB-QUERY-006 · measuredexport_searchcorpus_payload_prose_corpusprose_emptinessREQ-DDB-QUERY-007 · measured_runquery_main_payloadgraph_statsREQ-DDB-QUERY-008 · inferred_run… 5 calls …identity_rowidsREQ-DDB-QUERY-010 · inferred

and 6 more requirement paths, listed below.

Also reaches 18 requirements

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