Skip to content

feat: add native Trino driver#795

Merged
anandgupta42 merged 11 commits into
AltimateAI:mainfrom
cerebrixos:codex/add-trino-driver
Jun 1, 2026
Merged

feat: add native Trino driver#795
anandgupta42 merged 11 commits into
AltimateAI:mainfrom
cerebrixos:codex/add-trino-driver

Conversation

@cerebrixos
Copy link
Copy Markdown
Contributor

@cerebrixos cerebrixos commented May 7, 2026

Summary

  • Add a native Trino driver using trino-client.
  • Wire Trino into connection normalization, registry loading, dbt profile parsing, Docker discovery, environment discovery, SQL explain, and warehouse add guidance.
  • Document Trino configuration, authentication, installation, and support matrix entries.

Details

The previous dbt profile mapping treated trino as PostgreSQL-compatible. This adds a first-class Trino connector instead, with support for:

  • HTTP and HTTPS server URLs
  • catalog and schema defaults
  • Basic authentication
  • bearer token authentication
  • extra headers, session properties, and extra credentials
  • schema/table/column introspection through catalog-scoped information_schema
  • SELECT limit injection with truncation detection

Tests

  • cd packages/drivers && bun test test/trino-unit.test.ts
  • cd packages/opencode && bun test test/altimate/driver-normalize.test.ts test/altimate/connections.test.ts test/tool/project-scan.test.ts test/altimate/tools/sql-explain.test.ts
  • cd packages/opencode && bun run typecheck

Note: bunx tsc -p packages/drivers/tsconfig.json --noEmit still fails on the existing bun:sqlite type resolution issue in packages/drivers/src/sqlite.ts, unrelated to this Trino change.


Summary by cubic

Adds a native Trino driver and integrates it across discovery, dbt, SQL tools, and docs, expanding support to 13 warehouses. Also standardizes tool error handling and prevents sensitive details from appearing in outputs.

  • New Features

    • Native Trino connector using trino-client over HTTP/HTTPS with Basic or Bearer auth (mutually exclusive), extra headers/session/extra credentials, catalog/schema defaults; clamps SELECT limits, detects truncation, recognizes FETCH NEXT, and supports EXPLAIN/EXPLAIN ANALYZE (query history not surfaced).
    • Integration: config aliases (server → connection_string, database/dbname → catalog, token → access_token); dbt trino now maps to the native driver; Docker discovery matches Trino images; env var detection for TRINO_* and DATABASE_URL (trino, trino+http(s), presto); docs updated with a migration note (dbt mapping change and databasecatalog, tokenaccess_token) and troubleshooting (catalog required for introspection, auth conflict, protocol/port defaults).
  • Bug Fixes

    • Normalize tool responses for sql_analyze, schema_inspect, lineage_check, and column lineage with shared helpers: unwrap dispatcher envelopes, treat falsy/object errors via message/detail fields, avoid exposing object details, standardize titles/metadata; treat success=false as failure with “Analysis failed.”; lineage tools also fail on inner data.success=false.
    • Trino driver: clearer error when trino-client is present but incompatible; clamps non-numeric/negative limits and detects FETCH NEXT; falls back to protocol-default port when port is invalid; throws if both password and access token are set; warehouse.list shows Database from catalog for Trino.
    • Docs: correct Docker auto‑discovery lists to match actual images (includes Trino; MongoDB not auto‑discovered) and fix minor markdown.

Written for commit 68702ed. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Trino added as a supported warehouse with connectivity, query execution, schema/table inspection, and EXPLAIN support.
  • Documentation

    • Guides updated for Trino configuration, auth examples, installation notes, discovery, and support matrix; supported warehouse count updated.
  • Tests

    • New and updated tests covering Trino driver behavior, config normalization, discovery, and EXPLAIN semantics.
  • UX

    • “Warehouse add” surfaces non-blocking post-connect suggestions after successful adds.

Review Change Stack

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds native Trino support: new TypeScript Trino driver (trino-client), config aliasing and normalization, dbt/Docker/env/URL discovery, driver registry/export wiring, tests, docs, publishing updates, and defensive tooling improvements.

Changes

Trino Warehouse Driver Integration

