test_qualified_at_boundary_rejects_prefix_and_suffix_collisions

Tests › tests/test_r1_richness.py

passed Passed in the packaged run.

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

  1. 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 ]
  2. 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

  1. for defn, q in accept: assert _qualified_at_boundary(defn, q) is True, (defn, q)
  2. for defn, q in reject: assert _qualified_at_boundary(defn, q) is False, (defn, q)
→

Then

  1. —

tests/test_r1_richness.py:39 · its file's page

What it checks (2)

  1. assert _qualified_at_boundary(defn, q) is True, (defn, q) observes _qualified_at_boundary
  2. assert _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_boundary

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 (5)

requirementlinked byimplementers exercised
REQ-DDB-SCHEMA-001catalogunknown
REQ-DDB-SCHEMA-002catalogunknown
REQ-DDB-SCHEMA-003catalogunknown
REQ-DDB-SCHEMA-004catalogunknown
REQ-DDB-SCHEMA-007catalogunknown