Repository navigation
feat: foundation for the dbt Power User features - #30
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 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>
Review loop result: approvedThree independent reviewer runs looked at this PR: Claude (approve, confidence 0.8), a second Claude pass on the parser, and Codex. A separate run then checked each round of fixes. Replies to every finding: Round 1 (fixed in 4328fc3)
Fix check on round 1 (fixed in 6f6c89e)
Second fix check (passed). Its follow-ups:
Checks: |
|
Demo recording: /Users/harish/.quikim/artifacts/pu-mods/videos/F.mp4 (with the asciinema cast F.cast beside it, 82 s). It shows, in order: |
readable() also returns null rather than false when a line cannot be read, matching its declared type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Confirm-gate review of 4328fc3..6f6c89e (claude -p and codex exec, both REQUEST CHANGES). Replies:
Plugin tests: 212 pass, 0 fail. |
|
Confirm-gate r2 at 2b31340: claude APPROVED, codex REQUEST CHANGES.
|
Skip a here-string's <<< as one operator instead of refusing any << after a <, so \<<<EOF still opens a heredoc whose body is read as text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Confirm-gate r3 on 2b31340..b36cbe6: fixed in b36cbe6, the r2 finding (
|
|
review-loop: APPROVED at b36cbe6 |
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Incremental pass over The one new item is a simplification in the changed launcher loop, not a behavior defect. Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Previous Review Summaries (6 snapshots, latest commit ac0d379)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit ac0d379)Status: No Issues Found | Recommendation: Merge Incremental pass over
Also verified: Files Reviewed (6 files)
Previous review (commit 2c494ec)Status: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Incremental pass over
The remaining files in that commit range ( Checked edge cases in the changed parser code: Previous review (commit 176e8b5)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (5 files)
Checked this increment ( Fix these issues in Kilo Cloud Previous review (commit 9409397)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (13 files)
Checked this increment ( Fix these issues in Kilo Cloud Previous review (commit f681699)Status: No Issues Found | Recommendation: Merge Files Reviewed (7 files)
Checked this increment against the earlier findings: the invocation offsets now start at the assignment/launcher after any prefix words (verified for Previous review (commit b36cbe6)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (20 files)
Also verified while reviewing: the Reviewed by deepseek-v4.1-flash-1017 · Input: 82.4K · Output: 24.4K · Cached: 960K |
…sion, chain wiring tested - parseDbtCommand's start leaves out the shell keywords and prefix commands in front of dbt (if, then, !, time, nohup, env and its options) and keeps the assignments right before it, so a rewrite spliced between start and end keeps the line valid shell. - The status parts are cleared at session start, so an earlier session's part is not drawn again. - runTool's write option documents that the caller must have the user's yes first. - A test asserts the plugin registers the tool chain's hook and that it runs the call it is given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
review-loop: APPROVED at f681699 Verify-only gate on b36cbe6..f681699 (fixes for the Kilo review threads): Claude APPROVED, Codex APPROVED. Non-blocking MINOR follow-ups:
|
sahrizvi
left a comment
There was a problem hiding this comment.
Consensus review: request changes
Panel: Claude (lead) and Codex. Codex reviewed on its own first, then each side checked the other's findings. Every finding below was reproduced against the code or by running it, and both reviewers accept every finding at the severity shown.
Head reviewed: f681699831. Merge base: 15ef117. CLI: built from AltimateAI/altimate-code#1736 at d8c34693b0.
Why changes are requested
- Five open majors.
- Four are in
dbt-command.ts. Each is a wrong parse of a kind a later rewrite or gate would act on: prefix options (command -v dbt run,env -u), quoted words read as assignments or keywords, unexpanded$VAR/$(…)returned as selectors and targets, and a replacement span that swallows interleaved redirections. See the inline comments. - The fifth is not tied to a diff line: the branch no longer merges onto main (see the PR comment).
- Four are in
What holds up
- Pass-through. With every feature a stub, the chain passes Bash, Read and Edit calls through unchanged. It hands
nextthe same input object and returns the same result object, and it adds no deny and no context. - Exceptions. An async exception in any feature phase, including one raised inside the parser, is logged and skipped, and the call runs unchanged.
- Parser at runtime.
parseDbtCommandis not called by any runtime code at this head. Fuzzing it with 200,000 random shell-like inputs never made it throw, and a typical parse takes about 8 µs. - Ordering and the tests. The chain order and its failure handling are covered by the new suites. Every mutation I tried was caught:
- the gate seeing the command before the rewrite (1 test fails);
- a stub that rewrites (3 fail);
- file phases running after a failed call (1 fails);
- a stub gate that denies (6 fail).
- Missing or old CLI.
altimate-cli.tsruns the CLI by argv with no shell and a timeout, and logs nothing from the output. No code at this head calls #1736's tools. An older CLI answers with anUnknown toolerror status, whichrunToolmaps took:false. - Lineage.
lineage.test.tsxis byte-identical at base and head and passes at both. The lineagetool.callhook stays inlineage.tsx; what moved toaltimate-cli.tsisrunTooland its helpers, unchanged except for the options object.
Suites (base 15ef117 → head)
| Check | Base | Head |
|---|---|---|
claude plugin validate --strict plugins/altimate-code |
fails on warnings: 4 TS2345 in lineage.test.tsx, plus a missing icon |
the same warnings; no new type errors |
claude plugin validate (non-strict), both paths |
passes | passes |
claude plugin test plugins/altimate-code |
189 pass, 0 fail | 216 pass, 0 fail |
tests/*.sh (7) |
all pass | all pass |
pytest tests/ |
65 pass | 65 pass |
The repository has no tsconfig and no separate tsc step; the type check runs inside claude plugin validate.
No live check was run. A Claude Code session with an isolated HOME and config stops at the login screen, and this review does not sign in. The lineage parity evidence is the unchanged lineage suite, which passes at base and head.
Findings not tied to a diff line, and the nits, are in a separate PR comment.
| firstAssignment = null | ||
| continue | ||
| } | ||
| if (word.startsWith('-') && prefix !== null) { |
There was a problem hiding this comment.
Major: prefix options can make a command that runs nothing parse as a dbt invocation (Codex; reproduced)
parseDbtCommand('command -v dbt run') returns a run invocation with span dbt run. The shell only looks up the name there and dbt never starts. Prefix environment changes are ignored too: DBT_TARGET=prod env -u DBT_TARGET dbt build returns target: 'prod', but env -u removes that variable before dbt starts. A later gate or rewrite would then act on a call that never happens, or on the wrong target. Prefix words need per-command handling (command -v/-V is a lookup, env -u NAME drops NAME), or the parser should return no invocation. The same applies to nohup X=1 dbt run, which your own loop listed as a follow-up.
There was a problem hiding this comment.
Fixed in 3fa4834. The parser now returns no invocation for a lookup (command -v/-V), for env followed by any option (env -u NAME, -i, -S…), and for a NAME=val word after a wrapper that runs its first argument (nohup, command, exec). There, that word is the command, so nohup X=1 dbt run doesn't run dbt. command -p/command -- and env with only assignments still parse, and env's assignments count like leading ones. DBT_TARGET=prod env -u DBT_TARGET dbt build now gives no invocation. Test: "prefix options: a lookup, env with options and a NAME=value after a wrapper are no invocation", which fails on the old code. The header comment now states the contract: when the static text doesn't show that dbt starts, no invocation.
There was a problem hiding this comment.
Not resolved (only partly). Both inputs from round 1 now give no invocation, and the new test covers them. But the same kind of input still parses as a dbt run: other options after command, nohup, exec and time are skipped (command --help dbt run, nohup --help dbt run), a keyword after env is taken as a keyword (env if dbt run), and launcher options are still read after -- (uv run -- --project x dbt run). This is the open major in this round's review, on dbt-command.ts line 637.
There was a problem hiding this comment.
Still not resolved, but narrowed at d563dce. Every round-1 and round-2 input gives []. The four prefix forms left are in the round-3 review's inline comments.
| if (c === '\\') { | ||
| text += line[i + 1] ?? '' | ||
| i += 2 | ||
| } else if (c === "'") { |
There was a problem hiding this comment.
Major: dropping quote information turns words that are not assignments or keywords into assignments and keywords (Codex; reproduced)
"DBT_TARGET=prod" dbt run parses as a dbt run with target: 'prod'. Bash instead tries to run a command named DBT_TARGET=prod, and dbt never starts. Likewise "if" dbt run is read as keyword if plus a dbt call. Once a quote is stripped into text, ASSIGNMENT and PREFIX_WORDS can no longer tell the difference. Record per token whether it had any quoted part, and skip assignment and keyword matching for those tokens.
There was a problem hiding this comment.
Fixed in 3fa4834. Each token records where its first quoted part starts. A token quoted before its = is never an assignment, and a quoted token is never a keyword or prefix command. So "DBT_TARGET=prod" dbt run and "if" dbt run give no invocation. DBT_TARGET="prod" dbt run stays an assignment, as in bash, and a quoted "dbt" is still dbt. Test: "a quoted word is never an assignment, a keyword or a prefix command, but a quoted dbt is dbt", which fails on the old code.
There was a problem hiding this comment.
Resolved at 2c494ec. "DBT_TARGET=prod" dbt run and "if" dbt run give no invocation. DBT_TARGET="prod" dbt run is still an assignment, and "dbt" run and 'dbt' run still parse as dbt. Reverting isAssignment to ignore quotedAt fails the new test.
There was a problem hiding this comment.
Thanks for checking, and for the mutation checks.
| if (SELECT_FLAGS.has(flag)) { | ||
| if (inline !== null) select.push(...inline.split(/\s+/).filter(Boolean)) | ||
| selecting = true | ||
| } else if (flag === '-t' || flag === '--target') target = value() |
There was a problem hiding this comment.
Major: unexpanded variables and substitutions come back as literal selectors and targets (Codex; reproduced)
dbt run --target "$DBT_TARGET"returnstarget: '$DBT_TARGET'.dbt run -s "$(printf orders)"returnsselect: ['$(printf', 'orders)'], while dbt itself receivesorders.for m in a b; do dbt run -s $m; donereturnsselect: ['$m'].
A single-quoted literal and an expanding double-quoted value end up the same, so a cost estimate or gate built on select or target would look at models or a target that don't exist. A value containing an unquoted or double-quoted $ or backtick should be reported as unknown (null, or a flag on the invocation), not as a value.
There was a problem hiding this comment.
Fixed in 3fa4834. The tokenizer keeps $(…), ${…}, $NAME, $1 and backticks (unquoted or in double quotes) inside one word, so "$(printf orders)" is no longer split. DbtInvocation has a new documented dynamic field. It is true when any word of the invocation holds an expansion, and such a value is never reported: it is left out of select, and target/targetPath are null. The doc comments say a dynamic invocation's select and target are unknown. An expansion in the binary or the subcommand gives no invocation. Single-quoted '$literal' is still read literally. Test: "an expansion is part of its word, and the invocation is dynamic; its values are never reported", with all three of your examples plus DBT_TARGET=$T dbt run. It fails on the old code.
There was a problem hiding this comment.
Resolved at 2c494ec. Every expanded value I tried gives dynamic: true with nothing reported, including --target "$T", --select "$(cat x)", -s $m, backticks, X=$Y and DBT_TARGET=$T time dbt run, --vars "{k: $v}", $'…\n…', ~/x, {a,b} and an unquoted *. Single-quoted '$m' and "*" are still read as literals, which is right.
There was a problem hiding this comment.
Thanks for checking, and for the mutation checks.
| hasDefer, | ||
| hasState, | ||
| start, | ||
| end: words[words.length - 1]!.end, |
There was a problem hiding this comment.
Major: the replacement span includes redirections inside the command (Codex; reproduced)
For dbt run > run.log -s orders, line.slice(start, end) is the whole command, > run.log included, even though the field's doc says redirections are excluded. A caller that replaces the span with a rewritten dbt run -s orders --target dev, as start/end are documented to allow, silently drops the redirection. Either make end stop before the first redirection that sits among the arguments, or return no invocation (or no safe span) for that form. A test on slice(start, end) for this input would lock it in.
There was a problem hiding this comment.
Fixed in 3fa4834, by refusing the form. A redirection among the arguments with another argument after it (dbt run > run.log -s orders, dbt run 2>/dev/null --target dev) gives no invocation, and the header lists it as unsupported. A trailing redirection still works, and the test asserts line.slice(start, end) is dbt run -s orders for dbt run -s orders > run.log. Test: "a redirection among the arguments with an argument after it is unsupported; a trailing one is left out of the range", which fails on the old code.
There was a problem hiding this comment.
Resolved at 2c494ec. A redirection among the arguments now gives no invocation: dbt run > run.log -s orders, >out 2>err -s m, > >(tee o) -t x and a redirection between the binary and the subcommand. Trailing redirections, pipes and &&/;/& stay outside the span: 2>&1, &>, >|, |&, <&0 and 3<>f all checked. I also fuzzed 200,000 lines: 0 throws, and every span parses alone as the same invocation. The only exception is a trailing backslash (a new minor). Removing the guard fails the new test.
There was a problem hiding this comment.
Thanks for checking, and for the mutation checks.
| '-C', | ||
| ]) | ||
| // dbt options that take a value, so the value is not read as the subcommand or as a selector. | ||
| const DBT_VALUE_FLAGS = new Set([ |
There was a problem hiding this comment.
Minor: global value flags missing from DBT_VALUE_FLAGS shift the subcommand
dbt --partial-parse-file-path p run parses as subcommand: 'p', with subcommandEnd just past p. Flags inserted at subcommandEnd then land before the real subcommand, and a gate keyed on run misses the call. The fix is to add the remaining global value options, or to stop at the first word in dbt's subcommand list. It doesn't block because the input is an edge case.
There was a problem hiding this comment.
Fixed in 3fa4834. --partial-parse-file-path and --packages-install-path are added to the global value flags. When the first word isn't a dbt subcommand, the parser also keeps scanning for the first word that is one (falling back to the first word if none is), so a global value option it doesn't know no longer hides run. Test: "global options that take a value come before the subcommand, and an unknown word does not hide the subcommand", which fails on the old code.
There was a problem hiding this comment.
Resolved at 2c494ec. dbt --partial-parse-file-path p run gives run, and the fallback that scans for the first known subcommand handles --log-level, -r and --warn-error-options too.
There was a problem hiding this comment.
Thanks for checking, and for the mutation checks.
| } | ||
|
|
||
| export async function featuresSessionStart($: EngineInterface, e: Args<'session.start'>) { | ||
| await runsSessionStart($, e).catch(error => failed($, 'runs', 'sessionStart', error)) |
There was a problem hiding this comment.
Minor: a feature that throws synchronously escapes .catch and skips the plugin's own hook
await f($, e).catch(...) catches only a rejected promise. A feature written as a plain function that throws before it returns one escapes the catch. I checked this by mutating features/runs.tsx:
- A sync throw in
sessionStartmakes the engine skip the plugin's wholesession.starthook ("altimate-code's session.start hook was skipped"), and 23 plugin tests fail. - A sync throw in
bandLinedrops the whole band, integrations and lineage both (7 tests fail). - A sync throw in
bashRewrite/bashGaterejectsbeforeCall. The chain then runs the original command and skips every later feature's gate (fail-open).
That breaks this file's own rule that one feature's failure never stops another. Wrapping each call as Promise.resolve().then(() => f($, e)).catch(...) (or try/catch) fixes it. It doesn't block today because every stub is async, so it is safe in a follow-up.
There was a problem hiding this comment.
Fixed in 3fa4834. Every feature call in features/index.ts goes through a new attempt(), which catches a synchronous throw as well as a rejection, logs it and skips that feature. That covers session start, band lines, rewrite, gate and the file phases. Test: features/index.test.ts tests attempt with a sync throw and a rejection, and checks that every phase still runs. A limit to mention: the test harness refuses dynamic import(), so the test can't swap a real feature module for a throwing one phase by phase. The phases are covered through the shared helper.
There was a problem hiding this comment.
Resolved at 2c494ec. I made runs' sessionStart, bandLine and bashGate throw synchronously. Only the test that expects no logs fails (349/350). Session start, the band and the tool calls are all intact, and when cost's gate is made to deny, its deny still comes back after the throw. Making attempt call run() outside its try fails the new attempt test.
There was a problem hiding this comment.
Thanks for checking, and for the mutation checks.
| readsBefore: EDIT_READS_BEFORE, | ||
| } | ||
| // The chain failing never stops the call: it then runs as it came, and its result goes back as is. | ||
| const pre = await beforeCall(input, steps).catch(() => ({ e: input, deny: null, before: null })) |
There was a problem hiding this comment.
Minor: no phase has a deadline
beforeCall and afterCall await every feature with no time limit. A feature promise that never settles (a CLI call with no timeout, a lost $.mcp.call) would hold every Bash, Read, Edit, Write and MultiEdit call of every session with the plugin, including users who never touch dbt. The lineage hook at base bounds its own hold with HOLD_TOTAL_MS. Bounding each phase with within() from altimate-cli.ts, and passing the call through when time runs out, would keep that guarantee for the features. It doesn't block because the stubs make it unreachable today, so it is safe in a follow-up.
There was a problem hiding this comment.
Fixed in 3fa4834. Every beforeCall/afterCall phase is bounded with within() from altimate-cli.ts, using PHASE_TIMEOUT_MS = 5 s. When time runs out the call goes through unchanged, with no deny and no rewrite, and the timeout is logged. The limit and the logger can be injected on ChainSteps for tests. Tests: "a phase that never settles is given up on…" and "a phase that throws at once…", which fail on the old code.
There was a problem hiding this comment.
Resolved at 2c494ec. PHASE_TIMEOUT_MS is 5 s for each phase. When a gate times out, the call goes ahead (fail open), and the note beside the constant says so. Removing steps.limit from bounded makes the never-settling test time out. Still open, as nits: one budget is shared by all nine gates, work that timed out is not cancelled, and the features' session and turn hooks have no deadline. A remaining edge case where a throwing $.clock.after leaves a rejection unhandled is an inline minor on altimate-cli.ts line 70.
There was a problem hiding this comment.
Thanks. Noted the shared budget, the timed-out work that isn't cancelled, and the hooks without a deadline, for when the gates are built. The throwing-clock edge is fixed in ac0d379.
| "maxScanBytes": { | ||
| "type": "number", | ||
| "title": "Largest BigQuery scan without asking", | ||
| "description": "A dbt run, build or show that BigQuery estimates would scan more bytes than this is held until you allow it with /allow-scan. 0 never holds one. Other warehouses are never held.", |
There was a problem hiding this comment.
Minor: the setting descriptions promise controls that don't exist yet (Codex)
These texts say a scan over maxScanBytes "is held until you allow it with /allow-scan" and that git push "is refused" when healthBlocksPush is on. Neither exists at this head: /allow-scan isn't registered, and every gate is a stub. Someone who turns on healthBlocksPush or lowers maxScanBytes would think they are protected when they aren't. Until the features ship, either mark the settings as not yet active in their descriptions, or add them in the PR that implements each one. It doesn't block because nothing breaks, so it is safe in a follow-up.
There was a problem hiding this comment.
Partly done, in 3fa4834 and 9409397. maxScanBytes now has min: 0 and commentsPollSeconds has min: 30, and the README has a Settings section for all five. I declined the "not active yet" wording, with this reason. The nine feature branches that implement these settings don't edit the description lines, so a marker added here would merge into them without a conflict and ship on settings that work. The features land with this foundation in the same release, so a released plugin never offers a setting with no feature behind it.
There was a problem hiding this comment.
Not resolved. The min values and the README Settings section are good. But the descriptions still promise a /allow-scan command and push blocking, and with the stubs neither exists: maxScanBytes = 1 holds nothing, and healthBlocksPush = true blocks nothing. I accept that the plan is to release the features together with this PR. But this PR carries no version bump, so nothing stops a release that includes it from going out before those features land. That release would show settings that do nothing. This is still a minor and doesn't block. A short "takes effect when the cost check ships" note, or holding back the userConfig block until the features land, would close it.
There was a problem hiding this comment.
Fixed in ac0d379. All five setting descriptions now begin "Not used yet: … isn't in this version", and the scan and push titles end in "(not used yet)". The scan setting no longer mentions /allow-scan. The README Settings section says no setting is used yet. Each feature branch rewords its own settings when it ships the behaviour.
There was a problem hiding this comment.
Resolved at d563dce. All five descriptions begin "Not used yet", /allow-scan is gone, and the README Settings section says no setting is used yet. Nothing in hooks/ or commands/ reads them.
Consensus review: findings not tied to a diff line, and nitsPanel: Claude (lead) and Codex. Head: Major: the branch no longer merges onto main
The conflict is more than textual. Since this branch was cut, main's 1.6.0 changed the lineage per-edit column lookup to go through the CLI instead of the MCP server. This PR moves Minor: no version bump or CHANGELOG entry (Codex)
Nits
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parseDbtCommand: prefix options (command -v, env options, a NAME=value after a wrapper), quoted words, expansions (new dynamic field), and interleaved redirections no longer give an invocation or a literal value they cannot back; dbt's global value options and the first known subcommand are found past an unknown word. Feature phases catch a synchronous throw like a rejection, the tool chain bounds each phase with a deadline and passes the call through on timeout, and clearing the status line at session start no longer skips the rest of the start. Settings that do nothing yet say so, with lower bounds, and the README lists them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The setting descriptions and the README section describe the shipped behaviour, so a feature that implements a setting does not inherit a note saying it is inactive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Replies to the comment above (findings not tied to a diff line):
|
…te of runTool A backslash in double quotes is dropped only before $, a backtick, a quote, a backslash or a newline, and a $'...' word holding an escape is dynamic instead of reported undecoded. runTool's write route (CLI only, --allow-write) now has a test, the subcommand comment says what the parser does, and the gate stubs say what the phase deadline means for a gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| select, | ||
| target: targetDynamic ? null : (target ?? envTarget), | ||
| targetPath: targetPathDynamic ? null : (targetPath ?? envTargetPath), | ||
| dynamic: words.slice(firstAssignment ?? launcherStart).some(one => one.dynamic), |
There was a problem hiding this comment.
WARNING: An unreadable DBT_TARGET / DBT_TARGET_PATH in front of a prefix word is reported as 'none', not 'unknown'
firstAssignment is cleared again by every shell keyword and wrapper (lines 610-615), and dynamic is computed only from words.slice(firstAssignment ?? launcherStart). An assignment holding an expansion in front of a prefix word therefore drops out of dynamic, while line 599 has already set its value to null:
parseDbtCommand('DBT_TARGET=$T time dbt run')yieldstarget: null, dynamic: false, which the docs on lines 32-47 define as 'no target given'. dbt does receive that target, from the environment.DBT_TARGET=$T dbt runcorrectly yieldsdynamic: true.
A consumer (cost, defer/target) would act on target: null as if the command had no target. Keep the first dynamic assignment in the calculation - OR a running flag in when an assignment is dynamic, or start the slice at the command's first assignment even when a prefix word follows it.
There was a problem hiding this comment.
Fixed in 2c494ec. Any assignment that holds an expansion now sets dynamic, and a prefix word no longer clears that. DBT_TARGET=$T time dbt run and DBT_TARGET_PATH=$P nohup dbt run now give dynamic: true. DBT_TARGET=prod time dbt run still gives target: 'prod'. Regression cases are in dbt-command.test.ts.
| // Wrapped, so a legitimate null value is told apart from the deadline's null. | ||
| const done = await steps.limit(Promise.resolve().then(run).then(value => ({ value }))) | ||
| if (done) return done.value | ||
| steps.log(`tool chain · ${phase} did not finish within ${PHASE_TIMEOUT_MS} ms or failed: the call goes on unchanged`) |
There was a problem hiding this comment.
WARNING: A throwing steps.limit / steps.log escapes bounded and skips the gate
Only the phase work is guarded (line 83). await steps.limit(...) and steps.log(...) are called unprotected, so if the deadline helper or the logger throws, bounded rejects instead of returning fallback - contrary to its own doc on line 80. beforeCall then rejects and installToolChain's catch (line 136) runs the call as it came with deny: null, so a gate that would have refused it (healthBlocksPush, a scan limit) never runs. $.ui.log is treated as throwable elsewhere in this PR (features/index.ts:150-153 wraps it in try/catch), and within calls $.clock.after inside the promise executor. Wrap the body of bounded in try/catch (or guard steps.log) so an infrastructure failure drops only that phase.
There was a problem hiding this comment.
Fixed in 2c494ec. bounded now guards steps.limit and steps.log too. A deadline or logger that throws drops only that phase and returns fallback, so the gate still runs. New test: "a deadline or a logger that throws drops only that phase: the gate after it still runs". In it the first phase's deadline throws and the logger throws, and the gate's deny still comes back.
| expect(tool.test('Grep')).toBe(false) | ||
| // With every feature a stub, the chain hands the call on unchanged and passes its result back. | ||
| const seen: any[] = [] | ||
| const result = await chains[0]!.handler({ fs: { read: async () => null }, clock: quick.clock, ui: { log: () => {} } }, { tool: 'Bash', command: 'dbt run -s orders' }, async (e: any) => (seen.push(e), ok)) |
There was a problem hiding this comment.
SUGGESTION: This test never reaches the stub path its comment describes
With quick.clock the deadline settles on the next microtask - the clock callback is queued before the phase's continuations - so every phase in this handler takes the timeout branch, and the pass-through assertions (lines 114-115) hold even if the chain never called a feature. Only registration and next propagation are actually covered. Use a clock whose deadline never fires (for example clock: { after: () => {} }), or one driven by mock.clock that fires after the stubs settle, and assert that no timeout was logged.
There was a problem hiding this comment.
Fixed in 2c494ec. The registration test now uses a clock whose deadline never fires, so every phase reaches its stub. It also asserts that no tool chain · timeout line was logged.
…thing An unquoted tilde, brace list or pathname pattern, and $- , make a word dynamic; $"..." is a quoted string; a launcher asked for its help or version reports no dbt call. The runTool write test can now fail, and the parser comments say what the code does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The note moves out of the nine feature stubs, which return to their earlier content, so the packages that replace them do not each conflict on a comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| // No answer: a call that does reach the server falls back to the CLI. | ||
| call: async () => null, | ||
| }, | ||
| clock: { now: async () => now }, |
There was a problem hiding this comment.
[SUGGESTION]: The stand-in has no clock.after, so the "no answer" fallback this test claims to cover is never taken
The comment on line 17 says a call that reaches the server falls back to the CLI because it gets no answer. But within calls $.clock.after(ms, …) inside its promise executor (altimate-cli.ts:70), and this $ only has clock.now. So the read call on line 45 throws TypeError: $.clock.after is not a function; runTool's catch (altimate-cli.ts:170) swallows it and moves to the CLI. The if (!result) throw branch (altimate-cli.ts:150) is never reached, so the fallback this test names would still pass if the MCP-answer handling regressed. Add after: () => {} (or a timer that never fires) to the stand-in and assert the CLI argv of that second call.
There was a problem hiding this comment.
Fixed in 2c494ec. The stand-in now has clock.after with a deadline that never fires, so the MCP call returns null and takes the no-answer fallback. The test also counts that call and checks the second call's CLI argv (no --allow-write).
|
review-loop: APPROVED at 176e8b5 Whole-PR review of
Fixed during the loop, each with a test:
Rebutted or deferred, with reasons:
Checks at
For branches building on this: |
…amic; a throwing deadline or logger drops only its phase Also tighten two tests so they reach the paths they describe: the chain registration test now runs every phase to its stub, and the MCP no-answer fallback is taken instead of a missing clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
review-loop: APPROVED at 2c494ec (reviewers: gpt-6-astra high, gpt-6.1-sol high) Whole-PR review of |
sahrizvi
left a comment
There was a problem hiding this comment.
Round 2 re-review of 2c494ec (panel: Claude and Codex, codex exec -s read-only; each side reviewed on its own first, then checked the other's findings, and both accept every finding below).
Decision: changes requested. One major is still open.
Most of round 1 is fixed:
- Three of the four parser majors are resolved: quoted words, expanded values and redirections inside the span.
- The merge with main is resolved. The branch contains current main (1.6.1) and merges cleanly. Main's lineage, task-impact, impact-report and report-graph tests are byte-identical and pass. The per-edit column lookup still goes through the CLI with its deadline. Main's integrations tests are all kept, and two were added.
- The sync-throw guard and the phase deadline are fixed.
The four mutation checks I ran each fail their regression test, and a sync throw in a feature's sessionStart, bandLine or bashGate now drops only that feature.
What's open:
- Major (inline): round-1 finding 1 is only partly fixed. Other prefix and launcher options still produce a static dbt run that never starts:
command --help dbt run,env if dbt run,uv run -- --project x dbt run,nohup --help dbt run. - Minor (inline):
within()leaves the phase's rejection unhandled when$.clock.afterthrows. Edge case; it needs a throwing clock. - Minor (inline): a backslash at the end of the line gives offsets past the end. Edge input.
- Minor (inline): the setting descriptions still promise
/allow-scanand push blocking. Unresolved; see the thread. - Minor: no version bump and no CHANGELOG entry. See the combined comment.
Suites at head vs main:
claude plugin validateand--strict: both pass at both; the only warning is main's missing icon.claude plugin test: 350 pass at head, 307 at main.tests/*.sh: 7/7 pass at both.pytest: 65 pass at both.
A live pane check stopped at the login screen with an isolated HOME, so lineage parity rests on main's unchanged lineage suite passing at head.
| firstAssignment = null | ||
| continue | ||
| } | ||
| if (unquoted && word.text.startsWith('-') && prefix !== null && optionsOpen) { |
There was a problem hiding this comment.
Major: prefix and launcher options still produce a dbt run that never starts (Codex; reproduced. This is the part of round-1 finding 1 that is still open)
This branch skips any -… word after command, nohup, exec or time, and only command -v/-V and env -… are refused. A keyword after env is also taken as a keyword. All of these parse as a static run, dynamic: false:
command --help dbt runandcommand -x dbt run: bash prints usage and exits 2 (checked)nohup --help dbt run,exec -x dbt run,time -x dbt runenv if dbt run,env then dbt run,env ! dbt run: env runs a program namedif, so you getenv: if: No such file or directoryand exit 127 (checked)uv run -- --project x dbt runandpoetry run -- --foo dbt run(line 664): after--, the launcher runs--project, but the loop keeps reading options
A gate or rewrite would act on a call that never happens. Suggested fix:
- Accept only the options each prefix really has (
command -p,exec -a NAME/-c/-l,time -p,--for all) and return null for any other option. - After
env, treat the next word as a program name, never as a keyword. - Stop reading launcher options at
--.
There was a problem hiding this comment.
Fixed in ac0d379 and 2c98769, following your suggestion. The parser now reads only options it knows. When it is unsure, it returns no invocation.
- Prefix words: a table per prefix (
PREFIX_OPTIONS). The only options read arecommand -p,exec -l,exec -a NAMEandtime -p, plus--aftercommand,exec,nohuporenv. Any other option gives no invocation:command --help,command -x,command -pv,nohup --help,exec -x,time -x,time -f. In 2c98769,exec -cwas also dropped, because it clears the environment, so theDBT_*assignments in front of it are not what dbt sees. Our own review gate found that one. - Keywords as program names: after a prefix command or an assignment, a keyword is a program name.
env if dbt run,env ! dbt run,nohup ! dbt runandX=1 if dbt rungive no invocation. So doescommand/execafterenv/nohup.timeis the exception, because the externaltimeexists (X=1 time dbt run,nohup time dbt run). - Launchers: each launcher's
runnow has its own option table (RUNNER_OPTIONS), and any other option gives no invocation, including help and version.--ends the launcher's options, and the next word must be dbt. Souv run -- --project x dbt run,poetry run -- --foo dbt run,uv run --ansi dbt runandpipenv run -q dbt rungive no invocation.
Every input above is a case in dbt-command.test.ts: "a prefix or launcher option outside its grammar…" and "a keyword where it is a program name…". The supported-input contract at the top of dbt-command.ts lists these rules, to help calibrate further exotic-input findings.
There was a problem hiding this comment.
Not resolved, narrowed. Every input from this thread now gives [], and so do exec -c, env -i, command -pv and the unknown launcher options. Four prefix forms still report a static run for a line that never starts dbt: X=1 time DBT_TARGET=prod dbt run and exec exec dbt run, exec -a $NAME dbt run, time -p -p dbt run, and command -p dbt run. Details and a rule that closes the class are in the round-3 review's inline comments.
| settled = true | ||
| resolve(value) | ||
| } | ||
| $.clock.after(ms, () => settle(null)) |
There was a problem hiding this comment.
Minor: a throwing deadline leaves the phase's own rejection unhandled (Codex; reproduced; edge case)
bounded() now catches a limit that throws, but within() throws from $.clock.after before it reaches work.then(settle, …). If the phase's work then rejects, nothing handles that rejection. Reproduced: with $.clock.after throwing and the work rejecting with rewrite failed, within throws clock failed and Bun also reports unhandledRejection: Error: rewrite failed. The gate after it still runs, so the call itself is fine. The new test only uses work that resolves.
Fix: attach work.then(settle, () => settle(null)) before calling $.clock.after, or wrap the after call in try/catch.
There was a problem hiding this comment.
Fixed in ac0d379. within() now attaches work.then(settle, () => settle(null)) before it calls $.clock.after. The new test checks that the rejection handler is in place before the clock is called. It fails on the old order.
There was a problem hiding this comment.
Resolved at d563dce. within() attaches work.then(settle, () => settle(null)) before $.clock.after. I reverted the two lines, and the new test fails ("within handles the work's rejection…"); restored, it passes. A throwing clock now rejects within() with the clock's error. tool-chain's attempt catches that, as its "a deadline or a logger that throws" test shows.
| if (c === '\\') { | ||
| quote() | ||
| text += line[i + 1] ?? '' | ||
| i += 2 |
There was a problem hiding this comment.
Minor: a backslash at the end of the line gives offsets past the end (Claude; Codex agrees; edge input)
With a backslash as the line's last character, i += 2 goes past the end, and the word's end, end and subcommandEnd come out as line.length + 1. For example, parseDbtCommand('DBT_TARGET=x dbt test\\') gives subcommandEnd 23 on a 22-character line. A feature that inserts --defer at subcommandEnd would produce dbt test\ --defer, which bash passes as the single word test --defer (checked with printf). Clamping the offset is not enough, because the inserted space would still be escaped. Treating a trailing backslash as an unreadable line fixes both problems.
There was a problem hiding this comment.
Fixed in ac0d379. A backslash as the last character now makes the line unreadable, so it gives no invocation, as you suggested, and no offset can pass the end. Tests: DBT_TARGET=x dbt test\ and dbt run \ give []. A backslash-newline continuation still parses.
There was a problem hiding this comment.
Resolved at d563dce. dbt run \ and dbt run -t prod\ give []. A backslash-newline continuation (dbt run \⏎--target prod) still parses, with target prod.
|
Round 2: findings not tied to a diff line, and nits (Claude + Codex, at 2c494ec; goes with the review above) Round-1 findings that had no diff line
Nits
Checks
|
…d settings The dbt command parser now reads only the options each prefix word has (command -p, exec -c/-l/-a NAME, time -p, and -- after command, exec, nohup and env) and only known launcher options; anything else gives no invocation, since what runs is not known. A launcher's -- ends its options, a keyword after a prefix command or an assignment is a program name, and a trailing backslash makes the line unreadable, so no offset passes its end. Each case has a regression test. within() handles the work's rejection before setting the deadline, so a throwing clock leaves no unhandled rejection. The five settings now say they are not used yet, since no feature reads them in this version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r option tables `DBT_TARGET=prod exec -c dbt run` reported target prod, though exec -c clears the environment dbt starts with; exec -c now gives no invocation. Each launcher's run now reads only its own options, so an option one launcher has and another rejects (uv run --ansi) gives no invocation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reply to the round-2 notes (#30 (comment)). Fixes are in ac0d379 and 2c98769.
|
|
review-loop: APPROVED at 2c98769 (reviewers: gpt-6-astra high, gpt-6.1-sol high) |
# Conflicts: # plugins/altimate-code/hooks/integrations.tsx
|
review-loop: APPROVED at d563dce (reviewers: gpt-6-astra high, gpt-6.1-sol high) |
sahrizvi
left a comment
There was a problem hiding this comment.
Round 3 re-review of d563dce: changes requested. Panel: Claude (lead) and Codex. Codex reviewed on its own first, then each side checked the other's findings. Every finding below was reproduced in bash 3.2 and uv 0.9.17, with a stand-in dbt on PATH.
R1 is narrowed but not resolved. All ten round-2 forms now give no invocation, and so do the new probes: env -i, env -u, env -S, env X=1 -- dbt run, exec -c, command -v, nohup --help, uv run -- --project x dbt run and the other unknown launcher options. The tables are the right approach. Four prefix forms still report a static dbt run (with a literal target and select) for a line that never starts dbt. Each one has an inline comment:
timeorexecused as an external program reopens assignment and prefix parsing:X=1 time DBT_TARGET=prod dbt runandexec exec dbt run -t prod(major, Codex).- The value of
exec -ais skipped even when it holds an expansion:exec -a $NAME dbt run -t prod(major, Codex). time -pis accepted more than once:time -p -p dbt run(major, Codex).command -psearches only the default system PATH, so a venv,~/.local/binor Homebrew dbt is not found:command -p dbt run -t prod(major, Claude; Codex agrees).
A rule that would close this class: after env, nohup, exec, or time used as an external program, accept only an unquoted dbt or launcher word as the program, with no NAME=value, keyword or builtin. Also treat a prefix-option value that holds an expansion as unreadable, and drop command -p.
Minors (inline, none blocking alone):
- uv option values and option conflicts.
uv run --with --help dbt runanduv run --locked --frozen dbt runreport runs that uv rejects with a usage error. Codex rated both minor. - The uv table covers 30 of uv 0.9.17's 77
runoptions. Common ones such as--all-groupsand--only-groupnow give no invocation where round 2 gave one. This fails open.
Resolved since round 2:
- R2:
within()handles the rejection before the clock is called. Reverting the order fails the new test. - R3: a trailing backslash now gives
[]. - The settings descriptions say "Not used yet". Nothing reads the settings.
- The merge of main (1.7.0, #22) keeps
startReviewNoticesand main's integrations behaviour.
Checks at d563dce (main cc02d3b in brackets):
claude plugin validateand--strictpass [pass].claude plugin test: 366 pass, 0 fail [319].tests/*.sh: 7/7 [7/7].- pytest: 65 pass [65].
Nits and the version note are in the PR comment.
| if (unquoted && (KEYWORDS.has(word.text) || WRAPPERS.has(word.text))) { | ||
| // After a prefix command or an assignment, a keyword is the name of a program to run (`env if`); | ||
| // only `time` is one that exists (`X=1 time dbt run` runs the external time). | ||
| if (KEYWORDS.has(word.text) && word.text !== 'time' && (wrapped || firstAssignment !== null)) return null |
There was a problem hiding this comment.
Major: time (or exec) run as an external program still reopens prefix parsing (Codex; reproduced)
| Input | Parser | bash |
|---|---|---|
X=1 time DBT_TARGET=prod dbt run -s orders |
dbt run, target prod, select [orders] |
time: DBT_TARGET=prod: No such file or directory |
env time DBT_TARGET=prod dbt run / nohup time DBT_TARGET=prod dbt run |
dbt run, target prod |
same error |
exec exec dbt run -t prod |
dbt run, target prod |
exec: exec: not found |
After an assignment, or after env/nohup, time is /usr/bin/time. The external time treats the next word as the program, so DBT_TARGET=prod is the program's name and not an assignment. Setting prefix = 'time' here clears firstAssignment and re-reads the next word as an assignment. In the same way, exec runs only an external file, so exec exec and exec command (on Linux, where there is no /usr/bin/command) fail. The guard on the next line covers env/nohup but not exec.
Fix: once a prefix runs an external program (env, nohup, exec, or time after an assignment or a prefix), give [] unless the next word is an unquoted dbt or launcher word.
| // sees, and `--help` prints usage, so none of them runs dbt as written. | ||
| const takes = PREFIX_OPTIONS[prefix]?.[word.text] | ||
| if (!takes) return null | ||
| if (takes === 'value') i++ |
There was a problem hiding this comment.
Major: an exec -a value that holds an expansion is skipped as if it were one word (Codex; reproduced)
exec -a $NAME dbt run -t prod -s orders gives dbt run, target prod, select [orders], dynamic false. With NAME unset or empty, bash drops the empty unquoted word. Then dbt becomes the -a value and run is the program: exec: run: not found. A value that splits (NAME='a b') shifts the words the same way. exec -a "$NAME" dbt run is fine (it runs dbt).
Fix: when takes === 'value' and the value word is dynamic and unquoted, give [] (or mark the invocation dynamic and leave the binary unknown).
| command: { '-p': 'flag' }, | ||
| // `exec -c` clears the environment dbt starts with: what it sees is not known, so it is not read. | ||
| exec: { '-l': 'flag', '-a': 'value' }, | ||
| time: { '-p': 'flag' }, |
There was a problem hiding this comment.
Major: time -p is accepted more than once (Codex; reproduced)
time -p -p dbt run -t prod -s orders gives dbt run, target prod. bash's time keyword takes -p once, as the word right after time. The second -p is the command: -p: command not found, and dbt never starts. Also, time -p -- dbt run already gives [], which is correct, since bash runs -- as a command.
Fix: accept a single -p only as the word right after time.
| const WRAPPERS = new Set(['command', 'exec', 'nohup', 'env']) | ||
| // The options each prefix word has: whether one takes a value. Any other option gives no invocation. | ||
| const PREFIX_OPTIONS: Record<string, Record<string, 'flag' | 'value'>> = { | ||
| command: { '-p': 'flag' }, |
There was a problem hiding this comment.
Major: command -p does not find a dbt installed the usual ways (Claude; Codex agrees)
command -p dbt run -t prod gives a static run with target prod. command -p searches only the default PATH from getconf PATH: /usr/bin:/bin:/usr/sbin:/sbin on macOS, /bin:/usr/bin on a typical Linux. So a dbt in a venv, in ~/.local/bin, from Homebrew or in /usr/local/bin is dbt: command not found. Reproduced with a fresh bash -c. (bash's command hash can find it after an earlier ordinary lookup in the same shell, but a Bash tool call starts a fresh shell.)
Fix: drop command -p from the table.
| const options = RUNNER_OPTIONS[runner]! | ||
| // Repeated short flags (`-qq`, `-vv`) are read when the launcher has the single one. | ||
| const repeated = /^-([a-z])\1+$/.exec(flag) | ||
| if (options.values.has(name)) i += flag.includes('=') ? 1 : 2 |
There was a problem hiding this comment.
Minor: a launcher option that takes a value accepts another option as the value (Codex; reproduced)
uv run --with --help dbt run -t prod -s orders gives binary uv run --with --help dbt, run, target prod. uv run --with -- dbt run also gives a run. uv 0.9.17 exits 2 for both: a value is required for '--with <WITH>' but none was supplied.
Fix: a separate value word that starts with - gives []. This is minor because uv stops with a usage error and nothing runs.
| // Repeated short flags (`-qq`, `-vv`) are read when the launcher has the single one. | ||
| const repeated = /^-([a-z])\1+$/.exec(flag) | ||
| if (options.values.has(name)) i += flag.includes('=') ? 1 : 2 | ||
| else if (!flag.includes('=') && (options.flags.has(flag) || (repeated && options.flags.has(`-${repeated[1]}`)))) i++ |
There was a problem hiding this comment.
Minor: option conflicts and repeats that the launcher rejects still give a run (Codex; reproduced)
uv run --locked --frozen dbt run -t prod, uv run --frozen --frozen dbt run and uv run -q -v dbt run each give a static run. uv exits 2 with cannot be used with or cannot be used multiple times. It is minor because modelling clap's conflict rules goes beyond a table, and nothing runs. The cheap part is to reject a repeated long flag.
| // the only launcher options read: an unknown one may take a value, so which word runs is not known. | ||
| const UV_RUN_FLAGS = ['-q', '--quiet', '-v', '--verbose', '--isolated', '--offline', '--refresh', '--native-tls', '--no-config', '--no-cache'] | ||
| const UV_RUN_VALUES = ['--with', '--with-editable', '--with-requirements', '--python', '-p', '--directory', '--project', '--index', '--index-url', '--env-file'] | ||
| const RUNNER_OPTIONS: Record<string, { flags: Set<string>; values: Set<string> }> = { |
There was a problem hiding this comment.
Minor: the uv table has 30 of uv 0.9.17's 77 run options, so common ones now give no invocation (Claude; Codex agrees)
Missing options include --all-groups, --only-group, --no-group, --no-default-groups, --upgrade, --reinstall, --no-progress, --color, --compile-bytecode, --no-editable, --default-index, --extra-index-url and --find-links. At round 2, uv run --all-groups dbt run -t prod was reported; now it gives []. That is the intended unsure direction (fail-open), so it doesn't block. But a future gate or rewrite will skip these runs.
Suggestion: build the tables from uv run --help (and poetry run --help) of the supported versions. Keep the semantic exclusions (--help, --version, --module, --script, --gui-script) giving []. Safe in a follow-up.
|
Round 3 (d563dce): findings not tied to a diff line, and nits. Panel: Claude and Codex. The formal review above has the four majors and three minors inline. Nits
Checked and fine
Your |
sahrizvi
left a comment
There was a problem hiding this comment.
Approving d563dce92c (Claude + Codex panel), superseding the round-3 request for changes at the same head.
The round-2 findings are all resolved. The one item left from round 3 is the prefix class: four forms (X=1 time DBT_TARGET=prod dbt run, exec -a $NAME dbt run, time -p -p dbt run, command -p dbt run) still parse as a static dbt run for a line that never starts dbt. On reflection it does not block this PR: each form is exotic, each fails in the shell before dbt runs, and nothing acts on the parser's answer yet because the gates are not built. Please take the closing rule from the round-3 review (#30 (review)) as a follow-up before the first gate lands: after env, nohup, exec or time as an external program accept only an unquoted dbt or launcher word, treat a prefix-option value holding an expansion as unreadable, drop command -p, allow time -p once.
The three minors (uv option forms uv itself rejects, and the uv table covering 30 of 77 run options, which fails open) and the nits stay as noted. Merge order unchanged: after #23 ships as 1.8.0, rebased on it.
What does this PR do?
Sets up the plugin side of the dbt Power User features. Separate follow-up PRs fill in each feature.
hooks/tool-chain.ts): one ordered pipeline around every tool call. A Bash call goes through bashRewrite, bashGate, the call, then bashAfter. An edit runs editAfter and readOrEditAfter, and a read runs readOrEditAfter. When a gate denies a call, nothing after it runs. A failed or refused call runs no file phases.hooks/features/*): nine feature modules (cost, cte-profile, defer, docs, health, runs, sql-graph, to-model, comments), registered in a fixed order infeatures/index.ts. Each one is a stub for now, so a call passes through unchanged.hooks/dbt-command.ts) and analtimate-cli.tshelper that runs altimate-codetoolcommands. The parser has a written supported-input contract at the top of the file. It reports an invocation only when the static text shows dbt will start. Each prefix word (command,exec,nohup,env,time) and each launcher'srun(uv,uvx,poetry,pdm,pipenv,hatch,rye) has its own option grammar. An unknown option, a keyword in program position, an unreadable line, or a value that needs expansion gives no invocation, or marks itdynamic, rather than a guess.hooks/status-line.ts): joins the features' parts in their fixed order.tool.callhook stays inlineage.tsx. What moves isrunTooland its helpers (within,textOf,persistedPath,mcpServer), which go toaltimate-cli.tsand are shared with the features. The features' turn and session calls run from lineage's and the band's hooks. Lineage behavior matches main 1.6.1, with the per-edit column lookup through the CLI, and main's lineage and task-impact tests pass unchanged.plugin.jsonuserConfigadds these settings:maxScanBytes,healthBlocksPush,healthConfigPath,commentsPollSeconds,commentsInContext.This depends on the altimate-code tools in AltimateAI/altimate-code#1736.
Changelog
How did you verify your code works?
claude plugin test plugins/altimate-code: 354 pass, 0 fail across 11 files. This includes the lineage graph and layout suites, the new tool-chain and dbt-command suites, and a whole-plugin test that a Bash call passes through unchanged while every feature is a stub.Cost side effects
None. The features are stubs and make no model calls, warehouse queries or cloud requests.
Demo video
Demo video (hosted)
F.mp4 — watch on Notion (Altimate workspace; recorded from the approved head of this PR).
🤖 Generated with Claude Code