Repository navigation
feat: /savings v2: a slim pane, Snowflake, status line and a local report - #43
shreyastelkar wants to merge 95 commits into
Conversation
… not run, a local report, Snowflake - Status-line entry `savings`: the platforms altimate-code has connections for plus `/savings`, then the monthly range of the kept answer. The last answer per connection is kept in `$.store` for 7 days. The check still runs only when the person asks. - `ui.render` `ToolUse`: one line under a tool call on a warehouse with a kept finding, for `sql_execute` / `sql_explain` (MCP or `altimate tool run`) and `dbt run` / `dbt build` through the target in `profiles.yml`. It reads kept data only and never queries. - Saved since: Draft the fix keeps the resource, its daily cost and the date; a later run says unchanged, `measuring (n of 7 days)`, or the saving measured from billing. - The hosted checks that did not run, named from the catalog with counts from this run, and one button to Altimate. - Share report: one self-contained local HTML page, opened with the OS opener. - Both platforms: `/savings` runs `finops_snowflake_savings` beside the Databricks tool and draws a section for each; one failing leaves the other. - No notice while Claude is working: it waits for the end of the turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ar no longer waits on the kept answers - A drafted fix whose change was seen now reads "changed to X since D: observed spend A a day before, B a day now", with the note that the two weeks were billed separately; it never says "saved". The resized-warehouse line and the Share report page say the same, and lose the success colour. - The pane counts every workspace the CLI read (`workspaces_checked`), as on the base branch. - Reading the kept answers back at session end runs after the end hook returns, so a /clear never waits on the session's root or the store. - The savings and status-line version tests tell the status line's own `--version` check, which main now makes at session start, from the savings check's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d Show all The pane showed every finding with all its evidence, the what-ifs, nine-line lists of checks not run per platform and four buttons, which made it hard to take in and hard to check. Each run now opens slim: one header for the connections checked, the total, the three largest findings across both platforms (by the high end of their monthly range, then the low end, then the name), each on one title line with its first measured fact and Draft the fix, a line counting the smaller findings with their summed range, and how many more checks Altimate runs. Show all opens today's full detail, unchanged, with Run again; Show fewer goes back. Lines stay within the pane's usual width: a long fact is cut at a clause, a long name is shortened. A drafted fix's line stays under its finding. The status line, the notes under tool calls and the Share report page do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y run opens slim - A drafted fix's line shows under the first of the top findings on its warehouse, not once per finding, and a fix whose finding has cleared still shows its line in the slim view. - A run the tool refuses opens slim too, as an answered run and a session end do. - The pane title's comment is back above `paneTitle`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code Review SummaryStatus: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Notes on verification: static review only (tests were not executed). This pass covers Previous Review Summaries (8 snapshots, latest commit d19511c)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit d19511c)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Notes on verification: static review only (tests were not executed). This pass covers Fix these issues in Kilo Cloud Previous review (commit 90bb9fa)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files)
Notes on verification: static review only (tests were not executed). This pass covers Previous review (commit 7a4147e)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (5 files in incremental diff)
Notes on verification: static review only (tests were not executed; running them is out of scope for this read-only pass). This pass covers Fix these issues in Kilo Cloud Previous review (commit 3400980)Status: 7 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (3 files in incremental diff)
Notes on verification: static review only (tests were not executed). This pass covers Previous review (commit 53ef8d3)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files in incremental diff)
Notes on verification: static review only (tests were not executed). This pass covers Previous review (commit 7835790)Status: 5 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files in incremental diff)
Notes on verification: static review only (tests were not executed). This pass covers this PR's own changes after Fix these issues in Kilo Cloud Previous review (commit 251dc70)Status: 4 Issues Found | Recommendation: Optional improvements before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (4 files in incremental diff)
Notes on verification: static review only (tests were not executed). This pass covers the merge Fix these issues in Kilo Cloud Previous review (commit c0bb47f)Status: 3 Issues Found | Recommendation: Optional improvements before merge 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: 112.6K · Output: 24.4K · Cached: 1.5M |
… the rest add, is the total The total counts each resource once, at its largest saving, but the slim view listed findings, so a warehouse's second finding could be one of the three shown or be summed again in the "+N smaller" line, and the lines added up to more than the total. The slim view now shows the three resources with the largest saving, each at the finding the total counts. The total says it counts each resource once, and the "+N smaller findings" line gives what the resources not shown add to the total, or "already in the total" when they are all on resources above. Snowflake capture: $342–$489 total = three shown + $26.76–$38.24 added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n be larger than a shown one A resource's second finding is hidden even when it is larger than the third resource shown, so "smaller" was not always true. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the base branch's review fixes into the multi-platform /savings code and fixes this branch's own three review findings: - From the base: job evidence never prints NaN, "undefined", empty quotes or "(id )"; a run where no check could run says nothing was checked (pane, notice, status line and shared report); the CLI version is read as the status line reads it, and an unreadable one says so; the /savings offer fires only on a databricks command the shell runs; baselines are keyed per workspace; `runTool` sends env and `noDaemon` calls through the CLI; `roundMoney`, `savingsArgs`, the observed-spend note once (pane and report), and the `skipped` doc. `ranOn` stays: the tool-row notes read it here. - A warehouse the answer lists without a cost is remembered with no cost, and a resize where either side's cost is unknown gets no "Observed spend" line, instead of one claiming $0. - `slimTitle` stays within its width when the check's title is long: the name is shortened first, to no fewer than 8 characters, then the title. - A drafted fix replaces the change line of its own warehouse only (same id and workspace), not of another warehouse with the same name. Change lines and fix lines carry the resource and workspace ids. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the base branch's next round into the multi-platform /savings code: evidence figures the answer lacks read "?" (the Snowflake lines here too), ids go into the fix request on one line, the /savings offer also fires on the CLI run with global flags, a binary path, env, sudo or a quoted assignment, a baseline keeps the length of its window, and a preview build is named as one. Run again already starts one run here (the pressed-run guard), so the base's version of that guard is not taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the base branch's next round into the multi-platform /savings code: the skill tells Claude to ask for /savings instead of calling the savings tool itself; a count the answer lacks reads "?" (shared `count` in savings-format); an over-sized finding with no target size asks for a smaller size with no empty quotes; a source build is refused whatever stderr names; a databricks command inside quoted text offers nothing; a fitting size that costs more says "more". The band and Run again keep this branch's own pressed-run guard, so the base's version of it is not taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the base branch's answer to its second bot-review round into the multi-platform /savings code: the Bash offer reads the line command by command (`runsDatabricksCompute`); the version probe reads stderr only when stdout printed nothing and takes a non-zero exit as no version; baselines are not compared across workspaces without a workspace id, and a warehouse listed twice is compared once; what-if rows or choices without their figures are left out; a missing auto-termination reads "?". Here the pressed-run guard also resets on session end, and the skipped-check counter's comment no longer says a check is listed once per workspace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nswer, and keeps fix lines on their own resource - Session start reads the version probe the way /savings does: a source build (`local`), a probe that exits non-zero, or no version lists no connections, whatever a runtime note on stderr names. - Every answer is offered to the store: one the store refuses no longer keeps the next from being saved. - The slim view draws a fix line under a finding only for the same resource id in the same workspace, and lists on its own a fix whose resource is not among the findings shown (not flagged now, or below the top few), instead of dropping it. - Snowflake evidence and fix requests with a figure missing read "?" or ask for the value, never "undefined" (`MAX_CLUSTER_COUNT = undefined`, `WAREHOUSE_SIZE = 'UNDEFINED'`). - A baseline kept without a cost takes the first cost a later run gives while the warehouse is unchanged, so a later resize can still show its observed spend. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the base branch's answer to its third bot-review round into the multi-platform /savings code: the shell-line reader takes every wrapper with its flags' values, assignments and the remaining keywords, ends a command at a backtick and skips heredoc bodies; an answer without a total is no report; a what-if choice without its cores or fit, or a row left with no choices, is left out; the checked line says "1 SQL warehouse" and "1 job". Also here: in one workspace a drafted fix hides its own warehouse's change line by id alone (a finding, and so its fix, can lack the workspace id its warehouse carries; across workspaces both must match), and the session-start source-build test now fails if the source-build check is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's heredoc terminator fix and its handling of answers missing a field: an amount the answer lacks shows "?" (never "$NaN"), a total without its amounts or count is no report, a finding without its name is matched by id, a serverless choice without `fits` is not marked, a warehouse is matched by id in one workspace, and an answer without its connection's name keeps no baselines. Also here, from the multi-platform code's own review: - A finding without `evidence` no longer fails the whole run: the query count, daily cost and fact reads default to no evidence, and the type now says evidence can be missing. - A drafted fix hides only a warehouse's change line: fix lines carry the resource type, so a job's or cluster's fix with the same id leaves the warehouse's line in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's latest bot-review answers. A Bash line that opens a heredoc is not read for the offer. A total missing a figure keeps its report. An amount sent as a numeric string is shown as a number. A serverless choice the CLI marks `fits: false` keeps its warning. A Terraform file that is not Databricks config names no finding. Also here, from the multi-platform code's own review: - A finding the answer gives no amounts for is one with no dollar estimate, as one priced at $0 is. The combined total, the slim view's top three and the row notes then never add or compare a missing figure. Before this, one such finding made the combined headline "? a month" and took a top-three slot. - The shareable report's fit column says what the pane does: only an explicit `fits: false` is "no: queries would queue"; a serverless choice without one has no size to fit. - A drafted fix's line is drawn under a finding only for the same resource type, so a job's fix with a warehouse's id is listed on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's handling of a finding without a title: it is drawn and asked about as
"Savings finding", here in the slim title line, the fact and the fix request too, so the slim view no
longer throws on one.
Also here: when no check could run, the shareable report's subtitle says so ("none of the checks
could run: see why below") instead of "by the checks that ran" and a note that some checks did not
run in full.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An answer whose total lacks its amounts or count now takes its total from its priced findings, each resource once at its largest saving, the way several kept answers are added up. The headline then agrees with the slim view's "+N more" line, and an answer whose findings have no dollar estimate reads "N findings, no dollar estimate" rather than "$0 a month on N resources". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's Bash reader on the shared shell reader (`simpleCommands`): comments are not commands, a heredoc body is skipped while the commands after it are read, a body fed to a shell is its script, and an arithmetic shift is not a heredoc. Also the "Savings opportunity" fallback title and what-if figures read as numbers before the pane formats them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the shared shell reader (`hooks/shell.ts`): the /savings Bash reader finds a command's program with the push check's leader scan (`nice -n 10`, `doas`, a leading redirect) and past `xargs`. Also here, from the bot review: - A figure counts as known only when it is a finite number or a non-blank numeric string, and `count` reuses that test, so a blank, an array or a boolean reads "?" rather than "$0.00". - A finding is priced only when both ends of its range are known; a half range is one with no dollar estimate, never "$0.00–$101", and adds nothing to a recomputed total. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's Bash reader fixes (`xargs` options with a value, a shell's `-c` script read as a line of its own) and `tenths` on the shared `known` test. Also here: the Draft the fix request is priced as the pane is, so a finding missing an end of its range asks with "no dollar estimate" rather than "?–$50.00 a month". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's single rule for the script a shell runs from `-c` (`shellScript` in `hooks/shell.ts`), shared by the push check, the heredoc reader and the /savings offer, and its BSD and long xargs value options. This answers this branch's review notes on `bash deploy.sh -c x`, `bash -cx` and `xargs -J %`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's merge of main (1.8.3 and its unreleased fixes), its shell option-cluster fix (`bash -euo pipefail -c ...` is read as running its script) and main's `altimate-dbt` README section, kept before this branch's savings section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's shell option fix (every `o` in a cluster takes a value; `-c` with no script word runs none) and its changelog, which lists main's unreleased fixes under 1.9.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's shell `-c` fallback: an option the reader does not know no longer hides the script after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's `-c` fallback on the push check's own pattern, so a script's `-check` argument is not read as `-c`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the base branch's `shellScript` reading the shell's own words without redirections, with the any-`-c` fallback only past an option it does not know. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…" names the running check; WSL opens the address with explorer.exe - `/savings <name>` with a name altimate-code's list does not hold runs no check and lists the names it has, instead of running the Databricks tool on it. With the list unreadable it still runs the Databricks tool, but a "not a Databricks one" answer says the connection's kind could not be read. - "Already running", "just finished" and "cleared while it ran" name the check that is running, from its claim, not the one just asked for. - A failure before any connection list is read names one platform only when the run covered one. - On WSL without wslview, the Altimate address goes to explorer.exe as it is. - One helper lets go of a claim, as on the base branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # plugins/altimate-code/hooks/features/savings.tsx
…nection of another kind is refused as such - A name is refused as "no connection named" only when this run read the list itself: with that read failing, the list from session start may predate a connection added since, so the check runs as before. - A listed connection that is neither Databricks nor Snowflake is refused as such, not run as Databricks and blamed on an unreadable list. - Such refusals carry no platform: the report says "The last check did not finish" for them. - "Already running" names the check that holds the claim once the pane opened. - Tests for each, and for the install message when both kinds are connected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e; "run again" is judged against the running check - The version-gate refusal and the failure branch carry no platform unless the list was read and the run covered one, so the report never says a guessed platform's check did not finish. - The "Run /savings X again" hint compares the request with the check that holds the claim once the pane opened, the same one the reply names. - PRIVACY.md's section is "The savings check": it covers Snowflake too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… in the list The version-gate and failure refusals guessed Databricks for a name the list read at session start did not hold (a connection added since): they now name no platform then, and the report files them under none. Tests for both, and PRIVACY.md's section opens with both platforms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…form The failure branch's guard had no test of its own; this one fails if the known-kind condition is dropped from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ichandann
left a comment
There was a problem hiding this comment.
This stack inherits the compatibility blocker and adds a second launch path at interactive session start. I verified that the checked-in gate accepts published v0.12.12. The release lacks both savings tools and assessment mode.
# Conflicts: # PRIVACY.md # plugins/altimate-code/CHANGELOG.md # plugins/altimate-code/README.md # plugins/altimate-code/hooks/features/savings.test.tsx # plugins/altimate-code/hooks/features/savings.tsx # plugins/altimate-code/hooks/task-impact.tsx
…a finding with no check id keeps its own key - Pressing Draft the fix again on a fix whose first draft did not read a setting fills that setting from the row now drafted against; its date and cost stand. A later run alone still never fills one: its read may be the fix. - A finding the answer gives no check id is keyed by its check's title, so two such findings on one resource are counted, ranked and shown as two. - A test runs the published altimate-code 0.12.12 through session start: only `--version` runs, no `warehouse_list` and no savings tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tform's name; a fix line shows once across connections - A connection named but not shown in a readable list is checked as Databricks only as a guess: its busy text, "already running" and notices name no platform, and its refusals are filed under none. A failure before any tool ran names one only when the list says which. - Two connections on one account that both drafted a fix whose finding has cleared list its line once in the slim view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ichandann
left a comment
There was a problem hiding this comment.
The new minimum blocks a plain v0.12.12 version response. This head still misses the base PR's stricter version parser, and both command and session-start paths can accept the older CLI if the output contains a second, newer version. The compatible CLI release remains pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test correct after merging the stacked base Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r` ends - `runCheck`'s cleanup clears the carried-over busy flag a `/clear` left, but only redrew the status line `if (live())`, so the new conversation kept showing `checking savings…` after the earlier check stopped. It now redraws whenever it clears that flag. - Tests: the status line drops `checking savings…` once the carried-over check ends; a wrapper printing `0.12.12` and then an update notice is refused at session start and for `/savings`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `submit_run_on_all_purpose` evidence names who submits the workload (Azure Data Factory, the Jobs API, MLflow, AutoML), and its draft fix points at the submitting pipeline's cluster setting; nothing in Databricks itself changes - The checked line counts submitted workloads when the run reports them; a view kept from before that check reads as before - A workload id (`<orchestrator>:<name>`) is not matched against file text Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `skippedChecks` no longer counts "Repeated Submitted Runs on All-Purpose Compute" as a fifth check: with three checks and the submitted runs skipped, the pane said none of the 4 could run - The checked-counts line is built from a list joined once, so its "and" cannot drift - The core capture is regenerated with two submitted workloads, so the shape guard covers `submit_run_on_all_purpose` as core sends it - The kept-view test now loads a stored view without `submitted`, as an earlier version saved it - README names the submitted runs as part of the job check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@suryaiyer95 review please |
suryaiyer95
left a comment
There was a problem hiding this comment.
Changes found; approval withheld.
Local review of 7a4147efb0c6cb4a511ad44f698c7342e0e2f9e2
Found one actionable P2 defect in skipped-check accounting. The full merge-base-to-head production diff, relevant callers, tests, documentation, and current-head review history were inspected. Approval is not recommended until the contradictory check tally is corrected.
Checks: Focused Bun probe reproduced the defect: the sole submitted-runs skip returned 0 incomplete checks instead of 1. Isolated support suites passed 89/89 (fix tracking, report generation, and row matching). The isolated savings suite passed 350 tests with 11 five-second timeouts. The parallel full plugin run passed 1,104/1,204 with 100 broad timeout failures. git diff --check passed; final HEAD and clean checkout were verified.
Limits: No production credentials, warehouses, cloud services, or deployment paths were used. The broad suite was CPU/load-contaminated; its unrelated timeout failures are disclosed but not treated as defects. Terminal UI behavior was exercised through the repository's native plugin UI harness; no browser boundary applied. Live review history was captured read-only because launcher history was unavailable. Automatic RSI was queued separately; product source remained unchanged.
@shreyastelkar: Please reply here or on a finding: was it useful/correct, a false positive, or did I miss something? I will validate feedback against the reviewed revision before reusing a lesson. Automated local review; no production checks.
Reviewed base: feat/savings-via-altimate-code (b9ecb48f7eb4e78a025a5b07416f32d57a90c708).
…n /savings `skippedChecks` folds "Repeated Submitted Runs on All-Purpose Compute" into the job check instead of dropping it: skipped alone it counts as one check not run, skipped with the job query it still counts once. Before, skipping only the submitted runs read "No savings found by the 4 of 4 checks that ran" beside "Not checked: Repeated Submitted Runs". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecked" in /savings `nothingRan` now needs every check's own query skipped: with the three warehouse and cluster checks skipped and only the submitted runs missing from the job check, the jobs were still read, so the verdict reads "No savings found by the part of the job check that ran." instead of "None of the 4 checks could run". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…could not run in full When the submitted-runs query is skipped and the job query is not, the summary's tally ends "could not run in full", so the notice agrees with the pane's verdict that part of the job check ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
suryaiyer95
left a comment
There was a problem hiding this comment.
Changes found; approval withheld.
Local review of feff1920925d0493817cb2d08c57400d8c893224
Reviewed the complete merge-base-to-head diff, relevant callers, tests, intended behavior, and prior review history. Two introduced defects were established: stale results survive when a connection is repointed, and a new retention test deterministically exceeds the native runner timeout.
Checks: Executed the native plugin harness. Focused savings UI suite: 361/363 passed; one timeout passed when isolated, while the dbt-row retention test still timed out in isolation. Supporting suites passed 89/89 (53 fixes, 26 report, 10 rows). A synthetic native replay reproduced stale cross-workspace results and doubled status-line savings. The broad parallel run completed with 972/1207 passing and 235 predominantly load-related five-second timeouts. git diff --check passed.
Limits: No production credentials, environment files, live warehouses, cloud services, or deployment commands were used. Terminal UI behavior was exercised through the repository's native plugin harness; browser testing was not applicable. The broad suite was load-contaminated, so conclusions rely on focused and isolated reruns. Remote review history was available, and the verified local head was rechecked after testing.
plugins/altimate-code/hooks/features/savings.tsx:1415 — [P2] Replace a repointed connection's previous report
A successful rerun merges fresh reports into the existing map without removing an older entry for the same named connection. Because the key includes the current workspace/account identity, repointing a connection creates a second key and leaves the previous workspace's findings visible and counted until restart. The pane and shared report can therefore mix stale results, while the status line overstates total savings.
Evidence: Executed a synthetic native-harness replay: first ran dbxmega against a.example.com, then repointed the same connection to b.example.com and reran /savings. The report map retained both identity keys, and the status changed from the expected $80.64–$101/mo to $161–$202/mo. Static base comparison confirms the previous implementation replaced its single report rather than merging it.
plugins/altimate-code/hooks/features/savings.test.tsx:1909 — [P3] Keep the retention regression test within the runner timeout
This new test serially invokes the full Bash tool hook 201 times under the native runner's five-second test timeout. It consequently fails even when run alone, leaving the focused savings suite deterministically red on an otherwise idle supported setup. Exercise the retention boundary through a cheaper fixture/helper or otherwise structure the test so it completes within the harness timeout.
Evidence: Executed the focused file and then isolated this test with the native plugin runner. It timed out after 5,000 ms in both isolated reruns, with measured runtimes of approximately 7.4 and 14.3 seconds. The adjacent timeout from the focused run passed when isolated, distinguishing this test's workload from general suite contention.
@shreyastelkar: Please reply here or on a finding: was it useful/correct, a false positive, or did I miss something? I will validate feedback against the reviewed revision before reusing a lesson. Automated local review; no production checks.
Reviewed base: feat/savings-via-altimate-code (b9ecb48f7eb4e78a025a5b07416f32d57a90c708).
Summary (for people)
Why: after a run on a Databricks workspace and a Snowflake account, the
/savingspane listed every finding (11 here) with two or three evidence lines and a button each, a what-if block, a nine-line "Not run here" list per platform, a footer paragraph and four buttons. That is too much to take in, and too much for a user to check against their own console.Before → after: each run now opens the pane slim: one header for the connections checked, the total (each resource counted once), the three resources with the largest saving across both platforms, each on one title line with one measured fact and its Draft the fix button, one line counting the other findings with what they add to the total, and one line for the checks Altimate runs beyond these. Show all opens the full detail exactly as it was, with Run again; Show fewer goes back. The status line, the notes under tool calls and the Share report page are unchanged, so the report is still where every number can be checked.
Who is affected: anyone who runs
/savingswith the plugin from this branch. It stacks on #35 and ships with it; nothing changes for anyone until both merge and a released altimate-code has the savings tools.Release order (blocks merge): the altimate-code savings tools and assessment mode are not released yet (latest tag 0.12.11).
SAVINGS_MIN_ALTIMATE_CODEis 0.12.12 as a placeholder: before this merges it must name the first altimate-code release that actually ships them. An altimate-code without assessment mode ignores the setting and still sends its one-time telemetry opt-out event when it lists connections at session start.Text renders from the test kit (Altimate's own Databricks fixture and the recorded Snowflake answer, elements in document order). The coordinator will replace these with real screenshots after the live run.
Before: the full pane (79 lines)
After (slim, 17 lines; Show all gives the 79 lines above). The three amounts shown plus the +8 line add up to the total, each resource counted once:
Details (for agents/reviewers)
What mod v2 adds on top of the base PR
/savingsalso runs altimate-code'sfinops_snowflake_savings(high idle time, downsize, underutilized clusters, frequent restarts), at the account's own credit price when the check can read it. With both kinds of connection, one/savingschecks both./savings, then the monthly range of the kept answer, with its age once it is a day old. Connections are listed with altimate-code'swarehouse_list, which reaches no warehouse.sql_execute/sql_explaincall, or adbt run/dbt build, that runs on a warehouse with a kept finding. A connection names its warehouse by id alone, so an id flagged in several workspaces gets no note.measuring (n of 7 days), that nothing changed, or the observed spend a day before and after the change. The two amounts are billed in different weeks, so the line says so and never calls the difference saved (the same rule the base PR's reviewer asked for on the resized-warehouse line). The fix line replaces the older "since first flagged" line only for its own warehouse: the same id in the same workspace, not another warehouse with the same name. With several workspaces read, the draft keeps its own workspace's cost and size, a later run reads its own workspace's warehouse (the CLI'sworkspace_idis kept on every inventory row), and the line names the workspace. A draft and a baseline keep each setting (size, type) as its value or as unknown: a later read fills an unknown setting and never overwrites a known one, only a setting read both then and now can have changed, and a line names only those ("still CLASSIC", "its type did not change"). With none read both times, the line claims nothing yet. A record an older version kept as a string loads with every setting unknown.$.store) and shows only where its connection reaches the same workspace or account. Nothing runs the check but/savingsor a button you press.The slim view
Also in this PR
hooks/shell.ts), baselines are keyed per workspace with their window length, and the observed-spend note shows once. An answer missing a field is still drawn:/savingssends no plugin usage event: the command, its pane, Show all and its buttons are not counted (hooks/usage.test.tsx)./clearnever waits on the session root or the store.main's/dbt-showgeneration test caught this.workspaces_checked), as in the base PR./savingsand the Run buttons start a check from one claim, taken with no await between the decision and the claim, and held until that run ends or a/cleardrops it. "Already running", "just finished" and "cleared while it ran" name the check holding the claim.Tests
claude plugin test .inplugins/altimate-code: 1706 of 1706 pass at c0bb47f. The dbt artifact-race test inruns.test.tsxnow waits on events instead of 20 ms pauses (base PR), so it no longer fails under load.hooks/features/savings-core.testkit.tsholds what core's compiled savings binding returned for synthetic facts on both platforms: every finding kind, Snowflake's Underutilized Cluster with no dollar estimate, core's nulls, and what-if rows for one warehouse id in two workspaces. A test finds no "?", "undefined" or "NaN" on the slim pane, Show all, the fix drafts, each what-if, the report page, the notices, the status line or the band. Underutilized Cluster reads the fields core sends (max_cluster_count,recommended_max_cluster_count): "The highest of its 2 clusters was barely needed…"./savingstyped again, opens slim;bash tests/*.sh: all 8 pass.claude plugin validate --strict .passes.claude plugin validate --strict ./plugins/altimate-codereports the same 6 type warnings asorigin/main, all in code frommain(cost.test.tsx,runs.test.tsx,lineage-graph.ts,usage.test.tsx).tsc --noEmitagainst the generated plugin types shows 5 errors, all in code frommain(cost.test.tsx,health.test.tsx,lineage-graph.ts,usage.test.tsx), none in this PR's code.🤖 Generated with Claude Code