Repository navigation
Conversation
Nine tool stubs exposed through `altimate tool run` (dbt_run_results, dbt_defer_state, dbt_map_relations, docs_share_comments, dbt_cost_estimate, dbt_health, dbt_sql_graph, dbt_docs_coverage, dbt_cte_profile), an exported `AltimateApi.apiRequest` that calls the backend with the stored credentials, and `dbtAdapterFor`, the one gate every adapter-backed tool goes through: it refuses read-only calls, other projects, and an adapter that did not start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compiles the model, reads its parents' columns from the warehouse's metadata, and asks the Altimate backend's sql_lineage endpoint; the graph's final select is named after the model and its relations are tied to their dbt nodes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
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. |
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…fore compile, model-name collisions, models only Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
|
Review of this change (two independent reviewers, then a separate check of the fixes). Each finding and what happened to it, fixed in f6aed61: Fixed
Not changed, on purpose
Cost side effects are unchanged: one backend call and one warehouse metadata read per call. |
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
# Conflicts: # packages/opencode/src/altimate/tools/dbt-sql-graph.ts
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
…chema and database, operation SQL, cancel during the backend call, refusal as failure Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
Review round (Claude + Codex, independent CLI runs) — findings and repliesAll findings are fixed in 4a6dc20 unless marked otherwise.
Attack-the-fix gate (fresh Codex and Claude processes) passed on the third run; the first two runs found the cross-database and ambiguity gaps, now fixed and tested. Not changed (pre-existing / out of scope, for follow-up): credentials are checked after the adapter starts; the shared API client has a fixed 15 s timeout and no signal; manifest The backend's response shape was verified against a local backend checkout, not a deployed backend. |
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
1 similar comment
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
|
review-loop: APPROVED at 4a6dc20 Confirm gate (fresh Claude + Codex, read-only, on the fix commit). Claude: APPROVED. Codex: one P2, |
There was a problem hiding this comment.
All reported issues were addressed across 15 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Notes
Files Reviewed (15 files; 4 re-reviewed in this delta)
Fix these issues in Kilo Cloud Previous Review Summary (commit 4a6dc20)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4a6dc20)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Notes
Files Reviewed (15 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 71.2K · Output: 11.2K · Cached: 705.3K Review guidance: REVIEW.md from base branch |
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
…nly call is cancelled not refused, the cancel test waits for the backend call Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
1 similar comment
|
👋 This PR was automatically closed by our quality checks. Common reasons:
If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you. |
|
review-loop: APPROVED at 5bab957 Verify-only gate on the review-fix commit |
Issue for this PR
None
Type of change
What does this PR do?
Adds the
dbt_sql_graph { model }tool. It compiles the model with the project's dbt integration, reads its non-ephemeral parents' columns from the warehouse's metadata, and sends the compiled SQL to the Altimate backend'sdbt/v3/sql_lineageendpoint (api/sql-lineage.ts). The backend's__final_select__is renamed after the model and each relation node is tied to its dbt unique id by name, database and schema (a relation two parents could both be is tied to neither). The result is{ nodes: [{ id, name, type, nodeId?, sql, columns }], edges: [[fromId, toId]] }(idis the backend's unique node key;nameis only what is shown and can repeat; a join or filter'sexpressionis itssql) plus a one-line-per-node text list. It is adapter-backed, so it needs write permission and an Altimate key; read-only calls get the foundation's refusal.This branch contains the Power User foundation commits (
feat/pu-mods-foundation); this PR's own change istools/dbt-sql-graph.ts,api/sql-lineage.tsandtest/altimate/dbt-sql-graph.test.ts.How did you verify your code works?
bun test test/altimate/dbt-sql-graph.test.ts test/altimate/dbt-adapter-access.test.ts(44 tests, mocked endpoint and adapter) andbun typecheck, both frompackages/opencode. Also run for real:altimate tool run dbt_sql_graph --allow-writeon a built jaffle_shop copy against the Altimate backend (stg_customers: 4 nodes;orders: 9 nodes with a join and a group).Cost side effects
One backend call and one warehouse metadata read (
getBulkSchemaFromDB, parents only) perdbt_sql_graphcall. Nothing runs per edit. The model's compile can run SQL only as the dbt integration already does for any compile.Screenshots / recordings
Review follow-ups (not changed here)
Credentials are checked after the adapter starts; the shared API client has a fixed 15 s timeout and no abort signal (cancel is raced in the tool instead); the client drops the backend's 400 detail, so a parse failure shows only the status; manifest
description/metaare sent to the backend as Power User does. The backend's response shape was verified against a local backend checkout and a live call.Checklist
Changelog:
dbt_sql_graphtool: a dbt model's CTEs, joins and filters as a graph.Demo video (hosted)
P-01.mp4 — watch on Notion (Altimate workspace; recorded from the approved head of this PR).
🤖 Generated with Claude Code
Summary by cubic
Adds the
dbt_sql_graph { model }tool, which compiles a model with the dbt adapter and returns its CTEs, joins, and filters as a graph of nodes and edges, and lays the shared foundation for adapter-backed Altimate tools.dbt/v3/sql_lineageendpoint, names the final select after the model (<model> (final select)when the SQL already has a node by that name), and ties each relation to its dbt unique id by name, plus schema and database when both sides give one. Nodes keep an id apart from their on-screen name, so two relations can share one, and joins and filters keep the SQL they were built from.dbtAdapterForis the single gate for adapter-backed tools: it refuses read-only calls, sessions in a different dbt project, and an adapter that didn't start, with a bounded wait that follows call aborts. A call cancelled at any point ends at once; refusals return as tool failures, and an abort during the backend call ends it at once.AltimateApi.apiRequestposts to any backend endpoint with the stored credentials and a clear error naming the credentials file when missing.dbt_run_results,dbt_defer_state,dbt_map_relations,docs_share_comments,dbt_cost_estimate,dbt_health,dbt_docs_coverage,dbt_cte_profile) are exposed through the tool allow-list as not-yet-implemented placeholders.Written for commit 5bab957. Summary will update on new commits.