Skip to content

Introduce layer_path class#640

Open
beojan wants to merge 5 commits into
Framework-R-D:mainfrom
beojan:identifier-layer-paths
Open

Introduce layer_path class#640
beojan wants to merge 5 commits into
Framework-R-D:mainfrom
beojan:identifier-layer-paths

Conversation

@beojan

@beojan beojan commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The new layer_path class is used in index_router and the related infrastructure.

I've kept strings and vector<string>s for now in drivers. That might be the next step.

@greenc-FNAL

Copy link
Copy Markdown
Contributor

✅ 7 CodeQL alerts resolved compared to main

  • Warning # 182 actions/unpinned-tag at .github/actions/prepare-check-outputs/action.yaml:47:13 — Unpinned 3rd party Action 'action.yaml' step Uses Step: get_pr uses 'Framework-R-D/phlex/.github/actions/get-pr-info' with ref 'main', not a pinned commit hash
  • Warning # 183 actions/unpinned-tag at .github/actions/prepare-check-outputs/action.yaml:51:13 — Unpinned 3rd party Action 'action.yaml' step Uses Step: detect_act uses 'Framework-R-D/phlex/.github/actions/detect-act-env' with ref 'main', not a pinned commit hash
  • Warning # 184 actions/unpinned-tag at .github/actions/prepare-fix-outputs/action.yaml:29:13 — Unpinned 3rd party Action 'action.yaml' step Uses Step: get_pr uses 'Framework-R-D/phlex/.github/actions/get-pr-info' with ref 'main', not a pinned commit hash
  • Warning # 185 actions/unpinned-tag at .github/actions/run-change-detection/action.yaml:62:13 — Unpinned 3rd party Action 'action.yaml' step Uses Step: filter uses 'Framework-R-D/phlex/.github/actions/detect-relevant-changes' with ref 'main', not a pinned commit hash
  • Warning # 186 actions/unpinned-tag at .github/actions/workflow-setup/action.yaml:68:13 — Unpinned 3rd party Action 'action.yaml' step Uses Step: prepare_check uses 'Framework-R-D/phlex/.github/actions/prepare-check-outputs' with ref 'main', not a pinned commit hash
  • Warning # 187 actions/unpinned-tag at .github/actions/workflow-setup/action.yaml:79:13 — Unpinned 3rd party Action 'action.yaml' step Uses Step: prepare_fix uses 'Framework-R-D/phlex/.github/actions/prepare-fix-outputs' with ref 'main', not a pinned commit hash
  • Warning # 188 actions/unpinned-tag at .github/actions/workflow-setup/action.yaml:128:13 — Unpinned 3rd party Action 'action.yaml' step Uses Step: detect uses 'Framework-R-D/phlex/.github/actions/run-change-detection' with ref 'main', not a pinned commit hash

Review the full CodeQL report for details.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f3077e35b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread phlex/model/layer_path.cpp Outdated

