Skip to content

refactor: remove unnecessary layer of consumer inheritance - #966

Merged
greenc-FNAL merged 1 commit into
mainfrom
refactor/consumer-interface
Nov 3, 2026
Merged

greenc-FNAL merged 1 commit into
mainfrom
refactor/consumer-interface

Conversation

@knoepfel

@knoepfel knoepfel commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Aided by GPT-6.1 Sol


Stack created with GitHub Stacks CLI • Give Feedback 💬

  • Code: Remove the products_consumer layer and move its input selector, layer validation, and port-filtering responsibilities into consumer.
  • Code: Update consumer nodes, graph wiring, and node_catalog::consumers() to use consumer directly.
  • Code: Make declared_output independent of consumer; it now stores and exposes its algorithm name and predicates.
  • Build system: Remove products_consumer.cpp from the library and products_consumer.hpp from installed headers.
  • Tests: Remove the existing consumer test case. No test-run results were provided.
  • Review: CodeRabbit reported that its review was blocked by a rate limit. No review severity counts were provided.

@knoepfel
knoepfel added this pull request to stack #968 October 9, 2026 19:01
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

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: 2ca1aa57-4899-4a76-ba06-49f6b3aaf9d9

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

No actionable comments were generated in the recent review.

Walkthrough

The PR moves input-selector and layer handling from products_consumer into consumer. Declared input-consuming nodes and graph plumbing now use consumer; declared_output stores its name and predicates without inheriting from it.

Changes: Consumer input handling

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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 2.86% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 24 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: removing the unnecessary consumer inheritance layer and consolidating the consumer implementation.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
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.

Share

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
📥 Commits

Reviewing files that changed from the base of the PR and between e277d3a and db692b1.

📒 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!

@knoepfel
knoepfel force-pushed the refactor/consumer-interface branch from 1ebe1d9 to e2e05c1 Compare October 9, 2026 19:05
@knoepfel knoepfel changed the title refactor(core): remove unnecessary layer of consumer inheritance refactor: remove unnecessary layer of consumer inheritance Oct 9, 2026
@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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     
Flag Coverage Δ
amd64 89.76% <100.00%> (+0.12%) ⬆️
arm64 89.76% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
phlex/core/consumer.cpp 100.00% <100.00%> (ø)
phlex/core/consumer.hpp 100.00% <100.00%> (ø)
phlex/core/declared_fold.cpp 100.00% <100.00%> (ø)
phlex/core/declared_fold.hpp 100.00% <100.00%> (ø)
phlex/core/declared_observer.cpp 100.00% <100.00%> (ø)
phlex/core/declared_output.cpp 100.00% <100.00%> (ø)
phlex/core/declared_output.hpp 100.00% <ø> (ø)
phlex/core/declared_predicate.cpp 100.00% <100.00%> (ø)
phlex/core/declared_transform.cpp 100.00% <100.00%> (ø)
phlex/core/declared_transform.hpp 100.00% <100.00%> (ø)
... and 12 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26c5387...755705e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@knoepfel
knoepfel force-pushed the refactor/consumer-interface branch from e2e05c1 to 235f34f Compare October 9, 2026 19:44
@knoepfel

knoepfel commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

@CodeRabbit full review

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 19 minutes.

@marcpaterno
marcpaterno force-pushed the refactor/consumer-interface branch from 235f34f to db692b1 Compare October 14, 2026 17:30
Base automatically changed from refactor/node-interfaces to main October 14, 2026 18:50
@marcpaterno
marcpaterno force-pushed the refactor/consumer-interface branch from db692b1 to 4805ced Compare October 14, 2026 18:50
@marcpaterno
marcpaterno force-pushed the refactor/consumer-interface branch from 4805ced to df8a2e0 Compare November 3, 2026 19:07
@knoepfel
knoepfel force-pushed the refactor/consumer-interface branch from df8a2e0 to 755705e Compare November 3, 2026 19:31
@knoepfel
knoepfel requested a review from marcpaterno November 3, 2026 19:51
@greenc-FNAL
greenc-FNAL merged commit cea210a into main Nov 3, 2026
43 checks passed
@knoepfel
knoepfel deleted the refactor/consumer-interface branch November 3, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants