Repository navigation
refactor: remove unnecessary layer of consumer inheritance - #966
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
| Layer / File(s) | Summary |
|---|---|
Consumer contract and input handling phlex/core/consumer.hpp, phlex/core/consumer.cpp, phlex/core/products_consumer.hpp, phlex/core/products_consumer.cpp, test/core_misc_test.cpp |
consumer now stores input selectors, derives and validates layers, and wires layer-specific ports through a filter. The products_consumer class and its focused test are removed. |
Declared node migration phlex/core/declared_*.* |
Input-consuming declared nodes now use consumer. declared_output no longer inherits from consumer and instead stores its name and predicates. |
Graph and catalog integration phlex/core/filter.*, phlex/core/make_computational_edges.cpp, phlex/core/node_catalog.*, phlex/core/*_node.hpp, phlex/core/fwd.hpp, phlex/core/CMakeLists.txt |
Filters, computational-edge functions, and the node catalog now use consumer. Node headers, the forward declaration, and build entries remove references to products_consumer. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Refactor
Suggested reviewers: beojan
Merge Risk: 
Minimal · previous review db692
-
No actionable merge-blocking issue was established; the change is ready for normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- 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.
CodeRabbit Verify
- Run CodeRabbit Verify to test the changes in this pull request.
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Organization UI
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
a95570ba-91e8-4420-ae04-6108af2e98a8
📒 Files selected for processing: 29
-
phlex/core/CMakeLists.txt
phlex/core/consumer.cpp
phlex/core/consumer.hpp
phlex/core/declared_fold.cpp
phlex/core/declared_fold.hpp
phlex/core/declared_observer.cpp
phlex/core/declared_observer.hpp
phlex/core/declared_output.cpp
phlex/core/declared_output.hpp
phlex/core/declared_predicate.cpp
phlex/core/declared_predicate.hpp
phlex/core/declared_transform.cpp
phlex/core/declared_transform.hpp
phlex/core/declared_unfold.cpp
phlex/core/declared_unfold.hpp
phlex/core/filter.cpp
phlex/core/filter.hpp
phlex/core/fold_node.hpp
phlex/core/fwd.hpp
phlex/core/make_computational_edges.cpp
phlex/core/node_catalog.cpp
phlex/core/node_catalog.hpp
phlex/core/observer_node.hpp
phlex/core/predicate_node.hpp
phlex/core/products_consumer.cpp
phlex/core/products_consumer.hpp
phlex/core/transform_node.hpp
phlex/core/unfold_node.hpp
test/core_misc_test.cpp
💤 Files with no reviewable changes: 5
-
- phlex/core/CMakeLists.txt
- phlex/core/fwd.hpp
- phlex/core/products_consumer.cpp
- test/core_misc_test.cpp
- phlex/core/products_consumer.hpp
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📜 Recent review details
-
⏰ Context from checks skipped due to timeout: 10
-
- GitHub Check: determine-languages
- GitHub Check: header-guards-check
- GitHub Check: generate-matrix
- GitHub Check: clang-tidy-check
- GitHub Check: coverage
- GitHub Check: cmake-format-check
- GitHub Check: clang-format-check
- GitHub Check: setup
- GitHub Check: setup
- GitHub Check: setup
🧰 Additional context used
-
📚 Code guidelines: 1
.github/copilot-instructions.md — auto-discovered
📓 Path-based instructions: 1
Source excerpt: Use clang-format tool for all C++ code (VS Code auto-formats on save)
CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
phlex/core/unfold_node.hpp
phlex/core/transform_node.hpp
phlex/core/observer_node.hpp
phlex/core/declared_unfold.hpp
phlex/core/declared_predicate.hpp
phlex/core/declared_predicate.cpp
phlex/core/declared_transform.cpp
phlex/core/node_catalog.hpp
phlex/core/declared_observer.cpp
phlex/core/fold_node.hpp
phlex/core/predicate_node.hpp
phlex/core/declared_output.hpp
phlex/core/declared_transform.hpp
phlex/core/declared_unfold.cpp
phlex/core/filter.cpp
phlex/core/declared_fold.hpp
phlex/core/node_catalog.cpp
phlex/core/make_computational_edges.cpp
phlex/core/filter.hpp
phlex/core/declared_fold.cpp
phlex/core/declared_output.cpp
phlex/core/consumer.hpp
phlex/core/consumer.cpp
phlex/core/declared_observer.hpp
🔇 Additional comments: 24
-
phlex/core/consumer.hpp: 1
-
21-23: LGTM!
Also applies to: 26-31, 36-38, 40-41, 44-48, 51-51, 54-57
phlex/core/consumer.cpp: 1
-
20-33: LGTM!
Also applies to: 35-57, 62-72, 75-75, 79-79, 81-100, 103-104, 106-106
phlex/core/declared_fold.cpp: 1
-
3-3: LGTM!
Also applies to: 19-23
phlex/core/declared_fold.hpp: 1
-
4-4: LGTM!
Also applies to: 20-20, 31-31
phlex/core/declared_observer.cpp: 1
-
3-3: LGTM!
Also applies to: 18-22
phlex/core/declared_observer.hpp: 1
-
4-4: LGTM!
Also applies to: 17-17
phlex/core/declared_predicate.cpp: 1
-
3-3: LGTM!
Also applies to: 18-22
phlex/core/declared_predicate.hpp: 1
-
4-4: LGTM!
Also applies to: 19-19
phlex/core/declared_transform.cpp: 1
-
3-3: LGTM!
Also applies to: 18-22
phlex/core/declared_transform.hpp: 1
-
4-4: LGTM!
Also applies to: 18-18, 28-28
phlex/core/declared_unfold.cpp: 1
-
3-3: LGTM!
Also applies to: 56-60
phlex/core/declared_unfold.hpp: 1
-
4-4: LGTM!
Also applies to: 48-48, 59-59
phlex/core/declared_output.cpp: 1
-
5-5: LGTM!
Also applies to: 20-21, 30-34
phlex/core/declared_output.hpp: 1
-
7-7: LGTM!
Also applies to: 24-24, 32-33, 39-40
phlex/core/filter.cpp: 1
-
3-3: LGTM!
Also applies to: 19-19
phlex/core/filter.hpp: 1
-
24-24: LGTM!
phlex/core/make_computational_edges.cpp: 1
-
3-3: LGTM!
Also applies to: 190-190, 218-218
phlex/core/node_catalog.cpp: 1
-
3-3: LGTM!
Also applies to: 19-19, 23-23, 26-26
phlex/core/node_catalog.hpp: 1
-
4-4: LGTM!
Also applies to: 105-105
phlex/core/fold_node.hpp: 1
-
6-6: LGTM!
phlex/core/observer_node.hpp: 1
-
5-5: LGTM!
phlex/core/predicate_node.hpp: 1
-
5-5: LGTM!
phlex/core/transform_node.hpp: 1
-
8-8: LGTM!
phlex/core/unfold_node.hpp: 1
-
5-5: LGTM!
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Organization UI
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
a95570ba-91e8-4420-ae04-6108af2e98a8
📒 Files selected for processing: 29
-
phlex/core/CMakeLists.txtphlex/core/consumer.cppphlex/core/consumer.hppphlex/core/declared_fold.cppphlex/core/declared_fold.hppphlex/core/declared_observer.cppphlex/core/declared_observer.hppphlex/core/declared_output.cppphlex/core/declared_output.hppphlex/core/declared_predicate.cppphlex/core/declared_predicate.hppphlex/core/declared_transform.cppphlex/core/declared_transform.hppphlex/core/declared_unfold.cppphlex/core/declared_unfold.hppphlex/core/filter.cppphlex/core/filter.hppphlex/core/fold_node.hppphlex/core/fwd.hppphlex/core/make_computational_edges.cppphlex/core/node_catalog.cppphlex/core/node_catalog.hppphlex/core/observer_node.hppphlex/core/predicate_node.hppphlex/core/products_consumer.cppphlex/core/products_consumer.hppphlex/core/transform_node.hppphlex/core/unfold_node.hpptest/core_misc_test.cpp
💤 Files with no reviewable changes: 5
-
- phlex/core/CMakeLists.txt
- phlex/core/fwd.hpp
- phlex/core/products_consumer.cpp
- test/core_misc_test.cpp
- phlex/core/products_consumer.hpp
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
-
📜 Recent review details
-
⏰ Context from checks skipped due to timeout: 10
-
- GitHub Check: determine-languages
- GitHub Check: header-guards-check
- GitHub Check: generate-matrix
- GitHub Check: clang-tidy-check
- GitHub Check: coverage
- GitHub Check: cmake-format-check
- GitHub Check: clang-format-check
- GitHub Check: setup
- GitHub Check: setup
- GitHub Check: setup
🧰 Additional context used
-
📚 Code guidelines: 1
.github/copilot-instructions.md — auto-discovered📓 Path-based instructions: 1
Source excerpt: Use clang-format tool for all C++ code (VS Code auto-formats on save)
CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
phlex/core/unfold_node.hppphlex/core/transform_node.hppphlex/core/observer_node.hppphlex/core/declared_unfold.hppphlex/core/declared_predicate.hppphlex/core/declared_predicate.cppphlex/core/declared_transform.cppphlex/core/node_catalog.hppphlex/core/declared_observer.cppphlex/core/fold_node.hppphlex/core/predicate_node.hppphlex/core/declared_output.hppphlex/core/declared_transform.hppphlex/core/declared_unfold.cppphlex/core/filter.cppphlex/core/declared_fold.hppphlex/core/node_catalog.cppphlex/core/make_computational_edges.cppphlex/core/filter.hppphlex/core/declared_fold.cppphlex/core/declared_output.cppphlex/core/consumer.hppphlex/core/consumer.cppphlex/core/declared_observer.hpp
🔇 Additional comments: 24
-
phlex/core/consumer.hpp: 1
-
21-23: LGTM!Also applies to: 26-31, 36-38, 40-41, 44-48, 51-51, 54-57
phlex/core/consumer.cpp: 1
-
20-33: LGTM!Also applies to: 35-57, 62-72, 75-75, 79-79, 81-100, 103-104, 106-106
phlex/core/declared_fold.cpp: 1
-
3-3: LGTM!Also applies to: 19-23
phlex/core/declared_fold.hpp: 1
-
4-4: LGTM!Also applies to: 20-20, 31-31
phlex/core/declared_observer.cpp: 1
-
3-3: LGTM!Also applies to: 18-22
phlex/core/declared_observer.hpp: 1
-
4-4: LGTM!Also applies to: 17-17
phlex/core/declared_predicate.cpp: 1
-
3-3: LGTM!Also applies to: 18-22
phlex/core/declared_predicate.hpp: 1
-
4-4: LGTM!Also applies to: 19-19
phlex/core/declared_transform.cpp: 1
-
3-3: LGTM!Also applies to: 18-22
phlex/core/declared_transform.hpp: 1
-
4-4: LGTM!Also applies to: 18-18, 28-28
phlex/core/declared_unfold.cpp: 1
-
3-3: LGTM!Also applies to: 56-60
phlex/core/declared_unfold.hpp: 1
-
4-4: LGTM!Also applies to: 48-48, 59-59
phlex/core/declared_output.cpp: 1
-
5-5: LGTM!Also applies to: 20-21, 30-34
phlex/core/declared_output.hpp: 1
-
7-7: LGTM!Also applies to: 24-24, 32-33, 39-40
phlex/core/filter.cpp: 1
-
3-3: LGTM!Also applies to: 19-19
phlex/core/filter.hpp: 1
-
24-24: LGTM!
phlex/core/make_computational_edges.cpp: 1
-
3-3: LGTM!Also applies to: 190-190, 218-218
phlex/core/node_catalog.cpp: 1
-
3-3: LGTM!Also applies to: 19-19, 23-23, 26-26
phlex/core/node_catalog.hpp: 1
-
4-4: LGTM!Also applies to: 105-105
phlex/core/fold_node.hpp: 1
-
6-6: LGTM!
phlex/core/observer_node.hpp: 1
-
5-5: LGTM!
phlex/core/predicate_node.hpp: 1
-
5-5: LGTM!
phlex/core/transform_node.hpp: 1
-
8-8: LGTM!
phlex/core/unfold_node.hpp: 1
-
5-5: LGTM!
-
-
1ebe1d9 to
e2e05c1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #966 +/- ##
==========================================
+ Coverage 89.64% 89.76% +0.12%
==========================================
Files 177 176 -1
Lines 6034 6031 -3
Branches 1001 1000 -1
==========================================
+ Hits 5409 5414 +5
+ Misses 398 391 -7
+ Partials 227 226 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
e2e05c1 to
235f34f
Compare
|
@CodeRabbit full review |
|
235f34f to
db692b1
Compare
db692b1 to
4805ced
Compare
4805ced to
df8a2e0
Compare
Aided by GPT-6.1 Sol
df8a2e0 to
755705e
Compare
Aided by GPT-6.1 Sol
Stack created with GitHub Stacks CLI • Give Feedback 💬
products_consumerlayer and move its input selector, layer validation, and port-filtering responsibilities intoconsumer.node_catalog::consumers()to useconsumerdirectly.declared_outputindependent ofconsumer; it now stores and exposes its algorithm name and predicates.products_consumer.cppfrom the library andproducts_consumer.hppfrom installed headers.consumertest case. No test-run results were provided.