Skip to content

Catalog and loader cleanup#659

Draft
marcpaterno wants to merge 5 commits into
Framework-R-D:mainfrom
marcpaterno:catalog-and-loader-cleanup
Draft

Catalog and loader cleanup#659
marcpaterno wants to merge 5 commits into
Framework-R-D:mainfrom
marcpaterno:catalog-and-loader-cleanup

Conversation

@marcpaterno

Copy link
Copy Markdown
Member

This PR aims to improve the robustness and clarity of the node_catalog and plugin loading machinery.

Changes:

Make plugin library lifetime explicit — Replace boost::dll::import_symbol (which relies on std::function to keep a shared library alive implicitly) with three explicit wrapper structs (module_plugin, source_plugin, driver_plugin), each owning a boost::dll::shared_library and a raw function pointer. plugin_loader now returns std::pair<shared_library, creator_t*> and create_driver uses std::optional<driver_plugin>.

Prevent accidental copying of node_catalog — Add deleted copy constructor and assignment operator, since a framework_graph's catalog is meant to be unique.

Remove implicit boost namespace — Replace using namespace boost; with explicit boost:: qualifications for better readability and searchability.

Document node_catalog — Add documentation for registration and module loading behavior.

Added explicit deleted copy constructor and assignment operator to
prevent node_catalog instances from being copied. A framework_graph's
node_catalog is meant to be unique and should not be duplicated.
Removed using namespace boost; and made all boost namespace
references explicit by qualifying them with boost:: prefix. This
improves code readability and searchability.
Replace boost::dll::import_symbol with three explicit wrapper structs
(module_plugin, source_plugin, driver_plugin), each owning a
boost::dll::shared_library and a raw function pointer. This makes
library lifetime explicit rather than relying on std::function to keep
the loaded .so alive implicitly.

plugin_loader now returns std::pair<shared_library, creator_t*>
instead of std::function<creator_t>. create_driver changes from
std::function<driver_shim_t> to std::optional<driver_plugin>.
@marcpaterno marcpaterno requested a review from knoepfel June 23, 2026 22:58
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

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

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7b490fb0-d0cd-4332-b08f-8d4034bb09d5

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@greenc-FNAL

greenc-FNAL commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

31 fixed, 0 new since branch point (a98ac3d)
31 fixed, 0 new since previous report on PR (93d573f)

✅ 31 CodeQL alerts resolved since the previous PR commit

  • Warning # 196 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:109:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 197 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:137:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 198 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:157:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 199 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:201:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 200 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:166:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 201 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:188:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 202 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:207:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 203 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:226:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 204 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:251:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 205 actions/untrusted-checkout-toctou/critical at .github/workflows/header-guards-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 206 actions/untrusted-checkout-toctou/critical at .github/workflows/markdown-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 207 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:108:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 208 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:111:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 209 actions/untrusted-checkout-toctou/high at .github/workflows/clang-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 210 actions/untrusted-checkout-toctou/high at .github/workflows/cmake-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 211 actions/untrusted-checkout-toctou/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 212 actions/untrusted-checkout-toctou/high at .github/workflows/python-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 213 actions/untrusted-checkout/high at .github/workflows/clang-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 214 actions/untrusted-checkout/high at .github/workflows/cmake-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 215 actions/untrusted-checkout/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • ✅ …and 11 more alerts (see Code Scanning for the full list).

✅ 31 CodeQL alerts resolved since the branch point

  • Warning # 196 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:109:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 197 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:137:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 198 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:157:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 199 actions/untrusted-checkout-toctou/critical at .github/workflows/clang-tidy-fix.yaml:201:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 200 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:166:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 201 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:188:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 202 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:207:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 203 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:226:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 204 actions/untrusted-checkout-toctou/critical at .github/workflows/coverage.yaml:251:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 205 actions/untrusted-checkout-toctou/critical at .github/workflows/header-guards-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 206 actions/untrusted-checkout-toctou/critical at .github/workflows/markdown-fix.yaml:107:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 207 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:108:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 208 actions/untrusted-checkout-toctou/critical at .github/workflows/yaml-fix.yaml:111:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 209 actions/untrusted-checkout-toctou/high at .github/workflows/clang-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 210 actions/untrusted-checkout-toctou/high at .github/workflows/cmake-format-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 211 actions/untrusted-checkout-toctou/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 212 actions/untrusted-checkout-toctou/high at .github/workflows/python-fix.yaml:94:9 — Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
    Insufficient protection against execution of untrusted code on a privileged workflow (issue_comment).
  • Warning # 213 actions/untrusted-checkout/high at .github/workflows/clang-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 214 actions/untrusted-checkout/high at .github/workflows/cmake-format-fix.yaml:94:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • Warning # 215 actions/untrusted-checkout/high at .github/workflows/jsonnet-format-fix.yaml:95:9 — Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
    Checkout of untrusted code in a privileged workflow with later potential execution (event trigger: issue_comment).
  • ✅ …and 11 more alerts (see Code Scanning for the full list).

