Repository navigation
feat: /savings, a Databricks savings check beside the chat (1.9.0) - #35
shreyastelkar wants to merge 65 commits into
Conversation
- `hooks/features/savings.tsx`: `/savings [connection]` runs altimate-code's `finops_databricks_savings` tool through `runTool` with `ALTIMATE_TELEMETRY_DISABLED=true` and draws the findings, evidence and monthly ranges in a pane beside the chat; nothing enters the conversation - the plugin holds no detector logic: altimate-code measures the facts and altimate-core decides the savings - refusals are explained with the step that fixes them: no altimate-code, an altimate-code without the tool, no Databricks connection, a connection that is not a SQL warehouse, a refused system-table query - `runTool`/`runAltimate` take an optional environment for one CLI run - registered in `features/index.ts` like the other features; README, PRIVACY, SKILL tool table, CHANGELOG, version 1.8.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iew fixes - each finding gets "Draft the fix": it fills the prompt box with the change to make (serverless, or the smaller `cluster_size`) for Claude to draft against the repo's bundle or Terraform, or as `databricks warehouses edit` JSON; nothing is sent until the person presses Enter - editing a bundle, `resources/*.yml` or Terraform file, or running a `databricks` warehouses/clusters/bundle/jobs command, shows a band: the flagged warehouse's saving when the file names it, else a once-a-session offer of /savings; Run /savings and Hide buttons; nothing runs by itself - the savings run uses `--no-daemon`: a reused tool daemon keeps the environment it started with, so the telemetry opt-out could be lost - a non-Databricks connection and a warehouse not yet in `system.compute.warehouses` get their own recovery steps - PRIVACY: change-log entry and revision date Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… saved - reads altimate-code's combined report: idle all-purpose clusters and jobs on all-purpose compute beside the two warehouse checks, each with its own evidence lines and Draft the fix request (auto-termination, a job cluster), and names any check the connection could not read - what if: each flagged warehouse gets a row of buttons (serverless and every smaller size, marked when too small); pressing one says what it would cost a month and whether its cores cover what its queries need - saved since: the first run that flags a warehouse keeps its size, type and weekly cost in the local plugin store; a later run that finds it resized says what it cost a month then and now - README, CHANGELOG and PRIVACY describe the four checks and the local store Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ength - No findings with a check skipped says which checks ran, in the pane and the toast. - Draft the fix with no prompt box says what to ask Claude, instead of pointing at text the pane does not show. - The band offers /savings for any `databricks` warehouses/clusters/bundle/jobs command, also after `cd … &&` or an environment assignment; its Run button never starts a second run. - A finding is named in a file only as a whole word (`dev` is not in `devices`). - Days come from the report's window, not a fixed seven; the refused-query advice names `system.lakeflow`; a query cut at 10,000 rows is named in the pane (view shape bumped). - Tests for each, including that a second run keeps the first baseline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fers - A what-if choice that costs more than now says how much more, in the warning colour. - The band offers the check for Terraform only when it names a `databricks_` resource, and names a flagged job by its name, not its numeric id. - The running pane says Databricks starts the SQL warehouse if it is stopped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The pane counts the workspaces it read, names each finding's workspace when there are several, and the fix request names it. - A failed run also comes as a notice, for a terminal too narrow for the pane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…no answer" - `runTool` hands back the CLI's raw output as `raw` when it is not the answer object. - /savings reads an old CLI's usage banner as "this altimate-code has no Databricks savings check". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review of the latest commit ( Files Reviewed (2 files)
Previous Review Summaries (12 snapshots, latest commit f1d0d16)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit f1d0d16)Status: 1 Issue Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (1 file)
Fix these issues in Kilo Cloud Previous review (commit 36ad2fd)Status: No Issues Found | Recommendation: Merge Incremental review of Files Reviewed (2 files)
Previous review (commit a35bb98)Status: No Issues Found | Recommendation: Merge Incremental review of The reordering holds: the generation re-check runs before Files Reviewed (2 files)
Previous review (commit 6b4f911)Status: 2 Issues Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (1 file)
Fix these issues in Kilo Cloud Previous review (commit e15f923)Status: 2 Issues Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (5 files)
Fix these issues in Kilo Cloud Previous review (commit 8212734)Status: 2 Issues Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit e749896)Status: 2 Issues Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit f5867bc)Status: 2 Issues Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous review (commit 90ec299)Status: 1 Issue Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (4 files)
The rest of the incremental range is Previous review (commit 4fba945)Status: 1 Issue Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Previous review (commit b60c294)Status: 1 Issue Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (5 files)
Fix these issues in Kilo Cloud Previous review (commit ca44a26)Status: 2 Issues Found | Recommendation: Address before merge Incremental review of Overview
Issue Details (click to expand)SUGGESTION
[Snapshot truncated.] Additional previous summary content was truncated to keep this comment within platform limits. Reviewed by deepseek-v4.1-flash-1017 · Input: 118.1K · Output: 11.5K · Cached: 692.5K |
`/savings` set only `ALTIMATE_TELEMETRY_DISABLED`, which still lets the CLI send its one-time telemetry opt-out event and fetch the model catalog and ripgrep. The run now also sets `ALTIMATE_ASSESSMENT_MODE=true`, so the Databricks warehouse is the only host it reaches. An altimate-code without assessment mode ignores the variable. PRIVACY.md and the changelog state this, the window the cost covers, and what is not assessed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…they show Each amount was rounded on its own: whole dollars from $100, cents below. A line comparing $125.50 with $19.05 read "$19.05 a month instead of $126, $106 less". `compared()` formats both amounts and their gap at one precision, to the cent when either is under $100, and takes the gap from the amounts it shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lagged setting The cluster request named `databricks clusters edit <id> --json`, which the CLI rejects (cluster_id and spark_version go in the JSON) and which replaces the whole configuration. The job request named `databricks jobs reset <id> --json`: `reset` takes no id and overwrites every job setting. They now name `clusters update --json` with an update mask, and `jobs update --json` with job_id and the whole tasks list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wording `compared()` used whole dollars whenever both amounts were $100 or more, so $300.40 against $300.20 read "$300 instead of $300, $0 less". It now keeps cents when the gap itself is under $100. The jobs draft no longer says `jobs update` replaces each field it names: it changes only the settings it is given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nged task whole A task given to `jobs update` replaces that whole task, so a draft holding only the new cluster would drop the task's notebook, libraries and retries. The draft now asks Claude to start from `databricks jobs get <id>` and give each changed task whole, with only its cluster changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`runTool` keeps main's first-line text for a failure with no answer object and this branch's `raw` (the whole output); main's test now expects `raw` too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…first line Since `runTool` returns only the first line of a failure's output as text, an altimate-code too old for `tool run` (exit 1, its banner and usage on stderr) read as a generic failure. The pane now checks the whole output (`raw`) for the usage and shows "has no Databricks savings check". The test feeds the old CLI's real output through the CLI helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ichandann
left a comment
There was a problem hiding this comment.
Reviewed bbe331096e24fc79e672fa39a91bf1722bdd95ca. Requesting changes for the unmet assessment-mode compatibility boundary below, which is also identified as a pre-merge dependency in the PR body.
The new savings flow correctly passes both environment switches, uses the CLI directly with --no-daemon, rejects connection-name flag injection, keeps findings in the pane, and fills rather than submits Draft the fix. I read the full changed source and tests, the integration wiring, privacy text and prior review responses. The documented CLI commands preserve fields for cluster/job changes; the cosmetic/unused-field and band-matching suggestions are non-blocking. Cross-workspace baseline-key scoping remains a follow-up.
Validation: the complete plugin test run finished with 506 passes and one failure in the unchanged 500-node lineage timing assertion (368 ms against a 300 ms limit), 70.55 s wall. An isolated actual-base run of that unchanged file passed all 30 tests, with that case at 75 ms; this is not evidence that the full base suite passes or that no regression exists. Both strict plugin validators and both shell suites pass. A separate focused copy passed all 39 existing savings tests and two new controls, with one expected negative failure: an unsupported CLI is invoked before the compatibility refusal (11.98 s wall on repeat). The probe mocks process creation; the old release's opt-out path was confirmed by source inspection, not a live telemetry request. The engine also logs missing ui.status implementations in the reused test helper; the negative assertion itself is the observed invocation count (expected 0, actual 1).
Current GitHub shell/security/review checks report success; no required contexts are reported. I did not connect to Databricks, replay the private recording, install/run an old CLI, validate production savings, send telemetry, or test a live Claude model turn. The dependency on code #1762/core #785 and a compatible released CLI remains material. No author source edit, commit, push, merge or deployment was performed.
Reviewed by Codex on behalf of @ichandann.
…altimate-code Up to 0.12.11 altimate-code has neither the savings tool nor assessment mode, so its `tool run` sent the one-time telemetry opt-out event before failing, while the pane says nothing is sent. `/savings` now runs `altimate --version` first (measured on 0.12.11 against a local telemetry listener: `--version` sends nothing; `tool run` sends the opt-out event) and starts the check only on 0.12.12 or later, or a source build (`local`). A version it cannot read is refused. README, CHANGELOG and PRIVACY.md say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@ichandann Thanks for the review. The compatibility boundary is now enforced before launch, in 38066b2 (details on the inline thread):
The remaining dependency is unchanged. The minimum gets set to the published altimate-code release that carries the tool and assessment mode before this merges, and the PR is held until then. I did not change the cross-workspace baseline key or the non-blocking suggestions in this round. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ichandann
left a comment
There was a problem hiding this comment.
Re-reviewed 5f52bdb2ac70bfb3dd46e7303406d7c40efd5efa against the previous reviewed head bbe331096e24fc79e672fa39a91bf1722bdd95ca. The numbered-release preflight now addresses the original normal-install launch path: 0.12.11 is refused before tool run, with both environment switches on the version probe. The serverless scope wording also now matches the implementation. Requesting changes for the remaining unknown-source-build bypass below.
Independent validation: all 509 plugin tests passed (37.72 s wall), and both strict validators passed. An isolated exact-head overlay ran the 41 savings tests plus three independent controls: 43 passed, one expected negative failed because local launches the unsupported tool (9.61 s). A separate copy changing only the unknown-local guard passed all three independent controls (1.00 s). Earlier tests' ui.status-helper logs are retained; the negative result is the observed process count, not a UI-helper exception. The old source's version fallback and opt-out path were inspected; no actual old CLI or telemetry sink was run by this review.
All current GitHub checks are successful; no required contexts are reported. The published assessment-compatible CLI dependency and minimum-version pin remain an explicit owner hold. This review does not clear code #1762's missing-core-export/cost-gate findings, core #785's owner/spec gate, actual savings accuracy, a private recording, model turns or live Databricks/telemetry. No author source edits, commits, pushes, merges or deployments were made.
Reviewed by Codex on behalf of @ichandann.
…t mode A source build prints `local` for `--version` whatever its age, so an old checkout without assessment mode passed the check and its `tool run` could still send the one-time telemetry opt-out event. `local` is now refused like an unreadable version, with a message to use a released altimate-code; a build made with the release script carries its version. README, CHANGELOG and PRIVACY.md say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `xargs` options that take a value (`-n 1`, `-I {}`, `-P 4`) are skipped with it, so the command after
them is read again.
- A shell's `-c` script (`bash -c 'databricks bundle deploy'`) is read as a line of its own, as the push
check reads it.
- A job figure the answer leaves blank reads "?", not "under 0.1": `tenths` uses the same `known` test
as the other figure helpers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`shellScript` in `hooks/shell.ts` gives the script a shell runs from its `-c` option, read from the shell's own options only (a cluster such as `-lc`, `-cx` or `-Ec`, past `-o pipefail`). The push check, its written-files reader, the heredoc reader and the /savings offer all use it in place of four copies of one pattern. So `bash deploy.sh -c x` no longer counts as running `x`, and `bash -cx` and `bash -o pipefail -c` now do. - The /savings reader also knows BSD xargs's `-J`, `-R` and `-S` and the GNU long options that take a value. - `health.test.tsx` imports the shell reader from `hooks/shell.ts`, and the health feature no longer re-exports it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`shellScript` stopped at the value of a cluster such as `-eo pipefail` or `-euo pipefail` and never saw the `-c` after it, so the push check let `bash -euo pipefail -c "git push"` through. Any `-`/`+` cluster ending in `o` or `O` now takes the next word as its value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in main's 1.8.3 and its unreleased fixes (`/clear` keeping comments and health, plugin dbt
runs in their own target folder, the push check's `${...}` and per-call start folder, and more).
- main's newer shell reader goes to `hooks/shell.ts` as before, with this branch's exports and its shared
`-c` rule; the health feature keeps the rest of main's changes.
- `runTool` keeps main's `env` option (it forces the CLI route) and adds `noDaemon`.
- The plugin stays at 1.9.0 over main's 1.8.3; the changelog keeps main's Unreleased and 1.8.3 sections,
and the README keeps main's `altimate-dbt` section before the savings section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ipt runs none - `shellScript` skips one word for every `o` or `O` in a `-`/`+` option cluster, wherever it sits, so `bash -oc pipefail 'git push'` is read as running `git push`. - A `-c` with no script word after it runs no script, so a heredoc fed to it is not read as one (the push check no longer refuses `bash -c <<EOF ... git push ... EOF`, which bash rejects). - The changelog lists main's unreleased fixes under 1.9.0, the version that ships them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m the push check `shellScript` read only the options it knows, so a value-taking option it does not know (`zsh --emulate sh -c 'git push'`, `ksh -R x -c ...`) hid the `-c` and let the push through. When its own reading finds no `-c`, any `-c` after the shell's name now counts, with the word after it as the script, as the push check always read it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the strict reading finds no `-c`, the fallback now matches `-c` only as the push check always did (`/^-[a-z]*c$/`), so a script's own `-check` or `-force` argument is not read as `-c`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Redirections are the calling shell's, so they are dropped with their targets before the options are read: `bash 2>/dev/null -c x`, `bash 2>&1 -c x` and `bash -c >log x` all run `x`. - The any-`-c` fallback applies only past an option this reader does not know (`zsh --emulate sh`, `ksh -R f`), so `bash deploy.sh -c x` runs deploy.sh again, with `-c` as its argument. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tions" This reverts commit e749896.
This reverts commit b2c09da.
…ript from the push check" This reverts commit f5867bc.
…n cluster takes a value; -c without a script runs none" This reverts the `hooks/shell.ts` and test changes of commit 90ec299. Its changelog change (main's unreleased fixes listed under 1.9.0) is kept. The `-c` scan goes back to its 4fba945 rule: a word it does not read as one of the shell's options (a redirection, an option it does not know) ends the scan, so the line shows no note. A missed note is the safe outcome; each wider reading drew new mismatches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…run it beats - The push check and its written-files reader go back to main's own rule for a shell's `-c` script (any `-c` after the shell's name, the word after it as the script), and so does the heredoc reader. They hold `bash 2>/dev/null -c 'git push'` and `zsh --emulate sh -c 'git push'` again. The strict scan, `shellScript`, now serves only the /savings offer, which shows no note for those forms. - A /savings run takes its generation when it is asked for, so a /clear or session end in the same tick, before the scheduled run starts, drops it: a late run never lands in the new conversation. - A skipped check's name and reason, and the limited checks, go through `oneLine`: a non-string reason no longer fails the run, and a reason's control characters never reach the pane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the check running The press took its generation when pressed but checked it only in `runCheck`, after marking the check running, so a /clear in between left the pane on "Checking…" for good and every later /savings said it was already running. The press now returns before anything is marked when a /clear came in between. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e check running The press re-checks for a /clear at each step: before clearing the band, before opening the pane and again after reading whether a check is running, so a /clear landing between those steps leaves no stray pane and no check stuck on "running". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… its own -c rule - The command reads the generation before anything is awaited, and returns before marking the check running if a /clear came while it read the busy state, so a /clear while the pane opens drops the run and nothing is left marked running. - The Bash reader's doc says a shell's `-c` script is found from the shell's own options only, and that the push check keeps its own wider rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t writes A run takes its generation once, before its first await, and after every await it checks it again: each atom write is made only while the run is current (checked inside the write), each notice only then, and the baseline reader keeps nothing after a /clear. A dropped run leaves the running flag as the /clear left it. session.end resets the same state as before. A table-driven test fires /clear at each await point of a run in turn (pane open, version probe, tool run, baseline read, baseline write) and checks that nothing is left running, no old report or notice shows, no baseline is kept, and the next /savings runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed inside the write The two writes that mark a /savings check running (the command and a press) check the generation inside the write as every other atom write of a run does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and no "running" answer After the write that marks the check running and after the pane opens, the command checks its generation again. If a /clear came, it opens no pane, schedules no run and says the conversation was cleared, rather than that a check is running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary (for people)
Why: this gives a Databricks user a reason to try Altimate from inside Claude Code. It shows what their workspace could save, on their own machine, with nothing sent to Altimate.
Before → after:
main):/savingsis not a command. Claude Code answers "No commands match /savings"./savings [connection]runs altimate-code'sfinops_databricks_savingstool and opens a pane beside the chat with each finding, its evidence, a monthly range at list price and a Draft the fix button.Who is affected: only people who type
/savings. It needs an altimate-code release that has the tool and assessment mode (see Depends on). With an older CLI the pane says to update, and nothing runs on the warehouse.Also changed for everyone with the plugin: the shell reader the
git pushcheck uses moves unchanged to its own module,hooks/shell.ts, so/savingscan share it. The push check still reads a shell's-cscript exactly as onmain.Not tracked:
mainnow sends anonymous plugin usage events, one per session start and one each time a panel or command opens./savingssends none: neither the command, its buttons nor its pane is counted, so its "Nothing was sent to Altimate" line stays exactly true. README and PRIVACY say so.Details (for agents/reviewers)
What the pane does
workspaces_checkedfield: a workspace with only clusters or jobs and no finding counts too. It names each finding's workspace when there are several. With a CLI that does not report the count, it counts the workspaces of the warehouses and findings.cluster_size, auto-termination, or a job cluster. The request asks Claude to edit the repository's bundle or Terraform. If there is none, Claude writes the JSON for a CLI command that changes only that setting:warehouses edit,clusters updatewith an update mask, orjobs update. Nothing is sent until the user presses Enter, and nothing is applied.$.store, keyed by connection, workspace and warehouse id, with the length of the window its cost covers. A later run that finds it resized shows its observed spend a month before and after the change. The two amounts are billed in different weeks, so one note under the lines says a change in workload moves them too, and the pane never calls the difference saved. Across several workspaces, a warehouse without a workspace id is not compared.databrickswarehouses, clusters, bundle or jobs command. The Bash line is read with the shell reader the push check uses (hooks/shell.ts). Quoted text, comments and heredoc bodies are data, a shell's-cscript is read, and the program is found past the same leaders (sudo -u x,nice -n 10, assignments) and pastxargswith its options. So a line that only names the CLI (echo databricks bundle deploy, a commit message, a heredoc that writes a script) offers nothing. A Terraform file that is not Databricks config offers nothing either. It names the flagged resource's saving if the file mentions it. Otherwise it offers/savingsonce a session.Cost
/savingsruns three queries on the connection's SQL warehouse, which Databricks starts if it is stopped and bills while it runs. The command says so. The tool refuses to run withoutconfirm: true, and the plugin passes it only when the person ran the command. A plugin, the SDK or a schedule gets a refusal and no run. The CLI stops its own check after nine minutes and cancels any query still on the warehouse.Privacy
The tool runs with
ALTIMATE_TELEMETRY_DISABLED=true,ALTIMATE_ASSESSMENT_MODE=trueand--no-daemon, always through the CLI (the MCP server would drop both). Assessment mode (AltimateAI/altimate-code#1762) also stops the CLI's own startup contacts: the one-time telemetry opt-out event, the model catalog and the ripgrep download. The warehouse is then the only host the run reaches. A reused tool daemon would not see the opt-out, which is why the run uses--no-daemon. The plugin adds no usage event for/savings, and its skill tells Claude to ask the user to type/savingsrather than call the tool itself, so the tool is not run through a path without these switches. The findings stay in the pane until the user sends a Draft the fix request.PRIVACY.mdhas a section for the check, a line under Plugin usage events saying/savingssends none, and a change-log entry.Merge with
mainmainis merged in up to 1.8.3 and its unreleased fixes, keeping its content and versions: the dbt helpers, the plugin usage events and the/clearand health fixes./savingsships as 1.9.0 on top, and the changelog keepsmain's Unreleased section above it. The savings feature runs before the dbt helpers in every phase, each in its owntry.The shell reader (
simpleCommands,leaderEndand their helpers) moves fromhooks/features/health.tsxtohooks/shell.ts, taken frommain's latest version.health.tsxnow differs frommainonly by importing it from there, so the push check and its written-files reader keepmain's-crule (any-cafter the shell). One new helper,shellScript, serves only the/savingsoffer. It reads the script from the shell's own options (bash -cx,-o pipefail -c,-euo pipefail -c), and any word it does not take for one of them ends the scan, so the line shows no note. That covers a redirection, an option it does not know, and-oc pipefail. A missed note is the safe outcome, and each wider reading drew new mismatches.health.test.tsxpasses, with a new case showing the push check still holdsbash 2>/dev/null -c 'git push'andzsh --emulate sh -c 'git push'.Validation (at 34e210d)
claude plugin test .inplugins/altimate-code: 1400 of 1401 pass at f1d0d16 on a clean copy; at 34e210d the savings and health files pass, 218 of 218. The one failure ismain's timing test inruns.test.tsx("a dbt call that starts while another call reads its artifact"), in a file this PR does not touch. The/savingstests use the real--jsonoutput of a full run as their fixture, with ids replaced. They cover the pane, each kind of evidence and fix request, what-if, the observed spend after a resize (both directions, never "saved"), the workspace count (a second workspace with no findings, and invalid counts), the skipped-check note, the band and the failure messages.hooks/usage.test.tsxruns/savings, Draft the fix, a what-if and Run again, and asserts noreport-eventcall. As a control, the same fake CLI records the next counted panel. Removing the workspace count, or adding a usage event to/savings, each fails its test (checked). Tests also cover:xargsoptions, shell-cscripts, comments, heredoc bodies, substitutions, shifts;bash tests/*.sh: all 8 pass.main) after each round of fixes. Its P1s and P2s are fixed. The later wider readings of-c(a fallback for unknown options and redirections) were reverted by decision. The P2 at 1ccb810 is fixed with a test: Run again pressed in the same tick as a/clearcould leave the pane on "Checking…". A/clearnow drops a run it beats, whether/savingsor Run again started it, and a skipped check's reason is cleaned and safe for a non-string. The remaining item is the version placeholder below. The reviews from 1ccb810 to 34e210d found no P0 or P1. A table-driven test fires/clearat each await point of a run (pane open, version probe, tool run, baseline read, baseline write) and checks that nothing is left running, no old report shows and the next/savingsruns. The one P2, at 1ccb810, is fixed; the rest were P3.claude plugin validate --strict .passes.claude plugin validate --strict ./plugins/altimate-codereports 6 type warnings incost.test.tsx,runs.test.tsx,lineage-graph.tsandusage.test.tsx. All are in code frommain, and an export oforigin/mainreports the same 6 on this Claude Code (2.1.329).tsc --noEmitagainst the generated plugin types shows the same 7 errors asorigin/main(all inmain's tests andlineage-graph.ts) and none in this PR's code.Depends on
The tool and assessment mode from AltimateAI/altimate-code#1762, in a released altimate-code. That PR also adds the
workspaces_checkedcount./savingsrunsaltimate --versionfirst, which starts no telemetry. It does not start a CLI older thanSAVINGS_MIN_ALTIMATE_CODE(hooks/features/savings.tsx) for the check, and says to update instead. Measured on 0.12.11 against a local telemetry listener:--versionsent nothing, whiletool runsent the one-time opt-out event.The constant is
0.12.12for now, the first version after the latest release. It is a provisional placeholder. Before this PR merges, it is set to the published release that carries the tool and assessment mode, so no release without them passes the check. Until then the PR is held.🤖 Generated with Claude Code