test_qualified_at_boundary_rejects_prefix_and_suffix_collisions¶
Tests › tests/test_r1_richness.py
What this test is for
Why it exists
Guards the qualified thread-entry resolver against borrowing another class's rowid. A match must be delimited on BOTH sides — rejecting a bad prefix (`Owner::run` inside `CoOwner::run`) AND a bad suffix (inside a param type `Owner::run_t`), while still accepting the real method (even when its own def also mentions the qualified name in a param).
Verifies REQ-DDB-SCHEMA-001 REQ-DDB-SCHEMA-002 REQ-DDB-SCHEMA-003 REQ-DDB-SCHEMA-004 REQ-DDB-SCHEMA-007
Given
accept = [ ("void LinkOwner::rx_loop()", "LinkOwner::rx_loop"), ("void Owner::run(Owner::run_t x)", "Owner::run"), # real method + param mention ("auto Owner::run<int>()", "Owner::run"), # template ("void Owner::run", "Owner::run"), # end-of-string decl ("void CoOwner::run(Owner::run x)", "Owner::run"), # a real Owner::run param exists ]reject = [ ("void CoOwner::run()", "Owner::run"), # prefix collision ("void CoOwner::run(Owner::run_t x)", "Owner::run"), # the fixed bug: suffix in param type ("void Owner::running()", "Owner::run"), # suffix collision ]
When
for defn, q in accept: assert _qualified_at_boundary(defn, q) is True, (defn, q)for defn, q in reject: assert _qualified_at_boundary(defn, q) is False, (defn, q)
Then
- —
tests/test_r1_richness.py:39 · its file's page
What it checks (2)
assert _qualified_at_boundary(defn, q) is True, (defn, q)observes_qualified_at_boundaryassert _qualified_at_boundary(defn, q) is False, (defn, q)observes_qualified_at_boundary
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_qualified_at_boundary_rejects_prefix_and_suffix_collisions→_qualified_at_boundaryWhat 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 (5)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-SCHEMA-001 | catalog | unknown |
| REQ-DDB-SCHEMA-002 | catalog | unknown |
| REQ-DDB-SCHEMA-003 | catalog | unknown |
| REQ-DDB-SCHEMA-004 | catalog | unknown |
| REQ-DDB-SCHEMA-007 | catalog | unknown |