You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(core): extend registrar, resource, and join coverage - #1038
Extend regression coverage for registrar failures, join receiver lookup, and duplicate resource registration.
Aided by GPT-6.1 Sol
Tests: Added regression coverage for registrar creator exceptions, including single invocation and clean destruction.
Tests: Expanded join coverage for invalid receiver indices, selector-based receiver lookup, input readiness, selector order, and index-port metadata.
Tests: Strengthened duplicate resource registration checks to confirm duplicates do not construct another resource and that the original resource remains accessible.
CI: Results for the current head are not available.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 6fcd56ee-5174-485d-971a-9104a02e331e
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
Walkthrough
The changes add tests for registrar creator exceptions, join receiver behavior and port metadata, and duplicate resource registration.
Construction-counting fixtures verify that duplicate registrations throw without constructing another resource, while the original resource or limiter remains accessible.
No behavior issue has been established that would prevent merging these tests.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly summarizes the added test coverage for registrar failures, resource registration, and joins.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
knoepfel
changed the title
fix(core): prevent duplicate registration after registrar moves
test(core): extend registrar, resource, and join coverage
Nov 10, 2026
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
test/multilayer_join_test.cpp-147-152: 1
147-152: Trivial · Maintainability & Code Quality · Low value
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Move the using internal::receiver_for; declaration above the lambda, or confirm it is not needed.
The lambda at Lines 147-150 calls internal::receiver_for<3> with a qualified name. It does not depend on the using-declaration. Line 152 only serves the unqualified call at Line 169. That call passes the template argument <3>.
The code works as written. The ordering is still confusing, because the using-declaration sits between the lambda and its first use. Place it next to the other setup lines, or qualify the Line 169 call with internal::. A reader then does not have to track which calls use ADL or the using-declaration.
I did not check how the unqualified receiver_for<1ull>(join, 2u) call at Line 183 resolves for fold_join_node. It may rely on a using-declaration earlier in the file, in the unchanged lines I could not see. Please confirm that this resolves to the intended overload.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 3b3759dc-8e15-4265-b053-546819e05353
Commits
Reviewing files that changed from the base of the PR and between 9e52668 and c649360.
Files selected for processing: 3
test/core_misc_test.cpp
test/multilayer_join_test.cpp
test/resources_test.cpp
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Review details
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 1
Source excerpt: **Authoritative sources**: `.clang-format` and `.clang-tidy` are the ground truth for formatting and naming.
CodeRabbit inference engine (AGENTS.md)
Files:
test/core_misc_test.cpp
test/multilayer_join_test.cpp
test/resources_test.cpp
Additional comments: 5
test/core_misc_test.cpp: 1
2-2: LGTM!
Also applies to: 11-11, 100-118
test/resources_test.cpp: 1
47-55: LGTM!
Also applies to: 289-293, 296-297, 302-306, 309-310
The reason will be displayed to describe this comment to others. Learn more.
Review context
Reviewed only commit 6e99b6ed3e37f70c3eccbc4ff132160059b427eb (test(core): extend registrar, resource, and join coverage). Existing tests and implementation were inspected only to establish context. This was a static review; tests were not run.
Agent: Kilo, QA/testing specialist (review performed inline; no subagents). Model: fnal-azure/azure/gpt-6.1-sol (display name azure/gpt-6.1-sol). Effort: medium. Cost: ~$0.23
Given review prompt
Please review ONLY the latest commit on this branch. Evaluate the tests for:
Triviality
Tautology
Appropriateness - are we testing the right thing(s), and are the tests meaningful and probative
Clarity - is it obvious to the casual code reader what each test exercises?
Coverage - unnecessary duplication, or testing gaps that could be filled without undue work
Encapsulation - is there unnecessary use of components not under test that should be avoided or mocked?
Findings
Medium: Same-layer join coverage does not distinguish ID matching from FIFO joining
Every input carries the same message_id, and each port receives only one message. The test meaningfully checks waiting for all inputs and preserving selector order, but a mistakenly configured FIFO/queueing join would also satisfy every assertion. Reordering submissions across ports does not exercise matching between different data units. The implementation explicitly promises joining by ID.
Recommendation: Add a separate scenario with two IDs and different arrival orders on different ports. First provide one message per port with mismatched IDs and assert no output; then supply the matching messages and verify that each output tuple contains only one ID and the corresponding stores. Do not assume an ordering between completed output tuples.
Low: Added assertions exercise behavior not identified by their test names
The same-layer test also checks rejection of an unknown selector. The fold receiver test also checks routing/counting-layer metadata. The resource sections now establish rejection before construction and preservation of the original registration, not merely that duplicates throw. These checks are useful, but their purposes are partially hidden from someone scanning test names.
Recommendation: Give the unknown-selector and fold-metadata checks separately named sections or test cases. Rename the resource sections to describe their stronger guarantee, for example, “duplicate unlimited registration preserves the existing resource without constructing another.”
Assessment against the six criteria
Triviality: No problematic trivial tests. Construction counters, the incomplete-join check, selector-order checks, and boundary rejection checks can detect real regressions.
Tautology: No genuine tautologies. Comparing returned receivers with explicit input ports is an independent expectation about the partition-port offset. Comparing resource identities before and after rejection checks preservation, not self-equality.
Appropriateness: Strong overall. The registrar test checks exception propagation and exactly-once creator invocation across destruction. Resource changes substantially strengthen existing duplicate-registration tests. Join metadata is a legitimate routing contract to test directly.
Clarity: Setup and assertions are generally readable. Naming or separating the additional scenarios would improve discoverability.
Coverage: ID matching is the most valuable missing scenario. The duplicate-resource sections cover separate implementation paths and are not unnecessary duplication. Both the first invalid fold index and size_t::max() are justified: the latter exercises the index + 1 wraparound boundary.
Encapsulation: Appropriate. Counted resources are small test doubles, and the throwing registrar callback avoids constructing an actual graph node. Real TBB graphs, queue sinks, and minimal product stores are justified for testing join wiring and observable output; mocking them would weaken those checks. The fold initializer is already a minimal stub.
Overall, this commit adds meaningful regression protection rather than coverage padding. The main recommended improvement is a focused multi-ID join test; the remaining feedback concerns test discoverability and organization. Submitted as a non-blocking comment review.
The reason will be displayed to describe this comment to others. Learn more.
Scope
Reviewed only commit a508521a2b3d29af3f0357b4f455475173d4c619 (test(core): verify join ID matching and clarify test scenarios), specifically its attempts to address review 5877522094. The earlier reviewed test content is unchanged in these two files after the parent commit was rebased. Other PR changes are outside this review.
Findings and disposition
No remaining issues found in the scoped fixes. Approve.
The new same-layer scenario now supplies two IDs in different orders across ports, checks that mismatched arrivals produce no output, and verifies exactly two homogeneous output tuples covering both IDs without requiring output order. This resolves the original FIFO-versus-ID-matching coverage gap. Using ID-only messages is appropriate for this scenario; the separate selector-order scenario retains its store-identity checks.
Unknown-selector rejection and fold routing/counting metadata now have separately named sections. The resource section names now explicitly identify rejection without constructing another resource, while retaining the original-registration identity checks. These changes address the report's discoverability concern without removing assertions.
Validation
Used an isolated standalone clone at the reviewed SHA, mounted into a container based on ghcr.io/framework-r-d/phlex-dev:latest (image ID sha256:cef34af082d20450c2bdb5235b8457b9fd5109d2d5a9ff47a6a5647db9793f4f), with the image's Spack environment activated: GCC 15.3.0 and CMake 4.4.4. Configured a Debug/Ninja build with PHLEX_USE_FORM=OFF; built targets multilayer_join and resources; ran CTest selection ^(multilayer_join|resources)$ with --no-tests=error --timeout 90. Both passed: 60 assertions in 4 join test cases and 17 assertions in 2 resource test cases.
Also temporarily replaced the underlying tag-matching join with a FIFO/queueing join in the isolated clone. The new ID-matching case failed as expected, including the initial no-output assertion and tuple-ID comparisons. Restored the implementation, rebuilt, and reran both CTests successfully; no tracked changes remain. The full suite and FORM-enabled configurations were not run.
Review performed inline by Kilo (fnal-azure/azure/gpt-6.1-sol), without subagents.
- Use direct construction for `algorithm_name` instead of the removed `create` factory.
- Construct product specifications from the fold join test’s named algorithm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extend regression coverage for registrar failures, join receiver lookup, and duplicate resource registration.
Aided by GPT-6.1 Sol