Skip to content

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

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

shreyastelkar wants to merge 95 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: 2 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 1467 Carried, re-verified. startPressedRun names the check with targetsFor/busyOf before runCheck's sure guard runs, and targetsFor falls back to Databricks for a connection the list holds with platform: null. So a second press in that window toasts "a Databricks savings check is already running" and the busy line names Databricks, for what may be another kind; the typed path has the same guess at line 1699.
plugins/altimate-code/hooks/features/savings.tsx 1043 Carried, re-verified. targetsKnown's named branch repeats kindOf's predicate verbatim (!!connections?.some(one => one.name === asked && one.platform !== null)); asked ? kindOf(asked, connections) : ... removes the duplicate.
Files Reviewed (3 files)
  • plugins/altimate-code/hooks/savings-checks.ts - 0 new (the new jobCheckRanInPart helper is consistent with skippedChecks/nothingRan; names cannot contain " (" here, so the reason strip is safe)
  • plugins/altimate-code/hooks/features/savings.tsx - 0 new, 2 carried (carried lines are outside the increment's hunks)
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 new

Notes on verification: static review only (tests were not executed). This pass covers d19511c4..feff1920 (3 files, 11 added and 4 removed lines). The previous inline finding at savings.tsx:898 is resolved: summary() now appends "in full" through jobCheckRanInPart, and both affected toast assertions were updated, so the notice no longer claims all four checks failed to run when part of the job check did. The earlier test-quality note on savings.test.tsx:4974 ("a failed answer whose error is an empty string…") is dropped: that line is not in this PR's diff at all (it is unchanged from the base branch), so it is outside review scope.

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

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

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 898 New. When the three other checks and only the submitted-runs query were skipped, this branch says part of the job check ran, but summary() (line 906) still appends skippedChecks(view) as ; 4 of the 4 checks could not run, so the notice and the pane contradict each other for the same answer. Say the checks did not run in full, or leave the count out when a check ran in part.
plugins/altimate-code/hooks/features/savings.tsx 1466 Carried, re-verified. startPressedRun names the platform with targetsFor/busyOf for a connection the list holds with platform: null, and targetsFor falls back to Databricks, so "already running" and the busy line can name the wrong platform until the run's own sure guard rewrites mine.name.
plugins/altimate-code/hooks/features/savings.tsx 1042 Carried, re-verified. targetsKnown's named branch repeats kindOf verbatim (asked ? !!connections?.some(one => one.name === asked && one.platform !== null) : ...); delegating to kindOf(asked, connections) removes the duplicate predicate.
plugins/altimate-code/hooks/features/savings.test.tsx 4981 Carried, re-verified (summary-only). The test named "a failed answer whose error is an empty string shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; it should assert that warehouse unreachable reaches the pane. Its line is outside this increment's hunks.
Files Reviewed (3 files)
  • plugins/altimate-code/hooks/savings-checks.ts - 0 new (the previous finding on the fold is fixed by this commit)
  • plugins/altimate-code/hooks/features/savings.tsx - 1 new, 2 carried (carried lines are outside the increment's hunks)
  • plugins/altimate-code/hooks/features/savings.test.tsx - 0 new, 1 carried (summary-only)

Notes on verification: static review only (tests were not executed). This pass covers 90bb9fa4..d19511c4 (3 files, 27 added and 4 removed lines). The previous finding on savings-checks.ts is fixed: nothingRan no longer counts the submitted-runs name, and the new test "when the job check lost only its submitted runs and the rest were skipped, something was still checked" covers it. The remaining new finding is the toast wording that the same test asserts.

Fix these issues in Kilo Cloud

Previous review (commit 90bb9fa)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/savings-checks.ts 29 New. Folding the submitted-runs skip into Job Running on All-Purpose Compute makes skippedChecks return 4 when the three other checks and only the submitted-runs query were skipped, so nothingRan makes the pane, the toast and the report say none of the 4 checks could run even though the job query ran (its checked.jobs count is shown). Keep the fold for the tally, but let nothingRan require each of the four real check names.
plugins/altimate-code/hooks/features/savings.tsx 1464 Carried, re-verified. runCheck withholds the platform for a named connection of unknown kind (sure), but startPressedRun still names Databricks in mine.name and busyOf for a connection the list holds with platform: null, so "already running" and the busy line can name the wrong platform until the run's own sure guard rewrites mine.name.
plugins/altimate-code/hooks/features/savings.tsx 1040 Carried, re-verified. targetsKnown's named branch repeats kindOf verbatim (asked ? !!connections?.some(one => one.name === asked && one.platform !== null) : ...); delegating to kindOf(asked, connections) removes the duplicate predicate.
plugins/altimate-code/hooks/features/savings.test.tsx 4967 Carried, re-verified (summary-only). The test named "a failed answer whose error is an empty string shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; it should assert that warehouse unreachable reaches the pane. Its line is outside this increment's hunks, so it is summary-only.
Files Reviewed (3 files)
  • plugins/altimate-code/hooks/savings-checks.ts - 1 new
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 carried (summary-only), 0 new
  • plugins/altimate-code/hooks/features/savings.tsx - 2 carried (targeted check only; not in the incremental diff), 0 new

Notes on verification: static review only (tests were not executed). This pass covers 7a4147ef..90bb9fa4 (2 files, 18 changed lines). The previous finding on savings-checks.ts is fixed by this commit: the submitted-runs name is folded into the job check rather than dropped, and the new test ("when only the submitted runs were skipped...") plus the added unit assertion fail without it. savings.tsx was unchanged in this increment; its two carried findings were re-checked at lines 1039-1044 and 1459-1465 and still exist.

Previous review (commit 7a4147e)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/savings-checks.ts 28 New. skippedChecks removes PART_OF_JOB_CHECK instead of counting it as the job check, so a run that skips only the submitted-runs query (the case its own comment describes) reports the job check as run: No savings found by the 4 of 4 checks that ran., and the notice appends ; 0 of the 4 checks could not run, while the pane prints Not checked: Repeated Submitted Runs on All-Purpose Compute (…). Folding the name into Job Running on All-Purpose Compute before the Set keeps this commit's case at one skipped check. The new test covers only the case where Job Running is skipped too.
plugins/altimate-code/hooks/features/savings.tsx 1464 Carried, re-verified. runCheck withholds the platform for a named connection of unknown kind (sure), but startPressedRun still names Databricks in mine.name and busyOf for a connection the list holds with platform: null, so "already running" and the pane can name the wrong platform until the run's own sure guard rewrites mine.name.
plugins/altimate-code/hooks/features/savings.tsx 1040 Carried, re-verified. targetsKnown's named branch repeats kindOf verbatim (asked ? !!connections?.some(one => one.name === asked && one.platform !== null) : ...); delegating to kindOf(asked, connections) removes the duplicate predicate.
plugins/altimate-code/hooks/features/savings.test.tsx 4929 Carried, re-verified (summary-only). The test named "a failed answer whose error is an empty string shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; it should assert that warehouse unreachable reaches the pane. Its line is outside this PR's hunks, so it is summary-only.
Files Reviewed (5 files in incremental diff)
  • plugins/altimate-code/README.md - 0
  • plugins/altimate-code/hooks/features/savings-core.testkit.ts - 0
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 carried (summary-only), 0 new
  • plugins/altimate-code/hooks/features/savings.tsx - 2 carried, 0 new
  • plugins/altimate-code/hooks/savings-checks.ts - 1 new

Notes on verification: static review only (tests were not executed; running them is out of scope for this read-only pass). This pass covers 3400980..7a4147ef. The four findings from the previous summary are fixed: the check tallies now treat the submitted-runs read as part of the job check (README updated), checkedText builds its parts once, the core testkit carries submit_run_on_all_purpose, and the kept-view test seeds a stored view without submitted. The testkit additions are internally consistent (daily × 30 = monthly, wasted_cost matches the DBU and rate deltas, and the updated total equals the previous total plus the two new findings); the new skipped-count test's Serverless SQL Warehouse name is unused elsewhere but only the count matters there.

Fix these issues in Kilo Cloud

Previous review (commit 3400980)

Status: 7 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 663 New. submitted_workloads_checked adds a fifth read category (its finding has its own check_id), but the check tallies are still the hardcoded four (LOCAL_CHECK_COUNT = 4, the nine NOT_RUN rows = 13 − 4, the "These were 4 of Altimate's 13 Databricks checks" footer and README's four-check list). With the submitted-runs check now running, those numbers disagree with the pane's own header. If it is a check of its own, they are off by one; if it runs inside Job Running on All-Purpose Compute, the footer and docs should say so.
plugins/altimate-code/hooks/features/savings.tsx 884 New. checkedText's conjunction is assembled from two conditions that must stay in sync: last carries the and in only one branch, and the separator is chosen by testing submitted > 0 again. Building the parts and joining them once (parts.slice(0, -1).join(', ') + ' and ' + parts.at(-1)) is simpler and yields the same two sentences.
plugins/altimate-code/hooks/features/savings.test.tsx 1230 New. submit_run_on_all_purpose is not in savings-core.testkit.ts, whose guard test asserts every core finding kind and scans every title, fact, evidence line and fix request for ?, undefined and NaN. A field core leaves out for this kind would go uncaught; the new fixture has every field present.
plugins/altimate-code/hooks/features/savings.test.tsx 1276 New. The "view kept from before the submitted-run check" test runs a fresh answer through toView, which always sets submitted, so checked.submitted ?? 0 is never exercised; the test passes without the fallback. It should seed store with a view whose checked lacks submitted.
plugins/altimate-code/hooks/features/savings.tsx 1464 Carried, re-verified. runCheck withholds the platform for a named connection of unknown kind (sure), but startPressedRun still names Databricks in mine.name and busyOf for a connection the list holds with platform: null, so "already running" and the pane can name the wrong platform until the run's own sure guard rewrites mine.name.
plugins/altimate-code/hooks/features/savings.tsx 1040 Carried, re-verified. targetsKnown's named branch repeats kindOf verbatim (asked ? !!connections?.some(one => one.name === asked && one.platform !== null) : ...); delegating to kindOf(asked, connections) removes the duplicate predicate.
plugins/altimate-code/hooks/features/savings.test.tsx 4929 Carried, re-verified (summary-only). The test named "a failed answer whose error is an empty string shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; it should assert that warehouse unreachable reaches the pane. Its line is outside this PR's hunks, so it is summary-only.
Files Reviewed (3 files in incremental diff)
  • plugins/altimate-code/hooks/features/savings.tsx - 2 carried, 2 new
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 carried (summary-only), 2 new
  • plugins/altimate-code/types/index.d.ts - 0

Notes on verification: static review only (tests were not executed). This pass covers 53ef8d3..3400980, the submitted-runs rendering (evidence and fact lines, the fix text per orchestrator, the checked count, and the band's id matching). The new evidence and fact branches degrade like the neighbouring job branch for a missing orchestrator, cluster id or count (oneLine, count, tenths), the many() path keeps the old sentence unchanged when submitted is 0, and excluding workload from the band's id match is right because a workload id is qualified (ADF:pl_load_orders) while its name still matches as a whole word.

Previous review (commit 53ef8d3)

Status: 3 Issues Found | Recommendation: Address before merge

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 1417 Carried and re-verified at this head: runCheck withholds the platform for a named connection of unknown kind (sure), but startPressedRun still names Databricks in mine.name and busyOf for a connection the list holds with platform: null, so "already running" and the pane can name the wrong platform until the run's own sure guard rewrites mine.name.
plugins/altimate-code/hooks/features/savings.tsx 992 Carried and re-verified: targetsKnown's named branch repeats kindOf verbatim (asked ? !!connections?.some(one => one.name === asked && one.platform !== null) : ...); delegating to kindOf(asked, connections) removes the duplicate predicate.
plugins/altimate-code/hooks/features/savings.test.tsx 4877 Carried and re-verified: the test named "a failed answer whose error is an empty string shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; it should assert that warehouse unreachable reaches the pane. Its line is outside this PR's hunks, so it is summary-only.
Files Reviewed (2 files in incremental diff)
  • plugins/altimate-code/hooks/features/savings.tsx - 2 carried
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 carried (summary-only)

Notes on verification: static review only (tests were not executed). This pass covers 7835790..53ef8d30, which is the previous round's status-line finding plus its two tests. That finding is fixed here: the run's cleanup now captures whether the flag it clears was the /clear carry-over and redraws the status line when it was (if (live() || carried) await drawStatus($)), and the new test asserts the status shows checking savings… after the /clear and stops once the earlier check ends. The atom updater's carried capture matches the value the write commits, and a dropped run cannot clear a newer run's flag (no run can claim while the earlier claim is held), so the change does not introduce a stale or wrong status. The earlier slim-view fix-line finding is dropped: fixKey keys a kept fix by connection, workspace, resource type and id (not by check), so one connection holds at most one fix line per resource and the resourceKey dedupe only collapses the same resource seen through two connections to one account, which the code documents as intended.

Previous review (commit 7835790)

Status: 5 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 1387 New. sessionEnd now leaves STILL_READING_BUSY behind for a check from before the /clear. When that run ends, this line clears the flag but only redraws the status if (live()), so the status line keeps checking savings… while the pane already shows the kept answer again.
plugins/altimate-code/hooks/features/savings.tsx 1411 Carried and re-verified at this head: runCheck withholds the platform for a named connection of unknown kind (sure), but startPressedRun still names Databricks in mine.name and busyOf for a connection the list holds with platform: null, so "already running" can name the wrong platform in that window.
plugins/altimate-code/hooks/features/savings.tsx 1764 Carried and re-verified: the slim view's fix-line dedupe keys on resourceKey (platform, scope, workspace, type, id) and not on the check that drafted the fix, so two fixes on one resource from different checks lose one line in the slim view (Show all lists both).
plugins/altimate-code/hooks/features/savings.tsx 992 Carried and re-verified: targetsKnown's named branch repeats kindOf verbatim; delegating removes the duplicate predicate.
plugins/altimate-code/hooks/features/savings.test.tsx 4852 Carried and re-verified: the test named "shows the CLI's own text" only asserts that /no answer/ is absent, so an empty or wrong refusal still passes; it should assert that warehouse unreachable reaches the pane. Its line is outside this PR's hunks, so it is summary-only.
Files Reviewed (2 files in incremental diff)
  • plugins/altimate-code/hooks/features/savings.tsx - 1 new suggestion, 3 carried
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 carried (summary-only)

Notes on verification: static review only (tests were not executed). This pass covers this PR's own changes after 251dc70: commit 7835790 adds the carried-over busy state for a /clear during a reading check, and the test updates that go with it. The rest of 251dc70..HEAD is stacked-base and main content merged in, including the stricter ownVersion version gate the previous round asked for. The carryover flag was traced through every writer and clearer and cannot strand: sessionEnd sets it only for a claim whose CLI is reading, and it is cleared by that run's finally, by a later sessionEnd, or by sessionStart once the claim is gone; RUN_BUDGET_MS (10 minutes, measured from the run start) bounds the tool call, so the pane's "stopped within 10 minutes of starting" holds. The human reviewer's open items are not repeated here: the 0.12.13 minimum is picked up through the merge, and the stricter version reader is in place at this head.

Fix these issues in Kilo Cloud

Previous review (commit 251dc70)

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

Overview

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

SUGGESTION

File Line Issue
plugins/altimate-code/hooks/features/savings.tsx 1314 runCheck withholds the platform for a named connection of unknown kind, but the claim name and busy text set earlier in startPressedRun (1390-1391) still fall back to Databricks for a connection the list holds with platform: null, so Run again briefly shows the Databricks busy text and can toast "The Databricks savings check is already running". Apply the same kindOf/targetsKnown gate there.
plugins/altimate-code/hooks/features/savings.tsx 1743 The slim view's fix-line dedupe keys on resourceKey (platform, scope, workspace, type, id) and not on which check the fix was drafted from, so two connections on one account, each with a fix on the same resource from a different check, lose one line in the slim view (Show all still lists both).
plugins/altimate-code/hooks/features/savings.tsx 981 targetsKnown's named branch duplicates kindOf verbatim; delegating in that branch removes the repeated predicate.
plugins/altimate-code/hooks/features/savings.test.tsx 4844 Carried from the previous review and re-verified at this head: 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 warehouse unreachable reaches the pane. Its line is outside this PR's hunks, so it is reported here only.
Files Reviewed (4 files in incremental diff)
  • plugins/altimate-code/hooks/features/savings.tsx - 3 suggestions
  • plugins/altimate-code/hooks/features/savings.test.tsx - 1 suggestion (carried, summary-only)
  • plugins/altimate-code/hooks/savings-config.ts - 0 issues
  • plugins/altimate-code/hooks/savings-format.ts - 0 issues

Notes on verification: static review only (tests were not executed). This pass covers the merge e803cbc and the two commits after it (723a926, 251dc70); the rest of the c0bb47f..HEAD range is base-branch and main content merged in, not this PR's changes. The previous round's two suggestions are fixed at this head: findingKey falls back to title:${title} when the answer gives no check_id, and a re-draft fills a setting the first draft did not read (fillUnknown in rememberFix), with tests for both. The new sure rule was traced through the version-gate refusal, the per-answer refusals, the notices and the report's platform: null path, and the null platform is handled everywhere it is read. The human reviewer's open items are not repeated here: the published 0.12.12 launch is closed by the 0.12.13 minimum, while the stricter version reader they asked for is still parseVersion in versionOf at this head.

Fix these issues in Kilo Cloud

Previous review (commit c0bb47f)

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 findi

[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

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 15:44
…" 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 ichandann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

shreyastelkar and others added 3 commits November 23, 2026 11:19
# 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 ichandann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@sahrizvi sahrizvi mentioned this pull request Nov 27, 2026
shreyastelkar and others added 2 commits November 30, 2026 13:07
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>
shreyastelkar and others added 2 commits December 3, 2026 12:23
…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>
@shreyastelkar

Copy link
Copy Markdown
Author

@suryaiyer95 review please

@suryaiyer95 suryaiyer95 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 suryaiyer95 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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).

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.

3 participants