test_an_unwritable_location_proceeds_unlocked¶
Tests › tests/test_buildlock.py
What this test is for
Why it exists
FAILS OPEN. An unwritable state directory is a real deployment, and this component can only ever save a duplicate build — so it must degrade to "no lock" rather than to an error. Asserted by pointing at a path that cannot be created.
Given
obstacle = tmp_path / "not-a-dir"obstacle.write_text("", encoding="utf-8")
When
with build_lock(obstacle / "clew.db") as held: assert held is False, ( "an unusable lock location must report not-held rather than raise. This component can " "only ever save a duplicate build, so it must never be able to prevent one." )
Then
- —
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) · 2 of 142 steps
… 60 earlier steps
… 76 later steps
tests/test_buildlock.py:159 · its file's page
What it checks (1)
assert held is False, ( "an unusable lock location must report not-held rather than raise. This component can " "only ever save a duplicate build, so it must never be able to prevent one." )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
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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-002 measured