Skip to content

feat: /savings v2: a slim pane, Snowflake, status line and a local report - #43

Open
shreyastelkar wants to merge 84 commits into
feat/savings-via-altimate-codefrom
feat/savings-mod-v2
Open

shreyastelkar wants to merge 84 commits into
feat/savings-via-altimate-codefrom
feat/savings-mod-v2

Conversation

@shreyastelkar

@shreyastelkar shreyastelkar commented Nov 20, 2026 •

Copy link
Copy Markdown

Summary (for people)

Why: after a run on a Databricks workspace and a Snowflake account, the /savings pane 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 /savings with 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_CODE is 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)
Databricks savings check
5 SQL warehouses, 0 all-purpose clusters and 0 jobs · the 7 days to 2026-11-18 · connection dbxmega
Read-only, with your own connection. Nothing was sent to Altimate.
$80.64–$101 a month
on 1 resource, at list price and the last 7 days' rate, each counted once at its largest saving
Classic · Migrate Classic/Pro to Serverless · $80.64–$101 a month
CLASSIC SMALL warehouse, 95% idle over 11.0 running hours (3,107 queries)
$27.54 in DBUs over 7 days; serverless would bill $4.02 for the busy time alone
[ Draft the fix ]
Classic · Over-Sized Warehouse · $31.48–$55.09 a month
SMALL warehouse used at most 10.7% of its cores (p99 over 2,778 queries)
100% of queries never spilled to disk, 100% never queued
2X-SMALL is enough: 12 → 4 DBU an hour, on $27.54 spent over 7 days
[ Draft the fix ]
What if Classic ($118 a month now) were…
[ SERVERLESS $17.24 ] [ X-SMALL $59.02 ] [ 2X-SMALL $39.35 ]
Press a size to see what it would cost and whether it fits.
Not run here: 9 more of Altimate's 13 Databricks checks
High Warehouse Idle Time: 5 SQL warehouses: not ranked by idle time
Stale/Orphaned Warehouse: 3 of 5 SQL warehouses billed nothing in these 7 days, not checked further
Undersized Concurrency Capacity: 3,107 queries on CLASSIC not ranked for queueing
Driver Node Oversizing: no all-purpose clusters in these 7 days
Memory-Starved All-Purpose Cluster (Sustained Swap): no all-purpose clusters in these 7 days
Ghost All-Purpose Cluster: no all-purpose clusters in these 7 days
Continuously Failing Job: not read: this run counts only jobs on all-purpose compute, and saw none
Hung & Long-Cancelled Job Runs: not read: this run counts only jobs on all-purpose compute, and saw none
Periodic Job Cluster-Startup Overhead: not read: this run counts only jobs on all-purpose compute, and saw none
These were 4 of Altimate's 13 Databricks checks, on one workspace. Altimate runs all 13 every day on everything you connect, tracks what each change saves, and its Auto Tune can change a warehouse's size and auto-stop for you.
Snowflake savings check
69 warehouses · the 7 days to 2026-11-18 · connection snowflake
Read-only, with your own connection. Nothing was sent to Altimate.
$342–$489 a month
on 7 resources, at your account's $3.00 a credit and the last 7 days' rate, each counted once at its largest saving
DBT_INTEGRATION_TEST_WH · High Idle Time · $197–$281 a month
90% idle on 5 days above 40%: 12.2 of 13.5 active hours
24.29 credits on those days, at $3.00 a credit
[ Draft the fix ]
NATIVE_APP_WH · High Idle Time · $90.18–$129 a month
66% idle on 7 days above 40%: 4.9 of 7.4 active hours
15.29 credits on those days, at $3.00 a credit
[ Draft the fix ]
SA_WH · High Idle Time · $28.30–$40.42 a month
50% idle on 7 days above 40%: 0.7 of 1.3 active hours
6.33 credits on those days, at $3.00 a credit
[ Draft the fix ]
COMPUTE_WH · High Idle Time · $21.30–$30.43 a month
59% idle on 7 days above 40%: 0.7 of 1.3 active hours
4.18 credits on those days, at $3.00 a credit
[ Draft the fix ]
DBT_INTEGRATION_TEST_WH · Frequent Restart Overcharge · $8.79–$13.16 a month
180 suspend-and-resume bounces inside a billed minute on 5 days
2,456 seconds billed twice at 1 credit an hour
[ Draft the fix ]
TELEMETRY_DASHBOARD_WH · High Idle Time · $3.81–$5.45 a month
94% idle on 5 days above 40%: 19 of 20 active minutes
0.45 credits on those days, at $3.00 a credit
[ Draft the fix ]
SA_WH · Downsize Warehouse · $2.96–$4.94 a month
Medium could be Small: 96.5% of 2,001 queries ran in 5 seconds or less
The saving is a share of $2.30 over the window
[ Draft the fix ]
ALTIMATE_METRICS_WH · High Idle Time · $1.44–$2.06 a month
98% idle on 7 days above 40%: 7 of 7 active minutes
0.16 credits on those days, at $3.00 a credit
[ Draft the fix ]
TEST_WH_A · High Idle Time · $0.21–$0.30 a month
98% idle on 1 day above 40%: 1 of 1 active minutes
0.02 credits on those days, at $3.00 a credit
[ Draft the fix ]
Not run here: 7 more of Altimate's 11 Snowflake checks
No resource monitor: 69 warehouses: resource monitors not read
Auto tune disabled: 69 warehouses: Auto Tune setting not read
Many queries under 5 seconds: 2,001 queries on STANDARD not bucketed by duration
Frequent short warehouse activity: 69 warehouses: resume and suspend pattern not read
High cloud services cost: 69 warehouses: cloud services share not read
High auto suspend: 69 warehouses: auto-suspend setting not read
Convert to Gen2: 69 warehouses not compared with Gen2
These were 4 of Altimate's 11 Snowflake checks. Altimate runs all 11 every day on everything you connect, tracks what each change saves, and its Auto Tune can change a warehouse's size and auto-stop for you.
[ Run again ] [ Share report ] [ See every check in Altimate ] [ Close ]

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:

Savings check · last 7 days · dbxmega, snowflake
Read-only, on your own connections. Nothing was sent to Altimate.
$423–$590 a month
each resource counted once, at its largest saving
DBT_INTEGRATION_TEST_WH · Snowflake · High Idle Time · $197–$281 a month
90% idle on 5 days above 40%: 12.2 of 13.5 active hours
[ Draft the fix ]
NATIVE_APP_WH · Snowflake · High Idle Time · $90.18–$129 a month
66% idle on 7 days above 40%: 4.9 of 7.4 active hours
[ Draft the fix ]
Classic · Databricks · Migrate Classic/Pro to Serverless · $80.64–$101 a month
CLASSIC SMALL warehouse, 95% idle over 11.0 running hours (3,107 queries)
[ Draft the fix ]
+ 8 more findings, adding $55.06–$78.66 a month to the total
[ Show all ]
Altimate runs 16 more checks on these platforms.
[ See every check in Altimate ] [ Share report ] [ Close ]

Details (for agents/reviewers)

What mod v2 adds on top of the base PR

  • Snowflake. With a Snowflake connection, /savings also runs altimate-code's finops_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 /savings checks both.
  • Status line. The platforms your connections cover plus /savings, then the monthly range of the kept answer, with its age once it is a day old. Connections are listed with altimate-code's warehouse_list, which reaches no warehouse.
  • A note under a tool call. One line under a sql_execute/sql_explain call, or a dbt 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.
  • After a drafted fix. Draft the fix keeps the resource, its daily cost and the date. A later run says 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's workspace_id is 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.
  • Unknown costs. 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, never one claiming $0. A baseline kept without a cost takes the first cost a later run gives while the warehouse is unchanged.
  • Checks not run. The hosted product's other checks for each platform, with counts from your own run, and one button to Altimate. In the slim view this is one line: "Altimate runs N more checks on these platforms".
  • Share report. One self-contained local HTML page with every finding, its evidence, the what-ifs and the checks not run. Nothing is uploaded.
  • The kept answer lasts 7 days on this machine ($.store) and shows only where its connection reaches the same workspace or account. Nothing runs the check but /savings or a button you press.

The slim view

  • Top 3 resources across all platforms, each at its largest finding (the one the total counts), ranked by the high end of the monthly range, then the low end, then the name. A resource's other findings are behind Show all. Each finding keeps the same Draft the fix key in both views.
  • The lines add up. The total says "each resource counted once, at its largest saving". The "+ N more findings" line counts every finding not shown and gives what the resources not shown add to the total ("adding $A–$B a month to the total"), or "already in the total" when they are all on resources above. So the three shown plus that line make the total.
  • One fact per finding: its first evidence line, the measured one a user can check in their console. A fact longer than the pane's usual width is cut at the last clause that fits. A title line never passes the pane's width: a long resource name is shortened first, to no fewer than 8 characters, then the check's title.
  • A drafted fix's line shows under its warehouse's finding (same resource type, id and workspace). When its resource is not among the findings shown (the fix cleared it, or it is below the top three), the line shows on its own after the top findings.
  • With every finding shown there is no "+N" line, but Show all is still offered.
  • No findings: the existing "No savings found…" text. Refused platforms and skipped checks keep their existing lines.
  • Every new run, answered or refused, and every session end, opens slim again.

Also in this PR

  • The base PR's branch is merged in as it moves (merge commits, no rebase), and each of its fixes is carried into the multi-platform code: evidence figures read "?" when missing (the Snowflake ones too), the version probe refuses source and preview builds and says when it cannot read a version (also at session start, before listing connections), the Bash offer reads the line with the shared shell reader (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:
    • a finding without both ends of its range is one with no dollar estimate, in the pane, the report and its Draft the fix request alike;
    • a total missing a figure is its priced findings' own, each resource once;
    • a finding without a title or evidence reads "Savings opportunity", with no fact. /savings sends no plugin usage event: the command, its pane, Show all and its buttons are not counted (hooks/usage.test.tsx).
  • Every answer of a run is offered to the store: one the store refuses no longer keeps the next from being saved.
  • Reading the kept answers back at session end no longer blocks the end hook, so a /clear never waits on the session root or the store. main's /dbt-show generation test caught this.
  • The pane counts every workspace the CLI read (workspaces_checked), as in the base PR.
  • One check at a time, as in the base PR: /savings and 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 /clear drops it. "Already running", "just finished" and "cleared while it ran" name the check holding the claim.
  • Connection names: a name this run's own connection list does not hold, or holds as neither Databricks nor Snowflake, runs nothing and lists the usable names. With the list unreadable, the check runs as before, and a "not a Databricks one" answer says the connection's kind could not be read. A refusal names a platform, in the pane, the notice and the report, only when the list was read and the run covered that one platform.