Review the full CodeQL report for details.

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 6444 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 2132
  • readability-redundant-member-init: 1232
  • readability-redundant-typename: 1223
  • performance-unnecessary-value-param: 476
  • readability-avoid-const-params-in-decls: 269
  • modernize-pass-by-value: 206
  • readability-use-concise-preprocessor-directives: 189
  • modernize-use-designated-initializers: 105
  • readability-braces-around-statements: 93
  • readability-convert-member-functions-to-static: 80
  • cppcoreguidelines-special-member-functions: 67
  • readability-const-return-type: 50
  • modernize-use-auto: 36
  • readability-qualified-auto: 26
  • readability-redundant-control-flow: 24
  • modernize-avoid-c-style-cast: 23
  • readability-inconsistent-ifelse-braces: 21
  • modernize-concat-nested-namespaces: 17
  • readability-math-missing-parentheses: 17
  • modernize-use-equals-default: 15
  • modernize-avoid-c-arrays: 15
  • modernize-use-using: 13
  • readability-function-size: 12
  • bugprone-branch-clone: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • readability-container-contains: 8
  • readability-isolate-declaration: 8
  • modernize-use-starts-ends-with: 7
  • readability-container-size-empty: 7
  • modernize-use-ranges: 6
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-redundant-access-specifiers: 5
  • readability-redundant-casting: 3
  • modernize-use-std-numbers: 3
  • modernize-use-emplace: 3
  • performance-avoid-endl: 2
  • modernize-use-integer-sign-comparison: 2
  • clang-analyzer-security.ArrayBound: 2
  • modernize-make-shared: 1
  • modernize-redundant-void-arg: 1
  • readability-simplify-boolean-expr: 1
  • readability-use-anyofallof: 1
  • readability-else-after-return: 1
  • performance-move-const-arg: 1
  • readability-redundant-string-init: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
phlex/app/load_module.cpp 93.75% 0 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main     #659      +/-   ##
==========================================
+ Coverage   83.27%   83.54%   +0.27%     
==========================================
  Files         162      170       +8     
  Lines        5912     6619     +707     
  Branches      670      798     +128     
==========================================
+ Hits         4923     5530     +607     
- Misses        796      820      +24     
- Partials      193      269      +76     
Flag Coverage Δ
scripts 78.86% <ø> (+2.49%) ⬆️
unittests 85.73% <94.11%> (-1.12%) ⬇️

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

Files with missing lines Coverage Δ
phlex/core/node_catalog.hpp 100.00% <100.00%> (ø)
phlex/module.hpp 100.00% <ø> (ø)
phlex/app/load_module.cpp 86.00% <93.75%> (-0.96%) ⬇️

... and 18 files 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 a98ac3d...305dcc6. Read the comment docs.

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

@github-actions

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

Found 5555 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 2127
  • readability-redundant-member-init: 1282
  • portability-template-virtual-member-function: 563
  • performance-unnecessary-value-param: 457
  • readability-avoid-const-params-in-decls: 269
  • modernize-pass-by-value: 206
  • readability-braces-around-statements: 93
  • modernize-use-designated-initializers: 89
  • readability-convert-member-functions-to-static: 80
  • cppcoreguidelines-special-member-functions: 67
  • readability-const-return-type: 50
  • modernize-use-auto: 36
  • readability-qualified-auto: 26
  • readability-redundant-control-flow: 24
  • modernize-concat-nested-namespaces: 17
  • readability-math-missing-parentheses: 16
  • modernize-use-equals-default: 15
  • modernize-avoid-c-arrays: 15
  • modernize-use-using: 13
  • bugprone-branch-clone: 12
  • readability-function-size: 12
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-return-braced-init-list: 11
  • readability-isolate-declaration: 8
  • readability-container-size-empty: 7
  • modernize-use-starts-ends-with: 7
  • modernize-use-ranges: 6
  • readability-redundant-access-specifiers: 5
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-container-contains: 5
  • readability-redundant-casting: 3
  • modernize-use-emplace: 3
  • modernize-use-std-numbers: 3
  • performance-avoid-endl: 2
  • modernize-use-integer-sign-comparison: 2
  • performance-move-const-arg: 1
  • modernize-make-shared: 1
  • readability-else-after-return: 1
  • readability-simplify-boolean-expr: 1
  • readability-use-anyofallof: 1
  • modernize-redundant-void-arg: 1
  • readability-redundant-string-init: 1

See inline comments for details. Comment @phlexbot tidy-fix to auto-fix.

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.

2 participants