Layer / File(s) Summary
Core Driver Implementation
packages/drivers/src/trino.ts
Implements Trino connector: connect() sets options (server/catalog/schema/headers/auth/SSL/session), execute() injects LIMIT when appropriate and aggregates async iterator results, listSchemas()/listTables()/describeTable() use information_schema, close() clears client.
Driver Registration & Exports
packages/drivers/src/index.ts, packages/opencode/src/altimate/native/connections/registry.ts
Adds connectTrino re-export; registers trino in DRIVER_MAP; includes trino in password validation set; adds dynamic import for @altimateai/drivers/trino.
Config Alias Normalization
packages/drivers/src/normalize.ts
Defines TRINO_ALIASES mapping (dbname/database→catalog, token→access_token, server→connection_string) and registers in DRIVER_ALIASES for config normalization.
dbt Profile Discovery
packages/opencode/src/altimate/native/connections/dbt-profiles.ts
Maps dbt trino adapter to native trino; adds resolveEnvVars()/resolveEnvVarsDeep to expand {{ env_var(...) }} expressions; implements ordered profiles.yml discovery and YAML parsing fallback.
Docker & Environment Discovery
packages/opencode/src/altimate/native/connections/docker-discovery.ts, packages/opencode/src/altimate/tools/project-scan.ts
Detects Trino via Docker image patterns, TRINO_* env vars, and DATABASE_URL schemes (trino, trino+http, trino+https, presto); sets default port 8080 and user trino.
EXPLAIN & Query History
packages/opencode/src/altimate/native/connections/register.ts, packages/opencode/src/altimate/native/finops/query-history.ts
Adds Trino to buildExplainPlan (EXPLAIN vs EXPLAIN ANALYZE and actuallyAnalyzed flag); buildHistoryQuery returns null for Trino (no durable history).
Warehouse Add Suggestions
packages/opencode/src/altimate/tools/warehouse-add.ts
After successful warehouse.add, asynchronously gathers post-connect suggestions (schema cache, warehouse count, dbt presence) with a 1.5s race; appends suggestions when available and tracks telemetry; updates missing-type error text to include mongodb.
Package Dependencies & Publish
packages/drivers/package.json, packages/opencode/script/publish.ts
Adds trino-client@^0.2.8 as optional dependency and registers trino-client: >=0.2 in publish peer-dependencies.
Tests
packages/drivers/test/trino-unit.test.ts, packages/opencode/test/...
Unit tests for driver config/headers/BasicAuth, LIMIT injection/truncation, table/column introspection; tests for dbt adapter mapping, alias normalization, EXPLAIN dialect behavior, environment variable and URL detection; tool response normalization tests.
Documentation
README.md, docs/docs/configure/warehouses.md, docs/docs/drivers.md, docs/docs/data-engineering/tools/warehouse-tools.md, docs/docs/getting-started/index.md
Adds Trino to supported warehouses (13 total); documents connection config fields, auth methods (none/basic/bearer/connection string), auto-discovery sources, default port, and marketing copy.
Lineage Formatting
packages/opencode/src/altimate/tools/altimate-core-column-lineage.ts
Refactors lineage formatting using formatLineageValue and formatLineageEndpoint helpers for robust rendering.
Tooling: Defensive Response Handling
packages/opencode/src/altimate/tools/{lineage-check,schema-inspect,sql-analyze}.ts
Tools now validate dispatcher responses as records and return standardized error payloads using new helpers (isRecord, normalizeError, centralized error builders).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~55 minutes

Possibly related PRs

Suggested labels

contributor, needs-review:blocked

Poem

🐰 A rabbit hops through Trino's gate,

catalogs gleam and schemas wait,
it trims the SQL with a LIMIT song,
streams the rows and hums along,
tiny paws deliver data straight.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning PR description includes required sections: Summary (main changes), Details (technical specifics), Tests (test commands). However, it lacks the required PINEAPPLE marker at the top for AI-generated content and missing CHANGELOG update checklist. Add 'PINEAPPLE' marker at the very top of the PR description before any other content. Add checklist items for Tests added/updated, Documentation updated, and CHANGELOG updated status.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add native Trino driver' accurately summarizes the main change: adding a new Trino database driver as a first-class feature.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 23 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/docs/data-engineering/tools/warehouse-tools.md">

<violation number="1" location="docs/docs/data-engineering/tools/warehouse-tools.md:57">
P3: Docker discovery is documented inconsistently across sections; the summary table drops ClickHouse/MongoDB while the command docs still list them.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@@ -54,7 +54,7 @@ env_bigquery | bigquery | GOOGLE_APPLICATION_CREDENTIALS
| **dbt project** | Walks up directories for `dbt_project.yml`, reads name/profile |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: Docker discovery is documented inconsistently across sections; the summary table drops ClickHouse/MongoDB while the command docs still list them.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/docs/data-engineering/tools/warehouse-tools.md, line 57:

<comment>Docker discovery is documented inconsistently across sections; the summary table drops ClickHouse/MongoDB while the command docs still list them.</comment>

<file context>
@@ -54,7 +54,7 @@ env_bigquery  | bigquery | GOOGLE_APPLICATION_CREDENTIALS
 | **dbt manifest** | Parses `target/manifest.json` for model/source/test counts |
 | **dbt profiles** | Searches for `profiles.yml`: `DBT_PROFILES_DIR` env var → project root → `<home>/.dbt/profiles.yml` |
-| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MSSQL containers |
+| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MSSQL/Trino containers |
 | **Existing connections** | Bridge call to list already-configured warehouses |
 | **Environment variables** | Scans `process.env` for warehouse signals (see table below) |
</file context>
Suggested change
| **dbt project** | Walks up directories for `dbt_project.yml`, reads name/profile |
| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MSSQL/Trino/ClickHouse/MongoDB containers |

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/opencode/src/altimate/native/connections/dbt-profiles.ts (1)

56-64: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

env_var regex only matches single-quoted args; dbt also accepts double quotes.

Both {{ env_var('DBT_USER') }} and {{ env_var("DBT_USER") }} are valid in dbt's Jinja, and double-quoted forms are very common in real profiles. The current regex only matches single quotes, so any profile using double quotes will fall through unresolved (and the literal {{ env_var("…") }} ends up as the field value).