Tests

  • claude plugin test . in plugins/altimate-code: 1706 of 1706 pass at c0bb47f. The dbt artifact-race test in runs.test.tsx now waits on events instead of 20 ms pauses (base PR), so it no longer fails under load.
  • Core's own answers. hooks/features/savings-core.testkit.ts holds 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…".
  • Kept settings: per-setting tables (each setting × known or unknown before × known or unknown after × same or different) for baselines on the pane and for drafted fixes, asserting the kept merge, the changed verdict and the line; older string records; a run that reads one setting and not the other.
  • One id in two workspaces: a what-if press opens only its own row (and only in its own connection's section); a fix drafted in one workspace stays unchanged while the other's warehouse was resized, and keeps its own workspace's cost; a band line does not pin a name flagged in two workspaces or two Snowflake accounts on one of them. A fix drafted in one workspace is not followed on another workspace's warehouse of the same id, even when a later run reads only that one,. Each fails with its fix removed (checked).
  • Slim-view tests:
    • top-3 selection across both platforms and its order (ties by the low end, then the name);
    • the total equals the three shown plus what the "+N" line adds (crafted answers and the recorded Snowflake answer, to the cent), and a resource's second finding is "already in the total";
    • Show all and Show fewer;
    • a new run, or /savings typed again, opens slim;
    • no "+N" line when every finding is shown;
    • the checks-not-run count (16 for both platforms, 7 for Snowflake alone);
    • Share report from the slim view still lists every finding;
    • on the recorded Snowflake answer, the top 3 match the capture and no slim line is wider than the pane;
    • a long fact cut at a clause and a long name shortened;
    • a drafted fix's line shown once under its warehouse's first top finding, shown on its own once its finding has cleared, and not drawn under a finding with the same id in another workspace;
    • a long check title kept within the slim width;
    • a session end and a refused run both open the pane slim.
  • Tests that pinned the old layout now open Show all first, so they still check the full detail as it was.
  • bash tests/*.sh: all 8 pass.
  • claude plugin validate --strict . passes. claude plugin validate --strict ./plugins/altimate-code reports the same 6 type warnings as origin/main, all in code from main (cost.test.tsx, runs.test.tsx, lineage-graph.ts, usage.test.tsx). tsc --noEmit against the generated plugin types shows 5 errors, all in code from main (cost.test.tsx, health.test.tsx, lineage-graph.ts, usage.test.tsx), none in this PR's code.
  • Tests for the bot review's findings:
    • an unknown cost never shown as $0, now or when flagged;
    • a drafted fix hiding only its own warehouse's change line: by id, by workspace, and only a warehouse's fix;
    • a job's fix drawn on its own, not under a warehouse finding with the same id;
    • a finding without evidence, amounts, a full range or a title;
    • a total missing a figure;
    • the report's fit column and its nothing-checked subtitle;
    • a /clear in the same tick as /savings or Run again, which starts nothing and leaves nothing marked running; the merged base fixes in this branch's views.
    • The workspace and resource-type tests fail when their half of the match is removed (checked).
  • Local review script (fresh Claude reviewer, whole diff from the base branch): no P0 or P1 at c82b279, 9b1d50b, 654a87b, 717c00a, 34432ef or a36e8b9; the P2 at a36e8b9 (session start listing connections for a source build) is fixed. In later rounds, fixed:
    • the P1 at ddca0dd: a finding without evidence failed the run;
    • the P1 and two P2s at 36e7059: a finding without amounts broke the combined total and the slim ranking, and the report's fit column disagreed with the pane;
    • the P2 at ea7a756: Draft the fix priced a half range.
    • The reviews at 76f23c3 and 39670de found nothing above P3. The independent review at 9b1d50b also found none: one medium and one low, both listed under the known limits below. Fixed from the first round: a drafted fix's line repeated under each top finding on one warehouse; a fix whose finding cleared had no line in the slim view; a refused run kept the full view; a misplaced comment.
  • Known limits, left as they are:
    • Two Snowflake connections that read the same account can list one warehouse twice, in the total and the slim view alike (each is keyed by its connection). Two Databricks connections to the same account are counted once.
    • The slim view's title line leaves out the workspace id. Show all names it.
    • A resized warehouse with no drafted fix gets its "spend since a change" lines only under Show all. A drafted fix's line stays in the slim view.
    • The slim view's "Not checked" lines carry no platform label.
  • Not run here: a live warehouse run of this head and real screenshots. The coordinator does the live run on the final heads.

🤖 Generated with Claude Code

shreyastelkar and others added 5 commits November 19, 2026 15:47
… 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>
@kilo-code-bot

kilo-code-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 3 Issues Found | Recommendation: Optional improvements before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 3
Issue Details (click to expand)

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/savings-format.ts 103 findingKey uses checkId alone as the check discriminator, and toView maps a missing check_id to ''; two findings on one resource then share a key, so distinctFindingCount/distinctFindings count and show one while Show all and the report render both. Use the finding title when checkId is empty.
plugins/altimate-code/hooks/features/savings.tsx 1158 With mergedConfig gone, a fix record never learns a setting it was drafted without: a later run that reads it leaves the record as it is, so fixChanged finds nothing known on both sides and fixProgress keeps saying "nothing is claimed yet" even after a real resize. Re-pressing Draft the fix cannot heal it either (rememberFix treats the new config as unchanged), so the earlier learning fix is effectively reverted.
plugins/altimate-code/hooks/features/savings.test.tsx 4716 The test named "shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; assert that the CLI text (warehouse unreachable) reaches the pane.
Files Reviewed (16 files in incremental diff)
  • PRIVACY.md - 0 issues
  • plugins/altimate-code/CHANGELOG.md - 0 issues
  • plugins/altimate-code/README.md - 0 issues
  • plugins/altimate-code/skills/altimate-code/SKILL.md - 0 issues
  • plugins/altimate-code/types/index.d.ts - 0 issues
  • plugins/altimate-code/hooks/open-report.ts - 0 issues
  • plugins/altimate-code/hooks/savings-config.ts - 0 issues
  • plugins/altimate-code/hooks/savings-fixes.ts - 0 issues
  • plugins/altimate-code/hooks/savings-format.ts - 1 suggestion
  • plugins/altimate-code/hooks/savings-report.ts - 0 issues
  • plugins/altimate-code/hooks/features/runs.test.tsx - 0 issues
  • plugins/altimate-code/hooks/features/savings.tsx - 1 suggestion
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 suggestion
  • plugins/altimate-code/hooks/savings-config.test.ts - 0 issues
  • plugins/altimate-code/hooks/savings-fixes.test.ts - 0 issues
  • plugins/altimate-code/hooks/savings-report.test.ts - 0 issues

Notes on verification: static review only (tests were not executed). The previous round's warning about the version-gate refusal naming and filing a platform from the cached connection list is resolved by kindOf/listedNow in runCheck and by the matching change in the catch; the claim/generation/conversation paths and the reworked baseline rule were re-traced and are unchanged in correctness. One carried finding (the weak test assertion) cannot be anchored inline because its line is outside this PR's diff hunks, so it is reported here only.

Previous Review Summaries (12 snapshots, latest commit b410fa2)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit b410fa2)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2
Issue Details (click to expand)

WARNING

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 1255 The version-gate refusal names and files a platform from the cached connectionsAtom, not this run's list: a connection absent from that cache is guessed as Databricks by targetsFor, so /savings <later-added Snowflake connection> reports "This altimate-code has no Databricks savings check" and files it under Databricks. The same decision is duplicated in the catch at 1329-1333.

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/savings-format.ts 103 findingKey uses checkId alone as the check discriminator, and toView maps a missing check_id to ''; two findings on one resource then share a key, so distinctFindingCount/distinctFindings count and show one while Show all and the report render both. Use the finding title when checkId is empty.
plugins/altimate-code/hooks/features/savings.test.tsx 4681 The test named "shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; assert the CLI text (warehouse unreachable) reaches the pane.
Files Reviewed (16 files in incremental diff)
  • PRIVACY.md - 0 issues
  • plugins/altimate-code/CHANGELOG.md - 0 issues
  • plugins/altimate-code/README.md - 0 issues
  • plugins/altimate-code/skills/altimate-code/SKILL.md - 0 issues
  • plugins/altimate-code/types/index.d.ts - 0 issues
  • plugins/altimate-code/hooks/open-report.ts - 0 issues
  • plugins/altimate-code/hooks/savings-config.ts - 0 issues
  • plugins/altimate-code/hooks/savings-config.test.ts - 0 issues
  • plugins/altimate-code/hooks/savings-fixes.ts - 0 issues
  • plugins/altimate-code/hooks/savings-fixes.test.ts - 0 issues
  • plugins/altimate-code/hooks/savings-format.ts - 1 suggestion
  • plugins/altimate-code/hooks/savings-report.ts - 0 issues
  • plugins/altimate-code/hooks/savings-report.test.ts - 0 issues
  • plugins/altimate-code/hooks/features/runs.test.tsx - 0 issues
  • plugins/altimate-code/hooks/features/savings.tsx - 1 warning
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 suggestion

Notes on verification: the run-start claim, refusal and conversation logic (claim/letGo/whenPressed, sessionStart/sessionEnd, runCheck's finally) was traced through every await, and no path leaves a claim or busyAtom held after a /clear. The reworked baseline rule (covers + learns + readsMore) is correct for a known cost that this run does not re-read (no replacement, so no cost is dropped), and readsAllKnown keeps a previously seen change from being cleared. The previous round's two line comments at this head (the slimTitle missing-title crash, now normalised by titleOf at savings.tsx:616, and the findIndex precondition at savings.test.tsx:4566) are resolved and omitted here. Tests were not executed (read-only review), so this is static verification only.

Fix these issues in Kilo Cloud

Previous review (commit 686d1f1)

Status: No Issues Found | Recommendation: Merge

Incremental pass over 686d1f1a, the only commit after cd78265a. It addresses both findings from the previous review: expect(ours).not.toBe(-1) now guards the findIndex fixture assumption at line 3881, and the what-if section now presses whatif-1-1 (core's what_if[1], workspace 1002, X_SMALL) and additionally asserts the drafted fix record under workspace 1001 is unchanged and no 1002 fix record exists, so it no longer duplicates the separate what-if test. I checked the key mapping (whatif-${at}-${k} per section, separate from the fix-${at} counter), the fixture (what_if[1].workspace_id === '1002', choices[1] = X_SMALL), and that fix records are written as replacement objects, so the record-equality assertion is meaningful. No correctness, security, or runtime issue found.

Files Reviewed (1 file)
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 issues (2 previous suggestions fixed)

Previous review (commit cd78265)

Status: 2 Suggestions Found | Recommendation: Address before merge

This pass covers cd78265, the only commit this PR adds after 569c81a0. It adds one test that drives a baseline, a drafted fix, and a what-if press across core's own answer with wh-synth-classic in workspaces 1001 and 1002. I checked the new assertions against the fixture and the code they exercise: DATABRICKS_FACTS/DATABRICKS_REPORT give 1001 SMALL CLASSIC at $66 and 1002 SMALL CLASSIC at $49.5, what_if[0] is 1001, so the expected MEDIUM → SMALL line and $424/$212 amounts match trackChanges (stored.days ?? windowDays) and the fix-${at} counter in the single-section render. No correctness, security, or runtime issue found; both notes below are about the test's own robustness and duplication. The rest of the incremental range is base-branch content merged in, and the earlier finding at savings-fixes.ts remains resolved at this head.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 2
Issue Details (click to expand)

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.test.tsx 3880 The findIndex result feeding fix-${ours} is never asserted, so a fixture change fails later with a confusing undefined store entry
plugins/altimate-code/hooks/features/savings.test.tsx 3906 The what-if block re-asserts exactly what the test immediately below already checks
Files Reviewed (1 file)
  • plugins/altimate-code/hooks/features/savings.test.tsx - 2 suggestions

Fix these issues in Kilo Cloud

Previous review (commit 569c81a)

Status: No Issues Found | Recommendation: Merge

This pass covers 7488651, the only commit this PR adds after c8adbefa. It routes both isFlagged and the checkOne change-line filter through sameWorkspace, so a fix/finding and a warehouse row are matched by the same workspace rule, and adds tests for both directions. I verified the two call sites use the same several condition (view.checked.workspaces > 1 / severalWorkspaces), that the one-workspace branch still refuses two differently named workspaces, and that the new tests fail against the old strict-equality and old id-only filter. The rest of the incremental range is base-branch content merged in (the structured WarehouseConfig work), not this PR's changes. The earlier finding at savings-fixes.ts (a learned config overwriting a value the draft knew) is resolved at this head.

Files Reviewed (4 files)
  • plugins/altimate-code/hooks/features/savings.tsx
  • plugins/altimate-code/hooks/savings-fixes.ts
  • plugins/altimate-code/hooks/savings-fixes.test.ts
  • plugins/altimate-code/hooks/features/savings.test.tsx

Previous review (commit c8adbef)

Status: 1 Issue Found | Recommendation: Address before merge

This pass covers c8adbefa, the commit after 3be889fb: a fix's config is kept as two words with ? for a value the CLI did not read, a draft learns a size or type a later run reads, and a baseline kept without a size takes the first one a later run gives. The three suggestions from the previous round are resolved at this head: the config encoding no longer parses a size back as a type, a fix drafted with an unread size now learns it, and the size-less baseline is refreshed so a later resize shows. The new tests cover all three.

One new suggestion remains: the learning writes the run's config whole, so a run that reads only one of the two fields can replace the value the draft already knew with ?, and a later change to that value then goes unreported.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/savings-fixes.ts 121 learnedConfig stores the row's config whole, so a run that reads one field but not the other writes ? over a value the draft knew; a later resize of that field is then not reported. Merge the row's values over the record's instead.
Files Reviewed (4 files)
  • plugins/altimate-code/hooks/savings-fixes.ts - 1 suggestion
  • plugins/altimate-code/hooks/features/savings.tsx - 0 issues
  • plugins/altimate-code/hooks/savings-fixes.test.ts - 0 issues
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit 3be889f)

Status: 3 Issues Found | Recommendation: Address before merge

This pass covers 3be889f, the one commit after f65834c: a fix's size and type are kept as a config text that leaves out a size the CLI did not read, and compared by type plus size only where both sides read one; rememberFix treats a config that differs only by an unread size as the same draft; and the band groups findings by id only where an id means something (Databricks warehouses and clusters, not jobs or Snowflake rows).

The previous warning is fixed at this head: fixChanged now compares through configDiffers, so a warehouse listed without a size no longer reads as "changed to ? CLASSIC" and no longer quotes observed spend, and the new tests cover a size on one side only, a legacy ? size, and a sizeless draft. Two things remain, below: the "unread size is never learned" gap now also applies to the drafted fix's own record, and the new config encoding cannot express an unread type. The baseline half of that gap, reported last round at line 651, is unchanged.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 3
Issue Details (click to expand)

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 1219 configDiffers reads an unread size as "no change", so a fix drafted while the size was unread keeps that size-less config forever. A later genuine resize is never detected and the line says "its size did not change"; refresh config when the held one has no size.
plugins/altimate-code/hooks/savings-fixes.ts 75 configText drops an unread size but has no way to mark an unread type, so a bare SMALL parses back as { size: null, type: 'SMALL' } and a normal SMALL PRO row reads as a type change with observed spend. Keep size and type separate, or leave a marker for an unread type.
plugins/altimate-code/hooks/features/savings.tsx 651 Carried from the previous review: a baseline stored with size: null is still only refreshed for windowCost, so every later run compares its real size against null and a genuine resize of that warehouse is never reported.
Files Reviewed (4 files)
  • plugins/altimate-code/hooks/features/savings.tsx - 2 suggestions
  • plugins/altimate-code/hooks/savings-fixes.ts - 1 suggestion
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 issues
  • plugins/altimate-code/hooks/savings-fixes.test.ts - 0 issues

Previous review (commit f65834c)

Status: 2 Issues Found | Recommendation: Address before merge

This pass covers f65834c, the one commit after df3f439: a shared sameWorkspace helper now decides whether a row belongs to a fix's or finding's workspace, with several workspaces read requiring both sides to name the same one and a single-workspace run still matching by id when one side names none; and trackChanges no longer reads a size on one side only as a resize.

The previous round's issue is fixed at this head: rowOf and toView's row lookup both go through sameWorkspace, so a fix drafted in workspace 222 is not followed on 111's warehouse of the same id when a later run reads only 111 — the new end-to-end test asserts the "did not list it" line and the absence of "changed to X-SMALL". One of that rule's two call sites is still missing, below.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
plugins/altimate-code/hooks/savings-fixes.ts 94 fixChanged compares the concatenated config even when row.size is null, so a warehouse listed without a size reads as "changed to ? CLASSIC" plus observed spend, while a draft stored from a sizeless answer claims a change when a size first appears. The new rule at savings.tsx:650 is not applied to this path.

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 651 Requiring both sizes stops the false resize, but a baseline stored with size: null is never refreshed (only windowCost is), so every later run compares against null and a genuine resize of that warehouse is never reported. Refresh a previously-unknown size as the cost is refreshed.
Files Reviewed (4 files)
  • plugins/altimate-code/hooks/savings-fixes.ts - 1 warning
  • plugins/altimate-code/hooks/features/savings.tsx - 1 suggestion
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 issues
  • plugins/altimate-code/hooks/savings-format.ts - 0 issues

Fix these issues in Kilo Cloud

Previous review (commit df3f439)

Status: 1 Issue Found | Recommendation: Address before merge

This pass covers df3f439e, the one commit after e1cbc86: inventory rows now keep the CLI's workspace_id, and the finding's size and cost, the drafted-fix tracker and the query count find a row by workspace as well as id when the run read several workspaces; a fix line names its workspace; and a tool-row note is withheld for a warehouse id flagged in several workspaces. The previous round's issue — rowOf resolving a fix's inventory row by bare resourceId — is fixed at this head, and the new end-to-end tests cover the repeated-id case (a drafted fix in workspace 222 is not measured against 111's resize, and a draft in 222 keeps 222's size and cost).

One gap remains, below: a run that reads a single workspace still looks the row up by id alone, even when the fix and the row name different workspaces.

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/savings-fixes.ts 65 severalWorkspaces(view) turns the workspace check off whenever this run read one workspace, so a fix drafted from workspace 222 is compared against a same-id row in workspace 111 when a later run reads only 111 (deleted warehouse, lost access, repointed connection), and the line can claim a resize and observed spend for a warehouse the user did not change. Core's fixture repeats wh-synth-classic in workspaces 1001 and 1002, so the collision is the case this change set is built around. Match by id only when one side lacks a workspace id. toView's rowOf (savings.tsx:513) mirrors the condition for a finding's size and cost and needs the same guard.

Fix these issues in Kilo Cloud

Files Reviewed (6 files)
  • plugins/altimate-code/hooks/savings-fixes.ts - 1 suggestion
  • plugins/altimate-code/hooks/features/savings.tsx - same lookup condition mirrored at line 513 (reported once)
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 issues
  • plugins/altimate-code/hooks/savings-rows.ts - 0 issues
  • plugins/altimate-code/hooks/savings-rows.test.ts - 0 issues
  • plugins/altimate-code/types/index.d.ts - 0 issues

Previous review (commit e1cbc86)

Status: 1 Issue Found | Recommendation: Address before merge

This pass covers the incremental change from 4297b94 to e1cbc86 (10 commits): the what-if selection now carries its connection and workspace id and only opens its own row, the band reports a name flagged in several workspaces or accounts instead of pinning it to one, the spend-since-a-change line names its workspace and leaves out a size the CLI did not read, core's nulls read correctly (no size, unknown idle pattern, null auto-termination), install hints use the scoped package, CLI error text is cleaned to one line, Underutilized Cluster reads the fields core sends, and the pane and report name a what-if's workspace. savings-core.testkit.ts adds core-captured fixtures used by the new end-to-end tests.

The incremental code has no new defects found: the new key comparisons use the same values the producer writes, the several/configOf guards are only reached with a present workspace id and size, and no new redundancy or avoidable duplication was introduced on the changed lines.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
plugins/altimate-code/hooks/savings-fixes.ts 59 Carried forward and re-verified at HEAD: rowOf still resolves a drafted fix's inventory row by bare resourceId, but toView still builds inventory without workspace_id (savings.tsx:497-503). With one warehouse id in two workspaces, the second workspace's fix is compared against the first workspace's row, so fixProgress can report the wrong "changed"/"still" state and the wrong observed spend. The producer carries both keys; scope the lookup by workspace (and resource type) as the change-line filter now does. This already has an active inline comment from the earlier review round, so no duplicate inline comment was posted here.
Files Reviewed (7 files in incremental diff)
  • plugins/altimate-code/hooks/features/savings.tsx - 0 new issues (1 carried-forward issue lives in savings-fixes.ts)
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 issues
  • plugins/altimate-code/hooks/features/savings-core.testkit.ts - 0 issues (new fixture data)
  • plugins/altimate-code/hooks/savings-report.ts - 0 issues
  • plugins/altimate-code/hooks/savings-report.test.ts - 0 issues
  • plugins/altimate-code/hooks/altimate-cli.ts - 0 issues
  • plugins/altimate-code/types/index.d.ts - 0 issues

Previous review (commit 4297b94)

Status: No Issues Found | Recommendation: Merge

This pass covers the incremental change from 920ac705 to 4297b94 (commits ae62f69, 34e210d, merge 4297b94): 8 insertions in savings.tsx and its test.

The /savings command handler now reuses one cleared result and re-checks the run generation twice more, after update(busyAtom, ...) and after openPane($). Both are new await points since the previous pass, and each guard sits immediately before the step it protects with no further await in between, so a /clear during the running write skips openPane, and one during the pane open skips later(runCheck) and returns the "was cleared before" text instead of claiming a run is starting. No stuck state is possible: when the generation has moved on, sessionEnd has already cleared busyAtom (and the write itself is gated by at === generation inside the setter), and runCheck's own at !== generation early return covers the remaining window before the scheduled run.

No redundant or simplifiable code was introduced: each of the three generation checks is separated from the next by an await and protects a distinct step, and reusing cleared removes three duplicate string literals.

Files Reviewed (2 files in incremental diff)
  • plugins/altimate-code/hooks/features/savings.tsx - 0 issues
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 issues

Previous review (commit 920ac70)

Status: No Issues Found | Recommendation: Merge

This pass covers the incremental change from 069d7fbc to 920ac705 (commits edcf4f5, f1d0d16, merge 920ac70): 2 changed lines in savings.tsx. Both writes that mark a /savings check running now re-check the generation inside the atom setter (now => (at === generation ? busyOf(...) : now)), matching the pattern already used by every other write in runCheck.

No behavior regression: the setter returns the current value when a /clear moved the generation, so no busy state is written into the new conversation, and the existing early-return guards remain meaningful because they also skip the scheduled runCheck call. The existing same-tick tests (a /clear in the same tick as /savings ..., Run again pressed in the same tick as a /clear ...) still cover this path.

Files Reviewed (1 file)
  • plugins/altimate-code/hooks/features/savings.tsx

Previous review (commit 069d7fb)

Status: No Issues Found | Recommendation: Merge

This pass covers the incremental change from 85f970af to 069d7fbc: 64abe4d4 makes every step of a multi-platform /savings run re-check that it is still current before writing, plus the test harness and table-driven /clear tests in savings.test.tsx.

The previously reported WARNING (a /clear at a run's await points leaving work marked running or storing state in the new conversation) is resolved. runCheck now gates each atom write with live() inside the setter, gates notify/refuse, re-checks after checkOne, after $.clock.now(), after the connections list, and after the --version probe, and clears busyAtom in finally only while still current; checkOne, trackChanges and fixesFor take live and stop initiating store or atom writes once the generation moves on. The command handler now captures `genera

[Snapshot truncated.]

Additional previous summary content was truncated to keep this comment within platform limits.


Reviewed by deepseek-v4.1-flash-1017 · Input: 443.8K · Output: 73.4K · Cached: 6.8M

shreyastelkar and others added 9 commits November 19, 2026 16:48
… 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>
shreyastelkar and others added 4 commits November 19, 2026 20:17
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>
shreyastelkar and others added 8 commits November 19, 2026 20:51
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>
shreyastelkar and others added 7 commits November 20, 2026 04:57
Brings in the one-read baseline and the conversation counter, and applies them here:

- Baselines: a run that reads every setting and the cost the baseline knew, finds
  none changed and reads one more (a setting, or a cost it lacked) replaces it whole,
  date included. The cost a baseline lacked is no longer paired with the first run's
  date.
- Drafted fixes keep the settings they were drafted against and never take one from
  a later run: the change most likely to have happened while a setting was unread is
  the fix itself, so a filled value made the line say "did not change" after a
  resize the fix asked for. `mergedConfig` goes; the line still compares only the
  settings known both then and now.
- Share report, the sign-up button, the dbt row note and every press check the
  conversation counter, so a run starting no longer drops them.
- The band uses `showBand`; the pane and the report read a missing window end as
  unknown and clean the connection name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the narrower bundle detection, the CLI's own window length and the
unnamed band match. `windowDays` in `savings-format.ts` takes the window's `days`
too, so every pane, report and baseline figure here uses the length the evidence is
measured over; the band's cross-account grouping skips empty names the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in `isDatabricksConfig`, which reads a bundle's compute from the YAML block of
its top-level `resources:` instead of a pattern; the band here uses it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the file-first Databricks config check and the string lookback. The band
here takes whether the text is about compute from its caller, and the lookback test
reads the rate from Show all, where this branch draws it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uards

- Two connections that read one workspace list its findings twice and the slim view
  shows one copy. Of two copies, the one whose own answer holds a drafted fix for it
  now ranks first, so its fix line sits under it and its Draft the fix button writes
  to the same record. A fix line of the other connection is not listed on its own as
  if the finding had cleared.
- `trackChanges` matches a flagged warehouse with `sameWorkspace`, as `isFlagged` and
  `rowOf` do, in place of its own id sets.
- Tests: a fix drafted from the connection listed second; both connections holding
  one; a /clear during the prompt fill keeps no fix record; a /clear while the record
  is written says nothing. Each fails with its fix removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the press-owned Run guard, the text-read CLI error and the commented
Terraform skip. Here:
- `pressStarting` holds the press that set it and only that press clears it.
- `checkOne` reads the CLI's error with `String()` too; the base branch's object-error
  test found it reaching `error.startsWith` in `explain`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ichandann
ichandann dismissed their stale review November 20, 2026 19:09

The workspace attribution finding is fixed at b410fa2. I checked that a drafted fix for the same warehouse ID cannot pick up the other workspace's spend, and that the what-if disclosure is scoped to its connection and workspace. Shell CI is green on this commit. Clearing my stale code-review request. GitHub still reports a conflict with the #35 base branch, and the compatible published CLI remains a release dependency.

shreyastelkar and others added 21 commits November 20, 2026 11:34
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ection's copy ranks higher; guard Show all/fewer by conversation; README names the Snowflake dbt scope

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
# Conflicts:
#	plugins/altimate-code/hooks/features/savings.tsx
# Conflicts:
#	plugins/altimate-code/hooks/features/savings.tsx
…atform before the connection list is read

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	plugins/altimate-code/hooks/features/savings.tsx
# Conflicts:
#	plugins/altimate-code/hooks/features/savings.tsx
# Conflicts:
#	plugins/altimate-code/hooks/features/savings.test.tsx
#	plugins/altimate-code/hooks/features/savings.tsx
…run-start claims are let go on a failed read or write

- With no altimate-code, or one too old for the check, the connection list is
  never read: the refusal now says "savings check" and "a Databricks or
  Snowflake connection" instead of naming Databricks to a Snowflake user.
- `/savings` and `startPressedRun` let go of their claim when the list read or
  the running-flag write fails, and `runCheck`'s first write is inside the
  `try` whose `finally` lets the claim go.
- The skill tells Claude not to call `finops_snowflake_savings` itself either.
- Tests: a band press while a typed /savings reads the list starts nothing; the
  report names the window the check read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	plugins/altimate-code/hooks/features/savings.tsx
…" 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>

/** The key a finding is counted once under: its resource's and its check's. Two connections that read one workspace list it twice. */
export const findingKey = (view: Pick<SavingsView, 'platform' | 'scope'>, one: Pick<SavingsFinding, 'workspaceId' | 'resourceType' | 'resourceId' | 'checkId'>) =>
`${resourceKey(view, one)}:${one.checkId}`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: A finding with no check_id shares its key with another finding on the same resource

toView (savings.tsx:615) maps a missing check_id to '', so two findings on one resource from an answer that omits it get the same findingKey. distinctFindingCount then makes the status line and the report headline say one finding, and distinctFindings shows only one of them in the slim view, while Show all and the report's cards still list both. Use the finding's title (or another field the answer does carry) when checkId is empty.

const line = fixProgress(fix, view)
// A /clear while the fixes were read: this run writes nothing back.
if (!live()) return []
if (fix !== held) await $.store.set(key, fix).catch(() => undefined)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: A fix drafted without a setting can never learn it, even when drafted again

This change removes mergedConfig, so fixesFor now only rewrites the record for changedSeen. A fix drafted from a row the CLI listed without size keeps { size: null, type: 'PRO' }; a later run that reads SMALL leaves the record as it is, so fixChanged finds no setting known on both sides and fixProgress keeps returning "its size and type were not read both then and now, so nothing is claimed yet", and a real resize after that is never reported. Pressing Draft the fix again does not heal it either: rememberFix (savings.tsx:1370-1373) treats changedSettings({ size: null, type: 'PRO' }, { size: 'SMALL', type: 'PRO' }) === [] as the same config and returns before writing. This is the learning the earlier round asked for (c8adbef); if it is meant to be gone, at least let an explicit re-draft fill what the row now reads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants