test_a_declared_call_primitive_with_no_known_release_fails_closed¶
Tests › tests/test_critical_sections.py
What this test is for
Why it exists
A repo declaring its own `call`-form primitive has no release counterpart registered, so the extent cannot be derived. It must NOT fall through to the RAII block-scope rule, which would report a whole function as one critical section on no evidence — the one fail-OPEN a unified walk could introduce.
Given
- —
When
declared = next( p for p in load_lock_patterns({"locks": [{"name": "bsp_take", "form": "call"}]}) if p.name == "bsp_take" )section = _section_for(_rootless_node(), b"int x;", declared, "some_lock")
Then
- ✓ section.end_line is None
- ✓ section.calls equals []
- ✓ section.confidence equals EXTENT_UNRESOLVED
tests/test_critical_sections.py:291 · its file's page
What it checks (3)
assert section.end_line is Noneobserves_section_forviasectionassert section.calls == []observes_section_forviasectionassert section.confidence == EXTENT_UNRESOLVEDobserves_section_forviasection
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_a_declared_call_primitive_with_no_known_release_fails_closed→load_lock_patterns→_section_for→_rootless_nodeWhat 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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-PIPE-003 inferred
- REQ-DDB-SCHEMA-011 measured
- REQ-DDB-SCHEMA-012 measured