Skip to content

Store product_selector layers as layer paths - #1084

Draft
beojan wants to merge 4 commits into
mainfrom
layer-paths-beojan/1-product-selector
Draft

beojan wants to merge 4 commits into
mainfrom
layer-paths-beojan/1-product-selector

Conversation

@beojan

@beojan beojan commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

product_selector now stores its layer as a layer_path instead of a single layer name. A selector's layer matches any data cell whose path ends with it, so event, run/event and /job/run/event are all valid. Provider and index routing still compare only the last layer name, so selectors that name one layer behave as before.

Part of #984.

This description was drafted by Claude Code. It has been fully reviewed and approved by Beojan Stanislaus.


@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.20690% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
phlex/core/product_selector.hpp 62.50% 3 Missing ⚠️
phlex/core/product_selector.cpp 50.00% 0 Missing and 2 partials ⚠️
phlex/model/data_cell_index.cpp 75.00% 1 Missing and 1 partial ⚠️
phlex/core/index_router.cpp 66.66% 0 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #1084      +/-   ##
==========================================
- Coverage   90.95%   90.89%   -0.06%     
==========================================
  Files         183      183              
  Lines        6068     6087      +19     
  Branches      967      970       +3     
==========================================
+ Hits         5519     5533      +14     
- Misses        350      354       +4     
- Partials      199      200       +1     
Flag Coverage Δ
amd64 90.89% <86.20%> (-0.06%) ⬇️
arm64 90.89% <86.20%> (-0.06%) ⬇️

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

Files with missing lines Coverage Δ
form/form_source.cpp 55.78% <100.00%> (ø)
phlex/configuration.cpp 100.00% <100.00%> (ø)
phlex/core/consumer.cpp 100.00% <100.00%> (ø)
phlex/core/framework_graph.cpp 100.00% <100.00%> (ø)
phlex/model/data_cell_index.hpp 0.00% <ø> (ø)
phlex/model/layer_path.cpp 97.61% <100.00%> (ø)
phlex/model/layer_path.hpp 88.88% <100.00%> (+1.38%) ⬆️
phlex/model/product_store.hpp 94.44% <100.00%> (+0.32%) ⬆️
plugins/python/src/modulewrap.cpp 80.46% <100.00%> (+0.30%) ⬆️
phlex/core/index_router.cpp 95.11% <66.66%> (+0.01%) ⬆️
... and 3 more

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 8ce5531...df99adb. Read the comment docs.

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

Includes necessary adjustments to existing tests
@beojan
beojan force-pushed the layer-paths-beojan/1-product-selector branch from 89a0d2b to 7e93846 Compare November 19, 2026 19:02
@beojan
beojan added this pull request to stack #1090 November 19, 2026 19:21
clang-tidy flags the helper because nothing outside configuration.cpp
uses it. Move it into an anonymous namespace.

AI-Assisted-By: Claude Code
AI-Model: claude-sonnet-5-5
A Python selector whose layer is not a valid path, such as "/run/event",
made the layer_path constructor throw a C++ exception inside
validate_selector. The exception unwound through the Python C API frames
and could terminate the interpreter.

validate_selector now catches it, sets a ValueError with the original
message, and returns an empty optional like its other error paths.
The py:badlayer test covers the case.

AI-Assisted-By: Claude Code
AI-Model: claude-sonnet-5-5

This branch has not been deployed

No deployments
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.

1 participant