🛠️ Suggested fix — accept either quote style for both name and default
 function resolveEnvVars(value: unknown): unknown {
   if (typeof value !== "string") return value
   return value.replace(
-    /\{\{\s*env_var\s*\(\s*'([^']+)'\s*(?:,\s*'([^']*)'\s*)?\)\s*\}\}/g,
-    (_match, envName: string, defaultValue?: string) => {
-      return process.env[envName] ?? defaultValue ?? ""
+    /\{\{\s*env_var\s*\(\s*(['"])([^'"]+)\1\s*(?:,\s*(['"])([^'"]*)\3\s*)?\)\s*\}\}/g,
+    (_match, _q1, envName: string, _q2, defaultValue?: string) => {
+      return process.env[envName] ?? defaultValue ?? ""
     },
   )
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/opencode/src/altimate/native/connections/dbt-profiles.ts` around
lines 56 - 64, The resolveEnvVars function's regex only matches single-quoted
args so double-quoted env_var forms are left unresolved; update the regex in
resolveEnvVars to accept either single or double quotes (use a capture for the
opening quote like (['"]) and a backreference \1 for the closing quote) for both
the env name and the optional default, then use the captured groups for envName
and defaultValue in the replacement so both {{ env_var('NAME') }}, {{
env_var("NAME") }}, and defaults with either quote style are handled.
🧹 Nitpick comments (2)
packages/opencode/test/tool/project-scan.test.ts (1)

567-602: 💤 Low value

LGTM — Trino env-var and DATABASE_URL detection tests look correct.

The TRINO_HOST test covers field mapping including catalog, schema, and password masking. The DATABASE_URL scheme loop correctly asserts all four Trino/Presto URL schemes map to type === "trino".

One minor note: the for...of scheme loop at line 591 combines four scheme assertions in a single test(). If one scheme fails, Bun's error output will report the test name but not automatically identify the failing scheme. Consider splitting into separate test cases or adding scheme to the expect failure message if you ever find the test brittle in CI.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/opencode/test/tool/project-scan.test.ts` around lines 567 - 602, The
test "detects Trino via DATABASE_URL with trino schemes" embeds a for...of loop
over schemes which hides which scheme fails; update the test to run each scheme
as its own subtest by using test.each or describe.each so each scheme is
reported individually, e.g., replace the for...of loop with test.each([...]) or
describe.each([...]) and inside call clearWarehouseEnvVars(), set
process.env.DATABASE_URL, await detectEnvVars(), and assert trino fields
(including scheme in the test title) to get per-scheme failure diagnostics.
packages/drivers/src/trino.ts (1)

180-186: 💤 Low value

Static-analysis SQL-injection hint is a false positive — but worth a short comment.

OpenGrep flags the template-literal concatenation in listSchemas/listTables/describeTable. Catalog goes through quoteIdent (doubles ") and schema/table go through escapeStringLiteral (doubles '), which are the correct primitives for Trino — information_schema queries can't accept catalog as a bind parameter, and Trino's standard string-literal escape is ''. Consider adding a short inline comment explaining why bind parameters aren't used here, so future readers (and the linter) don't try to "fix" this:

+    // information_schema queries are catalog-qualified at the FROM clause,
+    // which Trino cannot bind. We escape via quoteIdent / escapeStringLiteral.
     const result = await connector.execute(
       `SELECT table_name, table_type
        FROM ${quoteIdent(catalog)}.information_schema.tables
        WHERE table_schema = '${escapeStringLiteral(schema)}'
        ORDER BY table_name`,
       10000,
     )

Also applies to: 196-202, 219-226

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/drivers/src/trino.ts` around lines 180 - 186, Add a short inline
comment in the SQL-building sites (functions listSchemas, listTables,
describeTable) explaining that the template-literal concatenation is intentional
and safe because identifiers are sanitized with quoteIdent (which doubles ") and
values use escapeStringLiteral (which doubles '), and that Trino does not
support using bind parameters for catalog/schema/table identifiers in
information_schema queries; this will silence static-analysis false positives
and guide future readers not to replace these with parameterized binds.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/docs/configure/warehouses.md`:
- Around line 518-519: The Docker auto-discovery list in the table row that
currently reads "Docker containers | Finds running PostgreSQL, MySQL, SQL
Server, Trino, and ClickHouse containers" is missing MongoDB and MariaDB; update
that table row to include "MongoDB" and "MariaDB" so it matches the documented
discovery behavior elsewhere in the PR (look for the table row text "Docker
containers | Finds running PostgreSQL, MySQL, SQL Server, Trino, and ClickHouse
containers" to locate the exact spot to edit).

In `@docs/docs/data-engineering/tools/warehouse-tools.md`:
- Line 57: The Docker DBs detection-method table row ("| **Docker DBs** | Bridge
call to discover running PostgreSQL/MySQL/MSSQL/Trino containers |") is
inconsistent with the warehouse_discover section; update that table row to list
the same databases (add ClickHouse, MongoDB, and MariaDB alongside
PostgreSQL/MySQL/MSSQL/Trino) so the documentation matches the
warehouse_discover section and ensures parity between the two descriptions.

In `@docs/docs/drivers.md`:
- Around line 126-133: Add a blank line between the "### Trino" heading and the
following Markdown table so the table does not immediately follow the heading
(this will satisfy markdownlint MD058); locate the "### Trino" heading and the
table block listing auth methods and insert one empty line between them.

In `@packages/drivers/src/trino.ts`:
- Around line 82-91: The current try-catch around the dynamic import and the
export validation masks export-shape errors as "not installed"; split the logic
so the import("trino-client") is inside its own try-catch and only that catch
throws "Trino driver not installed...", then perform the validation of
Trino/BasicAuth/Trino.create outside that catch and, if validation fails, throw
a distinct error like "Trino.create export not found in trino-client" (or
include the actual module shape) so missing/renamed exports are reported
accurately; reference the Trino and BasicAuth bindings and the
import("trino-client") call when updating the control flow.

In `@packages/opencode/src/altimate/native/connections/registry.ts`:
- Around line 133-134: When constructing/normalizing connection data for display
in warehouse.list, ensure Trino connections use catalog as a fallback for
database: detect the registry entry for "trino" (the trino key in registry.ts)
and if a connection's config has no config.database but has config.catalog, set
config.database = config.catalog before rendering/storing the connection object;
this ensures warehouse.list shows a meaningful Database value for Trino.

---

Outside diff comments:
In `@packages/opencode/src/altimate/native/connections/dbt-profiles.ts`:
- Around line 56-64: The resolveEnvVars function's regex only matches
single-quoted args so double-quoted env_var forms are left unresolved; update
the regex in resolveEnvVars to accept either single or double quotes (use a
capture for the opening quote like (['"]) and a backreference \1 for the closing
quote) for both the env name and the optional default, then use the captured
groups for envName and defaultValue in the replacement so both {{
env_var('NAME') }}, {{ env_var("NAME") }}, and defaults with either quote style
are handled.

---

Nitpick comments:
In `@packages/drivers/src/trino.ts`:
- Around line 180-186: Add a short inline comment in the SQL-building sites
(functions listSchemas, listTables, describeTable) explaining that the
template-literal concatenation is intentional and safe because identifiers are
sanitized with quoteIdent (which doubles ") and values use escapeStringLiteral
(which doubles '), and that Trino does not support using bind parameters for
catalog/schema/table identifiers in information_schema queries; this will
silence static-analysis false positives and guide future readers not to replace
these with parameterized binds.

In `@packages/opencode/test/tool/project-scan.test.ts`:
- Around line 567-602: The test "detects Trino via DATABASE_URL with trino
schemes" embeds a for...of loop over schemes which hides which scheme fails;
update the test to run each scheme as its own subtest by using test.each or
describe.each so each scheme is reported individually, e.g., replace the
for...of loop with test.each([...]) or describe.each([...]) and inside call
clearWarehouseEnvVars(), set process.env.DATABASE_URL, await detectEnvVars(),
and assert trino fields (including scheme in the test title) to get per-scheme
failure diagnostics.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a24a4e41-d302-4fb1-b333-74272c0e5444

📥 Commits

Reviewing files that changed from the base of the PR and between c859b57 and 590a5d4.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (22)
  • README.md
  • docs/docs/configure/warehouses.md
  • docs/docs/data-engineering/tools/warehouse-tools.md
  • docs/docs/drivers.md
  • docs/docs/getting-started/index.md
  • packages/drivers/package.json
  • packages/drivers/src/index.ts
  • packages/drivers/src/normalize.ts
  • packages/drivers/src/trino.ts
  • packages/drivers/test/trino-unit.test.ts
  • packages/opencode/script/publish.ts
  • packages/opencode/src/altimate/native/connections/dbt-profiles.ts
  • packages/opencode/src/altimate/native/connections/docker-discovery.ts
  • packages/opencode/src/altimate/native/connections/register.ts
  • packages/opencode/src/altimate/native/connections/registry.ts
  • packages/opencode/src/altimate/native/finops/query-history.ts
  • packages/opencode/src/altimate/tools/project-scan.ts
  • packages/opencode/src/altimate/tools/warehouse-add.ts
  • packages/opencode/test/altimate/connections.test.ts
  • packages/opencode/test/altimate/driver-normalize.test.ts
  • packages/opencode/test/altimate/tools/sql-explain.test.ts
  • packages/opencode/test/tool/project-scan.test.ts

Comment thread docs/docs/configure/warehouses.md Outdated
Comment on lines 518 to 519
| Docker containers | Finds running PostgreSQL, MySQL, SQL Server, Trino, and ClickHouse containers |
| Environment variables | Scans for `SNOWFLAKE_ACCOUNT`, `PGHOST`, `DATABRICKS_HOST`, etc. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Auto-discovery Docker list is incomplete for current behavior/docs.

This line omits MongoDB (and MariaDB), which are documented as discoverable elsewhere in this PR.

Suggested patch
-| Docker containers | Finds running PostgreSQL, MySQL, SQL Server, Trino, and ClickHouse containers |
+| Docker containers | Finds running PostgreSQL, MySQL, MariaDB, SQL Server, Trino, ClickHouse, and MongoDB containers |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Docker containers | Finds running PostgreSQL, MySQL, SQL Server, Trino, and ClickHouse containers |
| Environment variables | Scans for `SNOWFLAKE_ACCOUNT`, `PGHOST`, `DATABRICKS_HOST`, etc. |
| Docker containers | Finds running PostgreSQL, MySQL, MariaDB, SQL Server, Trino, ClickHouse, and MongoDB containers |
| Environment variables | Scans for `SNOWFLAKE_ACCOUNT`, `PGHOST`, `DATABRICKS_HOST`, etc. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docs/configure/warehouses.md` around lines 518 - 519, The Docker
auto-discovery list in the table row that currently reads "Docker containers |
Finds running PostgreSQL, MySQL, SQL Server, Trino, and ClickHouse containers"
is missing MongoDB and MariaDB; update that table row to include "MongoDB" and
"MariaDB" so it matches the documented discovery behavior elsewhere in the PR
(look for the table row text "Docker containers | Finds running PostgreSQL,
MySQL, SQL Server, Trino, and ClickHouse containers" to locate the exact spot to
edit).

| **dbt manifest** | Parses `target/manifest.json` for model/source/test counts |
| **dbt profiles** | Searches for `profiles.yml`: `DBT_PROFILES_DIR` env var → project root → `<home>/.dbt/profiles.yml` |
| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MSSQL containers |
| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MSSQL/Trino containers |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Detection-method table is now inconsistent with the warehouse_discover section.

This row omits ClickHouse/MongoDB (and MariaDB) even though the same page documents them as discovered containers.

Suggested wording update
-| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MSSQL/Trino containers |
+| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MariaDB/MSSQL/Trino/ClickHouse/MongoDB containers |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MSSQL/Trino containers |
| **Docker DBs** | Bridge call to discover running PostgreSQL/MySQL/MariaDB/MSSQL/Trino/ClickHouse/MongoDB containers |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/docs/data-engineering/tools/warehouse-tools.md` at line 57, The Docker
DBs detection-method table row ("| **Docker DBs** | Bridge call to discover
running PostgreSQL/MySQL/MSSQL/Trino containers |") is inconsistent with the
warehouse_discover section; update that table row to list the same databases
(add ClickHouse, MongoDB, and MariaDB alongside PostgreSQL/MySQL/MSSQL/Trino) so
the documentation matches the warehouse_discover section and ensures parity
between the two descriptions.

Comment thread docs/docs/drivers.md
Comment thread packages/drivers/src/trino.ts
Comment thread packages/opencode/src/altimate/native/connections/registry.ts
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/opencode/src/altimate/tools/sql-analyze.ts (1)

45-45: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Failure detection should be presence-based, not truthy-based.

At Line 45, !!result.error misclassifies error: "" as success; the same truthy check also affects title/metadata at Line 65 and Line 72.

Suggested fix
-      const isRealFailure = !!result.error
+      const isRealFailure = result.error !== null && result.error !== undefined
+      const normalizedError = isRealFailure ? String(result.error ?? "").trim() || "Analysis failed." : undefined
@@
-      let output = formatAnalysis(result)
+      let output = isRealFailure ? `Analysis failed: ${normalizedError}` : formatAnalysis(result)
@@
-        title: `Analyze: ${result.error ? "ERROR" : `${result.issue_count ?? 0} issue${(result.issue_count ?? 0) !== 1 ? "s" : ""}`} [${result.confidence ?? "unknown"}]`,
+        title: `Analyze: ${isRealFailure ? "ERROR" : `${result.issue_count ?? 0} issue${(result.issue_count ?? 0) !== 1 ? "s" : ""}`} [${result.confidence ?? "unknown"}]`,
@@
-          ...(result.error && { error: result.error }),
+          ...(isRealFailure && { error: normalizedError }),

Also applies to: 53-53, 65-73

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/opencode/src/altimate/tools/sql-analyze.ts` at line 45, The code
currently treats errors with a truthy check (e.g., isRealFailure =
!!result.error) which misclassifies empty-string errors as absent; update all
checks that inspect result.error (including where isRealFailure is set and where
title/metadata are built around result.error at the other occurrences) to use
presence-based checks instead — for example, replace !!result.error with an
explicit presence test such as result.error !== undefined && result.error !==
null && result.error !== '' (or a small helper like hasError(result) that
returns the same boolean) and apply the same presence check wherever
result.error is used to decide titles/metadata (the assignments that reference
result.error at the spots around isRealFailure, and the title/metadata
construction lines).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/opencode/src/altimate/tools/lineage-check.ts`:
- Around line 36-38: The check "if (result.error)" treats an empty string as
no-error; update both occurrences (the one that returns lineageError at the top
and the block around lines 65-69) to explicitly treat present-but-empty errors
as failures by checking for non-empty string (e.g., if (result.error !==
undefined && result.error !== null && result.error !== '') or if (typeof
result.error === 'string' && result.error.length > 0)) and call
lineageError(result.error) when that condition is met; make the same change at
the second occurrence so malformed/failed dispatcher responses with error: ""
are handled as errors.

In `@packages/opencode/src/altimate/tools/schema-inspect.ts`:
- Around line 28-31: The failure gating currently treats a blank-string error as
falsy by checking responseError, so change the condition to explicitly detect
when the dispatcher returned an error (e.g., use result.error !== undefined &&
result.error !== null or result.error != null) instead of relying on the
truthiness of normalizeError's output; update the condition in the block that
returns schemaError (the one using responseError/normalizeError and
result.success) and make the identical fix in the later block around lines 71-75
so both checks use explicit presence of result.error while still passing the
normalized error (normalizeError) into schemaError.

---

Outside diff comments:
In `@packages/opencode/src/altimate/tools/sql-analyze.ts`:
- Line 45: The code currently treats errors with a truthy check (e.g.,
isRealFailure = !!result.error) which misclassifies empty-string errors as
absent; update all checks that inspect result.error (including where
isRealFailure is set and where title/metadata are built around result.error at
the other occurrences) to use presence-based checks instead — for example,
replace !!result.error with an explicit presence test such as result.error !==
undefined && result.error !== null && result.error !== '' (or a small helper
like hasError(result) that returns the same boolean) and apply the same presence
check wherever result.error is used to decide titles/metadata (the assignments
that reference result.error at the spots around isRealFailure, and the
title/metadata construction lines).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9e2255d9-3bff-4449-8772-b7553a3e5adf

📥 Commits

Reviewing files that changed from the base of the PR and between 590a5d4 and 30a0034.

📒 Files selected for processing (4)
  • packages/opencode/src/altimate/tools/altimate-core-column-lineage.ts
  • packages/opencode/src/altimate/tools/lineage-check.ts
  • packages/opencode/src/altimate/tools/schema-inspect.ts
  • packages/opencode/src/altimate/tools/sql-analyze.ts

Comment thread packages/opencode/src/altimate/tools/lineage-check.ts Outdated
Comment thread packages/opencode/src/altimate/tools/schema-inspect.ts
@anandgupta42
Copy link
Copy Markdown
Contributor

@cerebrixos Thanks for the contribution. We will review it soon

@anandgupta42
Copy link
Copy Markdown
Contributor

@cerebrixos, can you please fix the failing tests?

@cerebrixos
Copy link
Copy Markdown
Contributor Author

@dev-punia-altimate @anandgupta42 any update on this? seems its all good now?

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/opencode/src/altimate/tools/altimate-core-column-lineage.ts`:
- Around line 50-59: Extract the duplicated helpers isRecord and normalizeError
into a shared module (e.g., create a new file like altimate/tools/utils.ts or
altimate/utils/response-normalization.ts) and replace the local implementations
in altimate-core-column-lineage.ts (and other tools: sql-analyze.ts,
lineage-check.ts, schema-inspect.ts) with imports from that module; ensure the
new module exports isRecord and normalizeError and update each file to import {
isRecord, normalizeError } from the new module, run type-checks and tests to
confirm no behavioral changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5c845045-cd8f-4605-a80f-e0cdc3b35d48

📥 Commits

Reviewing files that changed from the base of the PR and between 8a7563d and 27c180f.

📒 Files selected for processing (4)
  • packages/opencode/src/altimate/tools/altimate-core-column-lineage.ts
  • packages/opencode/src/altimate/tools/schema-inspect.ts
  • packages/opencode/src/altimate/tools/sql-analyze.ts
  • packages/opencode/test/altimate/tool-response-normalization.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/opencode/src/altimate/tools/schema-inspect.ts

Comment thread packages/opencode/src/altimate/tools/altimate-core-column-lineage.ts Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/opencode/src/altimate/tools/sql-analyze.ts">

<violation number="1" location="packages/opencode/src/altimate/tools/sql-analyze.ts:55">
P2: Failure rendering is gated on `error` but failure detection uses `isRealFailure`, causing inconsistent ERROR metadata with success-style output when `success === false` but no error string is present.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Comment thread packages/opencode/src/altimate/tools/sql-analyze.ts Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/opencode/src/altimate/tools/sql-analyze.ts`:
- Around line 106-110: normalizeError currently returns "[object Object]" for
non-Error objects; update it to extract a plain object's message before
stringifying: inside normalizeError (function name), after the existing checks,
add a branch that if value is a non-null object and has a string "message"
property (e.g. typeof value === "object" && "message" in value && typeof (value
as any).message === "string") return that message; otherwise attempt a safe
JSON.stringify of the object inside a try/catch (to capture output/metadata
contents) and return the stringified result, falling back to String(value) if
stringify fails.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9760a5f9-a5c6-4ccf-b7a5-47c66f7c9de3

📥 Commits

Reviewing files that changed from the base of the PR and between 27c180f and 8258c26.

📒 Files selected for processing (2)
  • packages/opencode/src/altimate/tools/sql-analyze.ts
  • packages/opencode/test/altimate/tool-response-normalization.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/opencode/test/altimate/tool-response-normalization.test.ts

Comment thread packages/opencode/src/altimate/tools/sql-analyze.ts Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/opencode/src/altimate/tools/sql-analyze.ts">

<violation number="1" location="packages/opencode/src/altimate/tools/sql-analyze.ts:46">
P1: Blank/whitespace error fields force false failure states, potentially hiding valid analysis results</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Comment thread packages/opencode/src/altimate/tools/sql-analyze.ts
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/opencode/src/altimate/tools/response-normalization.ts">

<violation number="1" location="packages/opencode/src/altimate/tools/response-normalization.ts:12">
P1: Potential sensitive data exposure: `normalizeError` now JSON-serializes arbitrary record objects, which can expose sensitive fields (e.g., auth headers, connection config, tokens) into user-facing tool output and metadata. Previously these objects collapsed to `[object Object]`, providing an implicit sanitization barrier.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Comment thread packages/opencode/src/altimate/tools/response-normalization.ts Outdated
@dev-punia-altimate
Copy link
Copy Markdown

❌ Tests — Failures Detected

TypeScript — 15 failure(s)

  • baseline [0.50ms]
  • baseline [0.31ms]
  • baseline [0.09ms]
  • baseline [0.28ms]
  • connection_refused [0.23ms]
  • timeout [0.06ms]
  • permission_denied [0.04ms]
  • parse_error [0.03ms]
  • oom [0.03ms]
  • network_error [0.03ms]
  • auth_failure [0.03ms]
  • rate_limit [0.04ms]
  • internal_error [0.04ms]
  • empty_error [0.03ms]
  • connection_refused [0.07ms]

Next Step

Please address the failing cases above and re-run verification.

cc @cerebrixos

- `trino.ts`: split dynamic import from export validation so a present-but-broken
  `trino-client` reports a distinct version error instead of a misleading
  "not installed. Run: npm install" message.
- `registry.ts`: `warehouse.list` now falls back to `catalog` for Trino
  connections so the Database column is not blank.
- docs: align Docker auto-discovery lists in `warehouses.md` and
  `warehouse-tools.md` with the actual `IMAGE_MAP`
  (PostgreSQL/MySQL/MariaDB/MSSQL/Oracle/ClickHouse/Trino; MongoDB is not
  discovered, contrary to the reviewer suggestion).
- docs: add blank line before the Trino auth table in `drivers.md` (markdownlint MD058).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

Copy link
Copy Markdown

@dev-punia-altimate dev-punia-altimate left a comment

Choose a reason for hiding this comment

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

Multi-Persona Review — Verdict: ship

The PR adds a well-documented native Trino driver with comprehensive test coverage and integrates it cleanly across the codebase. All changes are focused, non-breaking, and improve support for 13 warehouses. No critical or high-severity issues were found.

14/14 agents completed · 256s · 15 findings (0 critical, 2 high, 8 medium)

High

  • [persona_security] User-supplied catalog, schema, or table names are directly interpolated into SQL queries without parameterization or sanitization in Trino driver, enabling SQL injection via malicious metadata inputs. → packages/drivers/src/trino.ts:145
    • 💡 Use parameterized queries or escape identifiers via Trino's built-in identifier quoting (e.g., "identifier") instead of string concatenation. Validate all identifiers against a whitelist of allowed characters.
  • [persona_security] Trino driver accepts arbitrary extra headers and session properties from user input without validation, potentially enabling HTTP request smuggling or server-side request forgery (SSRF) via malicious headers. → packages/drivers/src/trino.ts:89
    • 💡 Sanitize and validate all user-provided headers and session properties against a strict allowlist of permitted keys and values. Block headers like 'Host', 'Content-Length', 'X-Forwarded-For', and non-standard session properties.

Medium

  • [persona_tech-lead] Trino driver implementation in packages/drivers/src/trino.ts directly handles SQL execution and connection logic without abstracting through a standardized driver interface used by other warehouses (e.g., PostgreSQL, Snowflake). This creates a maintenance burden and violates the principle of uniform driver abstraction. → packages/drivers/src/trino.ts:1
    • 💡 Refactor Trino driver to conform to the shared Driver interface defined in packages/drivers/src/index.ts. Extract connection logic, query execution, and schema introspection into methods matching the expected signature of other drivers to ensure consistent usage across the system.
  • [persona_tech-lead] The new response-normalization.ts file implements error unwrapping and standardization logic that duplicates functionality already present in other tool handlers (e.g., sql-analyze.ts, schema-inspect.ts). This leads to inconsistent behavior and code duplication. → packages/opencode/src/altimate/tools/response-normalization.ts:1
    • 💡 Consolidate response normalization logic into a shared utility (e.g., packages/opencode/src/altimate/utils/response-helpers.ts) and import it across all tool handlers instead of duplicating logic in multiple files.
  • [persona_cto] Adding a native Trino driver is a strategic expansion of warehouse support, but the PR bundles significant unrelated changes: response normalization helpers, error handling refactors, and lineage tool modifications. These are high-impact cross-cutting changes that affect multiple tools and should be separated to reduce risk and improve reviewability.
    • 💡 Split into two PRs: 1) Native Trino driver + config/integration changes; 2) Cross-tool response normalization and error handling improvements as a standalone refactoring.
  • [persona_product-manager] PR adds native Trino driver and integrates it across the platform, but does not mention whether Trino support is tied to any specific customer tier or licensing requirement. If Trino is a premium feature, this is not communicated to users in docs or UI.
    • 💡 Clarify in documentation or UI whether Trino access requires a paid plan, and if so, update the docs and onboarding flows to reflect this.
  • [persona_product-manager] The PR introduces new environment variables (TRINO_*) and config aliases (e.g., server → connection_string), but does not provide clear migration guidance for users currently using the old PostgreSQL-compatible Trino mapping.
    • 💡 Include a migration note in the release notes or docs advising users to update their dbt profiles and connection strings to use the new native Trino format.
  • [persona_security] Error responses from Trino queries may expose internal stack traces or connection details in debug mode, leaking infrastructure information to unauthorized users. → packages/opencode/src/altimate/tools/response-normalization.ts:12
    • 💡 Ensure all error responses are sanitized before returning to clients. Never expose raw error objects, stack traces, or internal connection strings. Use generic failure messages like 'Analysis failed.' consistently.
  • [persona_devops] New Trino driver introduces a dependency on 'trino-client' package without verifying version compatibility or fallback behavior in production.
    • 💡 Add a version lock in package.json and include a runtime check for trino-client version on driver initialization with a clear error message if incompatible.
  • [persona_devops] New environment variables (TRINO_*) are introduced but not documented in deployment runbooks or environment templates.
    • 💡 Update deployment documentation and CI/CD environment templates to include TRINO_* variables with examples for Basic Auth and Bearer Token configurations.

Low

  • [persona_tech-lead] The Trino driver uses access_token as a config key, but other drivers use token for bearer auth (e.g., in normalize.ts). This inconsistency in naming conventions may confuse users and increase configuration errors. → packages/drivers/src/normalize.ts:105
    • 💡 Standardize the config key name across all drivers. Prefer token for bearer auth unless there's a compelling reason to differentiate. Update Trino driver config mapping to use token and document the alias in the migration guide.
  • [persona_cto] The PR introduces a new dependency (trino-client) without clear justification for why it's preferred over existing HTTP-based SQL drivers or community-maintained alternatives. The codebase already handles multiple SQL dialects via abstraction layers.
    • 💡 Add a brief rationale in the PR description or README about why trino-client was chosen over a generic HTTP client + SQL parser approach, especially given Trino's HTTP API is well-documented.
  • [persona_cto] The Trino driver implementation includes extensive logic for connection normalization, auth handling, and introspection — but these patterns are already established in other drivers (e.g., PostgreSQL, Snowflake). Risk of duplication and inconsistency.
    • 💡 Refactor common connection normalization and auth logic into a shared DriverBase or HttpSqlDriver class to reduce duplication and ensure consistent behavior across drivers.
  • [persona_product-manager] While Trino configuration and auth examples are documented, there is no guidance on how to troubleshoot common failures (e.g., authentication errors, connection timeouts, catalog not found).
    • 💡 Add a 'Troubleshooting Trino Connections' section in the warehouses.md or drivers.md docs with common error messages and resolutions.
  • [persona_devops] No new metrics or alerts are defined for Trino driver failures, connection timeouts, or query errors.
    • 💡 Add custom metrics for Trino connection attempts, success/failure rates, and query latency; create alert on >5% failure rate over 5 minutes.

Multi-Persona Review · vllm:qwen3-next-80b (waves) + vllm-fallback (synth) ·

Applies the minor/robustness fixes from the multi-model code review.

`trino.ts`:
- `cleanSql` no longer treats `\'` as an escape — Trino uses `''` doubling, so
  a literal ending in a backslash is parsed correctly.
- `execute()` clamps the limit (`Math.floor(Number(...))`, finite + positive)
  so a non-numeric/negative value can never produce `LIMIT NaN`/`LIMIT -5`.
- `hasLimit` now also matches `FETCH NEXT` (not just `FETCH FIRST`); documents
  the subquery-LIMIT heuristic limitation.
- `connect()` throws when both `password` (Basic) and `access_token` (Bearer)
  are configured, instead of silently sending both.
- `serverUrl` falls back to the protocol default port when `port` is non-numeric.
- `escapeStringLiteral` is null-safe; comments clarify the introspection-escaping
  and stateless-`close()` rationale.

`response-normalization.ts`:
- `normalizeError` surfaces object `.error`/`.detail` string fields (without
  stringifying the whole object) and treats falsy `false`/`0` as "no error".

`altimate-core-column-lineage.ts` / `lineage-check.ts`:
- Route `data.error` through `normalizeError` in `formatColumnLineage`.
- Fail when the inner `data.success === false`, matching `sql_analyze`'s
  two-layer check (column-lineage and lineage-check).

Adds unit tests for auth conflict, `FETCH NEXT`, `noLimit`, non-numeric
limit/port, inner `data.success=false`, and object-error non-leakage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

@anandgupta42
Copy link
Copy Markdown
Contributor

@cerebrixos appolgies for the delay. We were setting up an internal stack to have a testing environment for Trino. It's setup now and I will be releasing this today.

Thanks for your contribution!

Addresses multi-persona review feedback on the Trino driver docs:
- Add a migration note covering the dbt `trino` adapter change (was mapped to
  the PostgreSQL driver, now native) and the `database → catalog` /
  `token → access_token` aliases.
- Add a short Trino troubleshooting list (catalog required, auth conflict,
  protocol/port).
- Correct the auto-discovery list: Docker discovery does not detect MongoDB
  (not in the image map), so drop it to match the actual behavior.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

@anandgupta42 anandgupta42 merged commit 62f5a30 into AltimateAI:main Jun 1, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants