fix: the scan-cost check estimates BigQuery only

Merged
HK
15h ago
+80-177

What

The scan-cost check (/scan-cost, /allow-scan, maxScanBytes) now estimates BigQuery only. altimate-code's dbt_cost_estimate is being narrowed to BigQuery in https://github.com/AltimateAI/altimate-code/pull/1840.

  • hooks/features/cost.tsx:
    • The handling of planner (EXPLAIN) estimates is removed: PLANNER_NAMES, NEEDED_PLANNER_VERSION, basisOf, the planner branch of unsupportedWhy, and the planner field on answers, held and last estimates, and notes.
    • An answer that names another adapter, or carries source: "explain", takes the existing unsupported path. The command is never estimated or held, and one line says scans are estimated on BigQuery only. This holds even with an altimate-code that still answers Snowflake or Databricks estimates.
    • Stored state is read field by field, so an old persisted planner field is ignored.
  • types/index.d.ts: planner fields removed.
  • README (scan cost check, maxScanBytes row), plugin.json (maxScanBytes description), and the CHANGELOG [Unreleased] → Changed.

Checks

  • claude plugin test plugins/altimate-code: 1413 pass, 1 fail. The failure is the runs test "a dbt call that starts while another call reads its artifact…", which fails the same way without this change.
  • bash tests/*.sh: all pass.
  • claude plugin validate --strict plugins/altimate-code: the same warnings as main. This change adds none.
  • New tests:
    • A Snowflake planner answer and a Databricks one are neither held nor shown as an estimate.
    • Removing the adapter guard fails them.

Merge after https://github.com/AltimateAI/altimate-code/pull/1840.

🤖 Generated with Claude Code