You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(core): integrate translator nodes into the graph - #1003
PR 5 of the five-PR concept-registry stack; review against stack/concept-registry/04-conversion-records.
Add explicit translate registration for one-input/one-output algorithms using
the existing runtime-base and typed-node architecture.
framework_graph / graph_proxy.translate
-> registration builder -> typed translator_node
-> runtime declared_translator (consumer + independent producer)
-> retrieve selected input -> invoke callable -> emit produced result
result metadata
creator = translator algorithm suffix = registered output suffix
index = input data-cell index stage = translator execution stage
Constrain translator callables to exactly one input parameter and one output
object; expose registration through the framework graph and typed graph proxy.
Add translator storage/registration, consumer and producer collection,
predicate-edge wiring, execution counting, and build entries.
Emit a new product store containing the produced result, reusing the input
index and message ID, with translator output specifications and execution stage.
This does not connect execution to concept conversion records or enforce concept
membership. It does not add discovery, registration-only conversion, module-level translate exposure, input creator/suffix/stage inheritance, or borrowed-source
lifetime retention. Existing upstream producer/selector behavior is preserved;
Python, FORM, and naming-consumer implementations are unchanged.
Evidence
Before: The parent has concept conversion records but no explicitly
registered executable translator node in the computational graph. After:function_registration passes 26 assertions in 2 cases, including
translation to 1.5, downstream consumption, and all metadata/count checks.
Full configured build passed, including Python and FORM targets.
Full boundary suite: 119/119 CTests passed. Whole-stack reconciliation subsequently
reran the final-tip build and all 119 CTests successfully.
All 13 changed files passed hooks and whitespace checks. Runtime and typed
translator implementations match the preserved original source exactly.
The before/after is the feature delta, not a failing-parent test claim. Evidence
is local macOS/AppleClang with Python and FORM ROOT_TTREE; no Linux, sanitizer,
cppyy, coverage-instrumentation, or RNTuple claim. Predicate wiring is inspected,
but no dedicated translator predicate-filter or resource-arbitration regression
is claimed.
Merge Danger
Door: Two-way
No persisted-format migration. Reversion requires removing translator registrations
and dependent workflows; this is the broadest runtime change in the stack.
Blast Radius: Graph
Translators affect product routing, catalog participation, predicate edges, and
execution accounting. Outputs have the translator's identity and execution stage,
not the input's identity/stage. A conversion returning a borrowed view is not made
safe by this node: its new store does not retain the input store for that purpose.
Code: Added translator registration through framework_graph, graph_proxy, and glue. Translator nodes consume one input, produce one output, and connect to product routing and predicate-filter edges.
Runtime: Added translator catalog entries for producer and consumer discovery, plus execution counts and per-layer product counts.
Test coverage: Added an end-to-end provider → translator → observer regression. It checks the translated value, product metadata, shared data-cell index, and execution counts.
Validation: The author reports passing local build, test, and hook checks. Linux, sanitizer, cppyy, coverage-instrumentation, and RNTuple were not tested. No dedicated translator predicate-filter or resource-arbitration regression is reported.
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: 7428fc6a-cfec-4e62-9b1f-451e0ef0d8d3
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 change adds translator registration to the graph API. It defines one-input, one-output translator callables, executes them as flow-graph nodes, and includes them in graph catalogs and predicate-filter connections.
Changes: Translator flow
Layer / File(s)
Summary
Translator callable and consumer contract phlex/core/concepts.hpp, phlex/core/declared_translator.hpp, phlex/core/declared_translator.cpp, phlex/core/CMakeLists.txt
New concepts define the translator callable shape. The declared translator class combines consumer and producer behavior and requires a product count.
The translator node invokes the callable, wraps its result in a product store, forwards the input message ID, and tracks calls and per-layer product counts.
The graph APIs register translators. Node catalogs include translator consumers and producers, execution counts include translator calls, and predicate filters connect to translators. The test checks translated output and execution counts.
sequenceDiagram
participant framework_graph
participant glue
participant translator_node
participant translator_callable
participant downstream_observer
framework_graph->>glue: register translator
glue->>translator_node: construct and register node
translator_node->>translator_callable: invoke with input
translator_callable-->>translator_node: return output
translator_node->>downstream_observer: forward output with input message ID
Loading
Suggested reviewers:knoepfel, sabasehrish
Merge Risk: Low · previous review d9e39
The change is mergeable with a known limitation: translators should return owned results, because a result that borrows from its input can become invalid before an observer uses it.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "feat(core): integrate translator nodes into the graph" matches the main change. The PR adds translator registration through framework_graph and graph_proxy, a new translator_node flow-graph…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(core): integrate translator nodes into the graph" matches the main change. The PR adds translator registration through framework_graph and graph_proxy, a new translator_node flow-graph node, a declared_translator class, and node_catalog wiring. The title is short, specific, and follows a conventional-commit style. It does not mention the end-to-end test, but that is expected.
Full details: Docstring Coverage
Explanation
Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 12 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
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
Tip
🎯 Customize your risk assessments
Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.
✅ Automatic approvals, with your rules
Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 5ae4bbab-9823-4355-8148-7573696c09d4
Commits
Reviewing files that changed from the base of the PR and between 71e72a8 and d9e39e0.
Files selected for processing: 13
phlex/core/CMakeLists.txt
phlex/core/concepts.hpp
phlex/core/declared_translator.cpp
phlex/core/declared_translator.hpp
phlex/core/framework_graph.cpp
phlex/core/framework_graph.hpp
phlex/core/glue.hpp
phlex/core/graph_proxy.hpp
phlex/core/node_catalog.cpp
phlex/core/node_catalog.hpp
phlex/core/registration_api.hpp
phlex/core/translator_node.hpp
test/function_registration_test.cpp
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Register one-input, one-output translators as consumers and independent
producers on the runtime/typed-node architecture.
Preserve translator creator, registered suffix, input data-cell index,
and execution stage, with end-to-end observer regression coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR 5 of the five-PR concept-registry stack; review against
stack/concept-registry/04-conversion-records.Add explicit
translateregistration for one-input/one-output algorithms usingthe existing runtime-base and typed-node architecture.
object; expose registration through the framework graph and typed graph proxy.
predicate-edge wiring, execution counting, and build entries.
index and message ID, with translator output specifications and execution stage.
creator, suffix, layer, distinct input/output stages, index-pointer identity,
and execution counts.
This does not connect execution to concept conversion records or enforce concept
membership. It does not add discovery, registration-only conversion, module-level
translateexposure, input creator/suffix/stage inheritance, or borrowed-sourcelifetime retention. Existing upstream producer/selector behavior is preserved;
Python, FORM, and naming-consumer implementations are unchanged.
Evidence
registered executable translator node in the computational graph.
After:
function_registrationpasses 26 assertions in 2 cases, includingtranslation to
1.5, downstream consumption, and all metadata/count checks.Configured
py:phlex: 11 pytest cases passed, none skipped.reran the final-tip build and all 119 CTests successfully.
translator implementations match the preserved original source exactly.
The before/after is the feature delta, not a failing-parent test claim. Evidence
is local macOS/AppleClang with Python and FORM ROOT_TTREE; no Linux, sanitizer,
cppyy, coverage-instrumentation, or RNTuple claim. Predicate wiring is inspected,
but no dedicated translator predicate-filter or resource-arbitration regression
is claimed.
Merge Danger
Door: Two-way
No persisted-format migration. Reversion requires removing translator registrations
and dependent workflows; this is the broadest runtime change in the stack.
Blast Radius: Graph
Translators affect product routing, catalog participation, predicate edges, and
execution accounting. Outputs have the translator's identity and execution stage,
not the input's identity/stage. A conversion returning a borrowed view is not made
safe by this node: its new store does not retain the input store for that purpose.
Stack created with GitHub Stacks CLI • Give Feedback 💬
framework_graph,graph_proxy, andglue. Translator nodes consume one input, produce one output, and connect to product routing and predicate-filter edges.