Skip to content

Add Rust standalone runtime baseline#145

Open
nicosuave wants to merge 11 commits into
mainfrom
rust-standalone-runtime
Open

Add Rust standalone runtime baseline#145
nicosuave wants to merge 11 commits into
mainfrom
rust-standalone-runtime

Conversation

@nicosuave
Copy link
Copy Markdown
Member

@nicosuave nicosuave commented May 15, 2026

Adds the Rust standalone runtime baseline across CLI, HTTP, MCP, LSP, workbench, Python bridge, DuckDB extension wiring, WASM, C ABI, and CI gates.

This PR now also closes the follow-up items that were safe to address before merge:

  • Rust SQL generation models conversion, retention, and cohort metrics, including Python bridge serialization and owner inference for graph-level complex metrics.
  • Time-comparison SQL partitions lag windows by non-time dimensions.
  • Semantic SQL rewriting handles projected and order-only semantic ORDER BY references.
  • HTTP execution routes support JSON by default and buffered Arrow IPC through ?format=arrow or Accept: application/vnd.apache.arrow.stream.
  • MCP query/chart paths accept parameters and segment/field coverage is asserted in protocol tests.
  • DuckDB extension persistence replaces metric/dimension/segment definitions without stale shadows, and autoload failures now warn visibly.
  • Rust ADBC CI is fail-closed for DuckDB, SQLite, Postgres, and ClickHouse; BigQuery and Snowflake probes are wired behind repo credentials.
  • Strict Rust parity matrix loading/fail-closed behavior is tested.
  • Follow-up docs and parity matrices describe what is complete vs still productization work.

Important scope notes:

  • This is still not full Python parity.
  • The Python Rust bridge is opt-in, not the default execution path.
  • DuckDB remains the protocol-level ADBC proof; SQLite, Postgres, and ClickHouse are CI driver-manager probes; BigQuery and Snowflake are secret-gated until real credentials are configured.
  • HTTP/MCP/LSP/workbench remain experimental, but executable and covered by protocol or UI smoke tests.
  • HTTP Arrow output is buffered IPC, not chunked transport streaming.
  • Release automation remains out of scope.

Local gates are green: Rust cargo format/check/test/clippy coverage for the changed standalone surfaces, SQLite ADBC probe, Python ruff check/format, and the full Python pytest suite.

@nicosuave nicosuave marked this pull request as ready for review May 22, 2026 18:46
Copy link
Copy Markdown

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

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: eed1b7140d

ℹ️ 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 .github/workflows/ci.yml
Comment on lines +179 to +180
cargo test --features workbench-tui --bin sidemantic workbench
cargo test --features workbench-adbc --bin sidemantic workbench
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 Run workbench smoke tests as test targets

These commands currently don't execute the intended workbench smoke coverage in sidemantic-rs/tests/cli_smoke.rs. I checked cargo test --help, which states --bin [<NAME>] will "Test only the specified binary"; combined with the trailing workbench filter, this only searches unit tests in the sidemantic binary target and skips integration test targets. As a result, regressions in workbench CLI behavior under workbench-tui / workbench-adbc features can pass CI unnoticed unless the tests are invoked with --test ... (or --tests) for those feature combinations.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

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

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: 86d68b9017

ℹ️ 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 on lines +701 to +704
if target_dialect != self.dialect:
import sqlglot

sql = sqlglot.transpile(sql, read=self.dialect, write=target_dialect)[0]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Transpile Rust SQL from the actual source dialect

_compile_with_rust assumes no transpilation is needed when target_dialect == self.dialect, but the Rust path currently emits SQL in its own default style (e.g., runtime compile goes through SqlGenerator::new(...) without a dialect override). For non-DuckDB layers (Postgres/BigQuery/etc.), this branch returns DuckDB-flavored SQL unchanged, and even when transpilation runs it uses read=self.dialect instead of the Rust output dialect. In strict mode or with SIDEMANTIC_RS_SQL_GENERATOR_VERIFY=0, this can send invalid SQL to the adapter and fail user queries.

Useful? React with 👍 / 👎.

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