Repository navigation
lance-graph-r2il: FoldDialect executes without the ogar-loco Dialect trait - #1895
Merged
Merged
Conversation
…ct impl is an adapter Executing an R2IL call no longer needs ogar_loco's interpreter trait in scope. The Dialect impl forwards to the inherent call and is behind the default loco-dialect feature, so ogar_loco::Interpreter can still drive the dialect. Callers that imported Dialect only to reach call drop the import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
The truthy test calls the ogar_loco::Dialect method, so it imports the trait and runs only with the loco-dialect feature (default). Tests pass with and without the feature; clippy -D warnings is clean in both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
AdaWorldAPI
marked this pull request as ready for review
October 31, 2026 17:57
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…ct::call math-polyfill-probe (lib, native, examples/layers, tests/polyfill), lance-graph-relalg (lower), lance-graph-onnx (examples/alias_cost, tests/conformance) and r2il-mask-abi-probe (tests/row_bridge) called FoldDialect::call through the trait; the inherent method now resolves first, so the import fails -D warnings. clippy --all-targets -D warnings is clean on all seven crates that touch FoldDialect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMNZqKXSaeb9g2ypywF
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
FoldDialectexecuted R2IL only through itsogar_loco::Dialectimpl, so running native R2IL depended on the ogar-loco program model. The operator rejected that model as the canonical method body.The coupling turned out to be narrow.
FoldDialectuses two things fromogar_loco: theDialecttrait, through its one impl, andFnIndex, the byte opcode newtype thatogar-r2ilis built on. It does not useProgram,InterpreterorVocabulary.Changes:
FoldDialect::call. It holds the dispatch table:call(&mut self, f: FnIndex, v: [u8; 3], stack: &mut Vec<Val>) -> Result<(), FoldError>.loco-dialectfeature, which is on by default. It forwardscallto the inherent method and keepstruthyandrepeat_count.lance-graph-nal,egglog-r2il-probeand the crate's own tests drop theDialectimport. The one test of the trait'struthyis gated on the feature.Compatibility: with default features, behaviour and API are unchanged. With
--no-default-featuresthe crate still builds and runs, still depends onogar-locoforFnIndex, and drops only the trait impl.Verified:
cargo test -p lance-graph-r2il: 9 + 22 pass by default, 8 + 22 without the feature (the gated test is the difference).lance-graph-nal: 8 + 11 pass.egglog-r2il-probe:cargo check --all-targetsis clean.clippy -D warningsis clean in both feature sets, andfmtis clean.Not done: removing the
FnIndexdependency onogar-loco. That type is the opcodeogar-r2ilitself is defined over, so it moves only together withogar-r2il.Generated by Claude Code