Summary
Codecov coverage for phlex/core/index_router.cpp Line 366 is nondeterministic. The affected code is the if (not inserted) return path in multilayer_slots_for.
Concurrent calls can make inserted either true or false. This produces small, unrelated coverage changes in pull requests.
Required change
Add a focused multithreaded test that deterministically exercises the contended-insert path. Use synchronization, such as a barrier, so multiple threads call multilayer_slots_for with the same layer_hash at the same time.
Do not change the cursor or GSL work in the current pull request for this task.
Rationale
The branch is valid, but its coverage depends on thread scheduling. A deterministic test will reduce Codecov noise and verify the concurrent cache behavior.
Affected area
phlex/core/index_router.cpp
- Tests for
multilayer_slots_for and concurrent index-router behavior
Acceptance criteria
- The test forces one or more callers through the
not inserted branch.
- The test is stable across repeated runs.
- Coverage consistently includes the return path at
phlex/core/index_router.cpp Line 366.
- The test verifies that concurrent callers receive consistent slot and end-token-entry results.
References
Summary
Codecov coverage for
phlex/core/index_router.cppLine 366 is nondeterministic. The affected code is theif (not inserted)return path inmultilayer_slots_for.Concurrent calls can make
insertedeithertrueorfalse. This produces small, unrelated coverage changes in pull requests.Required change
Add a focused multithreaded test that deterministically exercises the contended-insert path. Use synchronization, such as a barrier, so multiple threads call
multilayer_slots_forwith the samelayer_hashat the same time.Do not change the cursor or GSL work in the current pull request for this task.
Rationale
The branch is valid, but its coverage depends on thread scheduling. A deterministic test will reduce Codecov noise and verify the concurrent cache behavior.
Affected area
phlex/core/index_router.cppmultilayer_slots_forand concurrent index-router behaviorAcceptance criteria
not insertedbranch.phlex/core/index_router.cppLine 366.References
gsl::not_nullwhere appropriate #839gsl::not_nullwhere appropriate #839 (comment)