bool layer_path::is_strict_prefix_of(layer_path const& other) const noexcept
{
return std::ranges::starts_with(other.layer_path_, layer_path_);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve strictness when comparing layer paths

When a driver supplies the same layer path more than once, std::ranges::starts_with returns true for the equal paths, even though is_strict_prefix_of is supposed to be strict. index_router::establish_layers uses this result to mark the earlier path as non-lowest, so a duplicated lowest layer can get a flush gate and then wait for child rollups that will never be produced, preventing the leaf index from flushing correctly. Add a size check, as the removed helper had, before calling starts_with.

Useful? React with 👍 / 👎.

Comment thread phlex/model/layer_path.cpp Outdated

bool layer_path::ends_with(layer_path const& other) const noexcept
{
return std::ranges::ends_with(layer_path_, other.layer_path_);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject empty suffixes before matching every layer

For an empty path (for example framework_graph::seen_cell_count("", true) or count_for("/")), std::ranges::ends_with returns true for every stored layer, so this now reports the only layer's count or throws an ambiguity once multiple layers have been seen. The previous string-based check treated these as no match, which is important for callers using missing_ok to probe optional layer names. Guard other.empty() here or in count_for so an empty specification cannot match all layers.

Useful? React with 👍 / 👎.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Clang-Tidy Check Results

3 new issue(s) introduced by this patch (5724 total).

New issues on modified lines:

  • /__w/phlex/phlex/phlex-src/phlex/model/layer_path.cpp:33: error: no member named 'starts_with' in namespace 'std::ranges'
  • /__w/phlex/phlex/phlex-src/phlex/model/layer_path.cpp:38: error: no member named 'ends_with' in namespace 'std::ranges'; did you mean simply 'ends_with'?
  • /__w/phlex/phlex/phlex-src/phlex/model/layer_path.cpp:38: error: too many arguments to function call, expected single argument 'other', have 2 arguments

All issues by check:

  • readability-identifier-naming: 1792
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1149
  • performance-unnecessary-value-param: 475
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-braces-around-statements: 89
  • readability-convert-member-functions-to-static: 80
  • modernize-use-designated-initializers: 73
  • readability-use-concise-preprocessor-directives: 60
  • readability-const-return-type: 47
  • modernize-use-auto: 27
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 19
  • readability-qualified-auto: 19
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-concat-nested-namespaces: 10
  • readability-function-size: 10
  • modernize-return-braced-init-list: 10
  • readability-isolate-declaration: 8
  • cppcoreguidelines-special-member-functions: 7
  • readability-container-contains: 7
  • modernize-use-starts-ends-with: 6
  • readability-inconsistent-declaration-parameter-name: 5
  • modernize-use-ranges: 5
  • readability-redundant-access-specifiers: 5
  • readability-container-size-empty: 5
  • readability-redundant-casting: 3
  • bugprone-branch-clone: 3
  • clang-diagnostic-error: 3
  • modernize-use-std-numbers: 3
  • clang-analyzer-security.ArrayBound: 2
  • readability-else-after-return: 1
  • performance-move-const-arg: 1
  • readability-redundant-string-init: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • modernize-make-shared: 1
  • modernize-redundant-void-arg: 1

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

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.51948% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
phlex/model/layer_path.cpp 72.00% 3 Missing and 4 partials ⚠️
phlex/core/index_router.cpp 77.77% 4 Missing ⚠️
phlex/model/layer_path.hpp 57.14% 3 Missing ⚠️
phlex/model/fixed_hierarchy.cpp 0.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #640      +/-   ##
==========================================
+ Coverage   83.27%   83.29%   +0.01%     
==========================================
  Files         162      165       +3     
  Lines        5912     5949      +37     
  Branches      670      667       -3     
==========================================
+ Hits         4923     4955      +32     
- Misses        796      802       +6     
+ Partials      193      192       -1     
Flag Coverage Δ
scripts 76.36% <ø> (ø)
unittests 86.84% <80.51%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
phlex/core/framework_graph.cpp 99.07% <100.00%> (ø)
phlex/core/index_router.hpp 100.00% <ø> (ø)
phlex/model/data_cell_index.cpp 90.32% <100.00%> (ø)
phlex/model/data_cell_index.hpp 0.00% <ø> (ø)
phlex/model/data_layer_hierarchy.cpp 100.00% <100.00%> (ø)
phlex/model/data_layer_hierarchy.hpp 100.00% <ø> (ø)
phlex/model/fixed_hierarchy.hpp 100.00% <ø> (ø)
phlex/model/handle.hpp 100.00% <ø> (ø)
phlex/model/identifier.hpp 100.00% <100.00%> (ø)
phlex/utilities/bulleted_list.hpp 100.00% <100.00%> (ø)
... and 5 more

... and 2 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 4ed92fc...70b3135. 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 5721 issue(s); none are newly introduced by this patch.

All issues by check:

  • readability-identifier-naming: 1792
  • readability-redundant-typename: 1223
  • readability-redundant-member-init: 1149
  • performance-unnecessary-value-param: 475
  • readability-avoid-const-params-in-decls: 257
  • modernize-pass-by-value: 200
  • readability-braces-around-statements: 89
  • readability-convert-member-functions-to-static: 80
  • modernize-use-designated-initializers: 73
  • readability-use-concise-preprocessor-directives: 60
  • readability-const-return-type: 47
  • modernize-use-auto: 27
  • modernize-avoid-c-style-cast: 22
  • readability-inconsistent-ifelse-braces: 21
  • readability-redundant-control-flow: 19
  • readability-qualified-auto: 19
  • readability-math-missing-parentheses: 17
  • modernize-avoid-c-arrays: 15
  • modernize-use-equals-default: 14
  • modernize-use-using: 13
  • readability-static-definition-in-anonymous-namespace: 12
  • modernize-concat-nested-namespaces: 10
  • modernize-return-braced-init-list: 10
  • readability-function-size: 10
  • readability-isolate-declaration: 8
  • cppcoreguidelines-special-member-functions: 7
  • readability-container-contains: 7
  • modernize-use-starts-ends-with: 6
  • modernize-use-ranges: 5
  • readability-redundant-access-specifiers: 5
  • readability-inconsistent-declaration-parameter-name: 5
  • readability-container-size-empty: 5
  • readability-redundant-casting: 3
  • bugprone-branch-clone: 3
  • modernize-use-std-numbers: 3
  • clang-analyzer-security.ArrayBound: 2
  • readability-redundant-string-init: 1
  • performance-move-const-arg: 1
  • readability-simplify-boolean-expr: 1
  • modernize-use-integer-sign-comparison: 1
  • readability-use-anyofallof: 1
  • readability-else-after-return: 1
  • modernize-redundant-void-arg: 1
  • modernize-make-shared: 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