Repository navigation
Conversation
Each feature gets its own file under hooks/features/, called by name from features/index.ts in a fixed order: its own hooks, the session and turn events, its band line and its tool-call phases. One tool.call hook (tool-chain.ts) runs Bash and file handling in fixed phases: bashRewrite, bashGate, the call, bashAfter, editAfter, readOrEditAfter. The status line is built from parts (status-line.ts). runTool moves to altimate-cli.ts with a `write` option that goes through the CLI with --allow-write. dbt-command.ts finds the dbt invocations in a shell command line. New userConfig fields: maxScanBytes, healthBlocksPush, healthConfigPath, commentsPollSeconds, commentsInContext. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Subshells after keywords, case patterns, process substitution, arrays, arithmetic and function definitions parse again; quotes in a heredoc inside a substitution are text; a function or case pattern named dbt is not an invocation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… newer ask is not replaced by an older answer, output is plain text Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… stay two Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…xt, a size limit on a node's SQL, model folders inside a model path, a package's models are not the project's Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review round (Claude + Codex, independent CLI runs) — findings and repliesFixes are in the latest commits on this branch.
Attack-the-fix gate (fresh Codex and Claude processes): PASS. |
|
review-loop: APPROVED at 423558d Confirm gate (fresh Claude + Codex, read-only): both APPROVED, no findings. |
Code Review SummaryStatus: 2 Issues Found | Recommendation: Merge after the two suggestions (or accept as-is) Overview
The incremental change since Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous Review Summaries (4 snapshots, latest commit 5e37e6a)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 5e37e6a)Status: 1 Issue Found | Recommendation: Merge after the one remaining suggestion (or accept as-is) Overview
The two files changed since the previous review ( Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Previous review (commit 0c3cc7d)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (4 files)
Fix these issues in Kilo Cloud Previous review (commit 33d997b)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (4 files)
Fix these issues in Kilo Cloud Previous review (commit 423558d)Status: 6 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (20 files)
Reviewed by deepseek-v4.1-flash-1017 · Input: 39.4K · Output: 7.4K · Cached: 255.7K |
…r any install path are not models, tests that prove the cut, the order, the replaced reply and the escaping Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
| let quoted = false | ||
| for (let i = start; i < end; i++) { | ||
| const c = line[i] | ||
| if (quoted) quoted = c !== "'" |
There was a problem hiding this comment.
[WARNING]: An apostrophe inside a double-quoted word still hides a substitution
substitutionsIn toggles quoted on every ' and never tracks ". For echo "it's $(dbt run)" the apostrophe flips it into quoted state for the rest of the word, so $(dbt run) is skipped — but bash does substitute inside double quotes, so the run executes while parseDbtCommand does not report it (readSimple sees echo and it's $(dbt run), so the outer pass misses it too). That is the same fail-open for the scan gate and defer injection: track double-quoted state as well, and treat ' as a delimiter only outside " (and " only outside '). Test: expect(shape('echo "it\'s $(dbt run)"')).toEqual([run]) currently yields [].
…mands come in the order written, install paths are compared as paths from the project, outer projects are still asked Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
| } | ||
| finish() | ||
| // An inner command (in a substitution) is listed where it is written, not before the command around it. | ||
| return found.sort((a, b) => a.start - b.start) |
There was a problem hiding this comment.
[SUGGESTION]: Sorting by start puts a command before a substitution written in its own leading assignment
start includes the invocation's leading VAR=x words, so for TARGET=$(dbt run-operation get_target) dbt run the outer invocation starts at 0 while the inner dbt run-operation starts at the $( — the sort lists the outer command first, although the substitution is both written and executed before it. That contradicts the "in the order written" contract this line adds; the pre-sort code got this case right by accident because the inner invocation was pushed before finish(). Sorting on the first word after the assignments (or leaving the inner/outer insertion order alone for assignment-only prefixes) keeps the contract. Test candidate: parseDbtCommand('T=$(dbt build) dbt test').map(i => i.subcommand) currently gives ['test', 'build'].
| .join('/') | ||
| const here = inside.join('/') | ||
| // An enclosing project that does not hold this one among its packages leaves the outer ones to be asked. | ||
| if (own && !own.startsWith('/') && (here === own || here.startsWith(`${own}/`))) return true |
There was a problem hiding this comment.
[SUGGESTION]: The project-prefix strip is unanchored, and the !own.startsWith('/') guard can never fail
custom.replace(${dir}/, '') removes the first occurrence anywhere in the value, not only a leading one, so a relative packages-install-path that merely contains the project path is mangled: with the project at /repo and packages-install-path: vendor/repo/x, own becomes vendorx, and the nested-project check compares against the wrong folder. Separately, after .split('/').filter(part => part && part !== '.'), own can no longer start with /, so the guard that was meant to skip an absolute path outside this project is unreachable — such a value (say /opt/packages under a /repo project, giving own === 'opt/packages') is silently compared as if it were project-relative and can mark repo/opt/packages/... as an installed package. Anchor the strip on custom.startsWith(${dir}/), and skip the value when it is absolute and not under dir.
…ect: anchored prefix, absolute paths outside the project match nothing Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e is not read as inside it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… is compared Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
| const relative = given.startsWith('/') ? (given.startsWith(from) ? given.slice(from.length) : null) : given | ||
| const kept: string[] = [] | ||
| for (const part of relative === null ? [] : relative.split('/')) { | ||
| if (part === '..') kept.pop() |
There was a problem hiding this comment.
[SUGGESTION]: A .. that leaves the project is silently clamped to the project root
kept.pop() on an empty list is a no-op, so a packages-install-path that climbs above dir is read as a path inside it. With the project at /repo and packages-install-path: ../vendor, the real install folder is /vendor, but own becomes vendor, so a nested project at /repo/vendor/pkg matches here.startsWith('vendor/') and its models are dropped as a package's. The absolute branch has the same hole: /repo/../vendor is stripped to ../vendor and clamped identically. Count the .. steps and skip this project when the path leaves dir (its packages cannot be under it), or resolve .. before the absolute-prefix strip and compare the result with dir. Adding '../vendor' and `${ROOT}/../vendor` to the loop at line 135 would cover it, since the current cases never climb above the root.
|
review-loop: APPROVED at b8ab823 Verify-only gate over the review-fix commits ( |
What this does
/sql-graph [model]opens a pane listing the model's CTEs, joins and filters from the altimate-codedbt_sql_graphtool (AltimateAI/altimate-code#1735, which merges first). With no name it uses the model Claude last read or edited.id, so two nodes with one name stay two). Pressing a row shows that node's SQL. No picture on the terminal; the list is the surface.N CTEs · /sql-graph, counted from the file. No backend call on edit.--allow-write(the plugin's MCP server stays read-only). A failure (no dbt project, no Altimate key, read-only) is shown in the pane and as the command's reply.This branch contains the Power User foundation commits; this PR's own change is
hooks/features/sql-graph.tsx, its test andSqlGraphStateintypes/index.d.ts.Verification
claude plugin test ./plugins/altimate-code(228 pass, including thesql-graphtests: ordering, command, pane, row press, same-named nodes, failure, escapes, SQL limit, model folders, edit line) andbash tests/*.sh(all pass).claude plugin validate --strictreports the same warnings as the foundation branch before this change.Cost
One backend call and one warehouse metadata read per
/sql-graph, never per edit.Demo
Review
Independent Claude and Codex reviews ran on this PR; every finding has a reply in the PR comments. Open follow-ups, not changed here: a nested monorepo project is not selected for the CLI run (plugin-wide
runToolbehaviour), docs, a second project lookup per edit, parallel asks not merged.Demo video (hosted)
P-01.mp4 — watch on Notion (Altimate workspace; recorded from the approved head of this PR).
🤖 Generated with Claude Code