Skip to content

lance-graph-r2il: FoldDialect executes without the ogar-loco Dialect trait - #1895

Merged
AdaWorldAPI merged 4 commits into
mainfrom
ccr-85acaff0-oszq40-r2il-call
Oct 31, 2026
Merged

AdaWorldAPI merged 4 commits into
mainfrom
ccr-85acaff0-oszq40-r2il-call

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

FoldDialect executed R2IL only through its ogar_loco::Dialect impl, 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. FoldDialect uses two things from ogar_loco: the Dialect trait, through its one impl, and FnIndex, the byte opcode newtype that ogar-r2il is built on. It does not use Program, Interpreter or Vocabulary.

Changes:

  • New inherent FoldDialect::call. It holds the dispatch table: call(&mut self, f: FnIndex, v: [u8; 3], stack: &mut Vec<Val>) -> Result<(), FoldError>.
  • The trait impl becomes an adapter behind a loco-dialect feature, which is on by default. It forwards call to the inherent method and keeps truthy and repeat_count.
  • Callers no longer need the trait. lance-graph-nal, egglog-r2il-probe and the crate's own tests drop the Dialect import. The one test of the trait's truthy is gated on the feature.

Compatibility: with default features, behaviour and API are unchanged. With --no-default-features the crate still builds and runs, still depends on ogar-loco for FnIndex, 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-targets is clean.
  • clippy -D warnings is clean in both feature sets, and fmt is clean.

Not done: removing the FnIndex dependency on ogar-loco. That type is the opcode ogar-r2il itself is defined over, so it moves only together with ogar-r2il.


Generated by Claude Code

…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
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 94be270d-5808-4142-9529-7ed32fd4d9e3
  • 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

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 31, 2026 17:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T17:57:58.744926Z fbe2fae Draft marked ready
ℹ️ 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" or "@codex security review".

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
@AdaWorldAPI
AdaWorldAPI merged commit 9e0986c into main Oct 31, 2026
15 checks passed
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