test_target_slug_disambiguates_same_named_checkouts¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
Two checkouts with the same directory name get distinct db paths.
Verifies REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
a = tmp_path / "one" / "firmware"b = tmp_path / "two" / "firmware"
2 more
a.mkdir(parents=True)b.mkdir(parents=True)
When
ta = st.target_for(a, tmp_path / "state")tb = st.target_for(b, tmp_path / "state")
Then
- ✓ ta.slug.startswith("firmware-") holds
- ✓ ta.slug differs from tb.slug
- ✓ ta.db_path differs from tb.db_path
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) · 1 of 142 steps
… 32 earlier steps
… 105 later steps
4 more
- Build, refresh and check the index · 1 of 153 steps
- clew — `main` (clew/cli.py) · 1 of 400 steps
- clew-mcp — `main` (clew/mcp_server/server.py) · 1 of 17 steps
- `main` (scripts/incremental_probe.py) · 1 of 3 steps
tests/test_mcp_server.py:2080 · its file's page
What it checks (3)
assert ta.slug.startswith("firmware-")observestarget_forviataassert ta.slug != tb.slugobservestarget_forviataassert ta.db_path != tb.db_pathobservestarget_forviata
Where the product reaches it
main→query_main→_locate→target_for(flow)
Call flow
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.
Requirements it verifies (4)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-MCP-003 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-001 measured