test_a_declared_call_primitive_with_no_known_release_fails_closed

Tests › tests/test_critical_sections.py

passed Passed in the packaged run.

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

  1. —
→

When

  1. declared = next( p for p in load_lock_patterns({"locks": [{"name": "bsp_take", "form": "call"}]}) if p.name == "bsp_take" )
  2. section = _section_for(_rootless_node(), b"int x;", declared, "some_lock")
→

Then

  1. ✓ section.end_line is None
  2. ✓ section.calls equals []
  3. ✓ section.confidence equals EXTENT_UNRESOLVED

tests/test_critical_sections.py:291 · its file's page

What it checks (3)

  1. assert section.end_line is None observes _section_for via section
  2. assert section.calls == [] observes _section_for via section
  3. assert section.confidence == EXTENT_UNRESOLVED observes _section_for via section

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_node

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_a_declared_call_primitive_with_no_known_release_fails_closed · 3 checks_section_forresolve_sectionenclosingREQ-DDB-PIPE-003 · inferredload_lock_patternsREQ-DDB-SCHEMA-011 · measuredload_lock_patternsdeclaration_originREQ-DDB-SCHEMA-012 · measured
Also reaches 3 requirements

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