test_excluding_the_repository_root_is_refused

Tests › tests/test_operator_excludes.py

passed Passed in the packaged run.

What this test is for

Why it exists

`--exclude .` indexes nothing and reports success — a well-formed, empty, confident database. Same refusal for the same reason as the out-of-repo case.

Given

  1. root = tmp_path / "repo"
  2. _repo(root)
→

When

  1. _build(root, tmp_path / "clew.db", exclude=["."])
→

Then

  1. ✓ raises SystemExit
  2. ✓ raised.value.code equals 1

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.

thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 25 of 142 steps

thread startthread startthread startthread startthread startclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyother filesother filesother filesother filesother filestry (line 1664)trytry (line 1003)tryopt (line 847)optloop (line 746)looploop (line 1055)loopopt (line 1075)opt_first_build_worker1. _first_build_worker → first_party_sub_index1first_party_sub_index2. first_party_sub_index → whole_repo_scope2whole_repo_scope3. whole_repo_scope → _gitignored_paths3_gitignored_paths▶ test enters4. _gitignored_paths → git_argv4git_argv5–6. git_argv → _no_ext_diff5_no_ext_diff +1 more7. list → link7link8. _gitignored_paths → git_env8git_env9. whole_repo_scope → list9list10–14. whole_repo_scope → nested_repo_roots10nested_repo_roots +4 more15. nested_repo_roots → _nested_repos_under15_nested_repos_under16. whole_repo_scope → _gitignored_paths16_gitignored_paths17–18. whole_repo_scope → _pruned_dirs17_pruned_dirs +1 more19. _pruned_dirs → _skip_dir19_skip_dir20–22. _pruned_dirs → _descendable20_descendable +2 more23–26. whole_repo_scope → _declaration_note23_declaration_note +3 more27–28. first_party_sub_index → _under_any27_under_any +1 more

… 32 steps between

thread startthread startthread startthread startclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyclew/mcp_server/state.pyother filesother filesother filesother filestry (line 3260)try_first_build_worker61. _run_build_walked → captured_output61captured_output62. _run_build_walked → build_lock62build_lock63. build_lock → _os_lock63_os_lock▶ test enters64. _os_lock → lock_path64lock_path65. _run_build_walked → db_status65db_status66. db_status → _options_meta66_options_meta

… 31 steps between

thread startthread startthread startthread startclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/mcp_server/server.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/scope.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/mcp_server/freshness.pyclew/declaration.pyclew/declaration.pyclew/declaration.pyclew/declaration.pytry (line 3260)tryalt (line 1171)altopt (line 485)opt_first_build_worker98. notices → _code_notice98_code_notice99. _run_build_walked → declared_scope_rejection99declared_scope_rejection100. declared_scope_rejection → _declared_index_scope100_declared_index_scope▶ test enters101. _declared_index_scope → load_declaration_located101load_declaration_located102. load_declaration_located → _read_mapping102_read_mapping103. _read_mapping → _parsed_declaration103_parsed_declaration104. load_declaration_located → _checked_sections104_checked_sections

… 38 later steps

4 more

tests/test_operator_excludes.py:281 · its file's page

What it checks (1)

  1. assert raised.value.code == 1, "must be the pipeline's refusal, not argparse's" not attributed

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_excluding_the_repository_root_is_refused→_repo→_build

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_excluding_the_repository_root_is_refused · 1 checks_build_run_pipeline_run_pipeline_innerreport_statsREQ-DDB-CLI-001 · inferred_build… 7 calls …doxygen_supports_sqlite3REQ-DDB-CLI-002 · inferred_build… 3 calls …stated_document_metaREQ-DDB-CONFIG-001 · measured_build… 4 calls …_is_flat_req_listREQ-DDB-CONFIG-003 · inferred_build… 3 calls …resolve_preprocessorREQ-DDB-CONFIG-004 · inferred_build… 3 calls …import_kconfigREQ-DDB-CONFIG-005 · inferred_build… 3 calls …recorded_explicitREQ-DDB-CONFIG-006 · measured_build… 3 calls …write_build_signatureREQ-DDB-CONFIG-007 · inferred_build… 3 calls …load_toolchain_configREQ-DDB-CONFIG-009 · inferred_build… 5 calls …read_requirements_sectionREQ-DDB-GUARD-012 · inferred_build… 5 calls …parse_doxygen_tagsREQ-DDB-GUARD-019 · inferred_build… 5 calls …apply_autobriefREQ-DDB-GUARD-024 · inferred

and 42 more requirement paths, listed below.

Also reaches 55 requirements

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