test_the_vendored_disclosure_is_bounded

Tests › tests/test_scope.py

passed Passed in the packaged run.

What this test is for

Why it exists

gh#37: an EXCLUDE list grew to ~390 entries and overflowed a client's reply limit. A disclosure that names every matching tree repeats that on a repository vendoring many libraries. Name a few, COUNT the rest, so the reader still learns the true size.

Verifies REQ-DDB-PIPE-014

Given

  1. root = tmp_path / "mono"
  2. for i in range(12): _src(root, f"pkg{i}/vendor/lib.c")
→

When

  1. reason = sc.whole_repo_scope(root).reason
→

Then

  1. ✓ reason contains "look vendored"
  2. ✓ reason contains "12 trees"
  3. ✓ reason.count("/vendor") is at most 5

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

… 114 later steps

4 more

tests/test_scope.py:781 · its file's page

What it checks (3)

  1. assert "look vendored" in reason, f"precondition: nothing was disclosed: {reason}" observes whole_repo_scope via reason
  2. assert "12 trees" in reason, f"the true count was lost when summarising: {reason}" observes whole_repo_scope via reason
  3. assert reason.count("/vendor") <= 5, f"the disclosure was not bounded: {reason}" observes whole_repo_scope via reason

Where the product reaches it

  • main → propose_main → propose → build_context → derive_scope → whole_repo_scope (flow)

Call flow

test_the_vendored_disclosure_is_bounded→_src→whole_repo_scope

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_the_vendored_disclosure_is_bounded · 3 checkswhole_repo_scopeREQ-DDB-CONFIG-001 · measured

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-014catalogunknown
Also reaches 1 requirement

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