Skip to content

Commit f898f1d

Browse files
anandgupta42claude
andcommitted
release: v0.6.1
Patch release. User-facing: BigQuery finops tools were 100%-broken and are now fixed, and work in any BigQuery region (previously hardcoded to US). Changes since v0.6.0: - fix: BigQuery finops SQL — correct INFORMATION_SCHEMA columns + multi-region support (#739, closes #738). `error_message`/`error_code`/`total_rows` bugs plus `state='SUCCESS'` vs BQ's actual `'DONE'` (every completed job was being reported as FAILED). All 5 finops modules now read the BQ connection's `location` via a sanitised `{region}` placeholder. - fix: make anti-slop workflow advisory instead of auto-closing legitimate PRs (#741, closes #740). - fix: marker-guard hotfix for isValidDatabricksHost env-fallback path. - docs: 12 end-to-end showcase examples + `location` documented for BQ (#742). Review: 5-persona review (CTO/PM/DE/Tech Lead/Chaos Gremlin) ran on main — no P0s, no HOLDs. 1 P1 (silent `us` fallback compliance concern — addressed via docs + changelog warnings; behaviour-change follow-ups tracked in #754). 2 HIGH docs-accuracy items fixed pre-tag: `location` row in drivers.md and finops-tools.md. Tests: - 47 new adversarial tests in test/skill/release-v0.6.1-adversarial.test.ts (sanitizeBqRegion injection vectors, interpolateBqRegion idempotency, bqRegionFor registry edge cases, BIGQUERY_HISTORY_SQL column-name regression guards for all four #739 bugs, cross-module {region} guard, buildHistoryQuery full-pipeline incl. Snowflake/Databricks no-regression). - 409/409 tests pass across finops + skill suites. Full altimate suite previously green (2917/2917) on #739 merge. - Typecheck: 5/5 pass. Marker guard: clean. Pre-release sanity: all 4 green. Deferred: BQ finops UX + robustness follow-ups filed as #754 (surface queried region in responses, distinguish no-location vs invalid-location, warn at warehouse_add time, friendlier perms error, options-object refactor, e2e silent-skip warning). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 355d302 commit f898f1d

5 files changed

Lines changed: 470 additions & 2 deletions

File tree

‎.github/meta/commit.txt‎

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1-
release: v0.6.0
1+
release: v0.6.1
2+
3+
Patch release. User-facing: BigQuery finops tools were 100%-broken and are
4+
now fixed, and work in any BigQuery region (previously hardcoded to US).
5+
6+
Changes since v0.6.0:
7+
8+
- fix: BigQuery finops SQL — correct INFORMATION_SCHEMA columns + multi-region
9+
support (#739, closes #738). `error_message`/`error_code`/`total_rows` bugs
10+
plus `state='SUCCESS'` vs BQ's actual `'DONE'` (every completed job was
11+
being reported as FAILED). All 5 finops modules now read the BQ
12+
connection's `location` via a sanitised `{region}` placeholder.
13+
- fix: make anti-slop workflow advisory instead of auto-closing legitimate
14+
PRs (#741, closes #740).
15+
- fix: marker-guard hotfix for isValidDatabricksHost env-fallback path.
16+
- docs: 12 end-to-end showcase examples + `location` documented for BQ (#742).
17+
18+
Review: 5-persona review (CTO/PM/DE/Tech Lead/Chaos Gremlin) ran on main —
19+
no P0s, no HOLDs. 1 P1 (silent `us` fallback compliance concern — addressed
20+
via docs + changelog warnings; behaviour-change follow-ups tracked in #754).
21+
2 HIGH docs-accuracy items fixed pre-tag: `location` row in drivers.md and
22+
finops-tools.md.
23+
24+
Tests:
25+
- 47 new adversarial tests in test/skill/release-v0.6.1-adversarial.test.ts
26+
(sanitizeBqRegion injection vectors, interpolateBqRegion idempotency,
27+
bqRegionFor registry edge cases, BIGQUERY_HISTORY_SQL column-name
28+
regression guards for all four #739 bugs, cross-module {region} guard,
29+
buildHistoryQuery full-pipeline incl. Snowflake/Databricks no-regression).
30+
- 409/409 tests pass across finops + skill suites. Full altimate suite
31+
previously green (2917/2917) on #739 merge.
32+
- Typecheck: 5/5 pass. Marker guard: clean. Pre-release sanity: all 4 green.
33+
34+
Deferred: BQ finops UX + robustness follow-ups filed as #754 (surface
35+
queried region in responses, distinguish no-location vs invalid-location,
36+
warn at warehouse_add time, friendlier perms error, options-object
37+
refactor, e2e silent-skip warning).
238

339
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

‎CHANGELOG.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.6.1] - 2026-04-24
9+
10+
### Fixed
11+
12+
- **BigQuery finops tools were broken — now work, in any region.** `finops_query_history` was failing 100% on BigQuery with `Unrecognized name: error_message at [11:5]`. Three separate bugs in the `INFORMATION_SCHEMA.JOBS` template: (a) `error_message` and `error_code` were read as top-level columns but they only exist inside the `error_result` struct — now reads `error_result.message` and `error_result.reason`; (b) `total_rows` is a `PARTITIONS` column, not `JOBS` — replaced with `CAST(NULL AS INT64) AS rows_produced`; (c) BigQuery's `state` returns `'DONE'`, not `'SUCCESS'`, so the summary loop was reporting every completed job as FAILED — now derives `execution_status` from `error_result IS NULL`. Every successful BQ job now reports as SUCCESS. (#739, closes #738)
13+
- **BigQuery finops unusable outside US region.** All five finops modules (`finops_query_history`, `finops_analyze_credits`, `finops_expensive_queries`, `finops_warehouse_advice`, `finops_unused_resources`, `finops_role_grants`) hardcoded `` `region-US.INFORMATION_SCHEMA.*` ``. Now reads the BigQuery connection's configured `location` (e.g. `us`, `eu`, `us-central1`, `asia-northeast1`), sanitised via an `[a-z0-9-]` allowlist with a 64-char cap and hyphen trim. If `location` is unset the tool defaults to `us` — **set `location` explicitly on the BigQuery connection for non-US projects** or you will query the wrong region. Snowflake and Databricks paths are unchanged. (#739)
14+
15+
### Docs
16+
17+
- **New showcase page** (`docs/examples/`) with 12 end-to-end workflow demos — dbt peer review, column-level lineage diff, MS SQL → Fabric migration, Fabric platform admin, upstream schema change, NYC Taxi, Olist, Spotify, and more. (#742)
18+
- **`location` field documented** on the BigQuery connection and called out on the finops tools page.
19+
20+
### Data handling
21+
22+
- `finops_query_history`, `finops_analyze_credits`, and `finops_warehouse_advice` read `user_email` (BigQuery), `user_name` (Snowflake / Databricks / ClickHouse), and raw `query_text` from warehouse system views. Results are returned to the agent and enter the LLM context window. No telemetry or backend upload. Review your tenant's data-handling policy before enabling finops tools in regulated (PII / PHI / PCI) environments.
23+
- `finops_unused_resources` on BigQuery reads `INFORMATION_SCHEMA.TABLE_STORAGE`, which is an org-level view. Project-scoped service accounts typically require `bigquery.resourceAdmin` at the org to avoid a permission error.
24+
25+
### Internal
26+
27+
- `anti-slop` CI workflow is now advisory — labels + comments still fire on blocked-term hits, but the workflow no longer auto-closes PRs. Root cause: the repo's pull-request template embeds an HTML comment instructing AI to insert "PINEAPPLE", which `anti-slop.yml` also blocklists — every AI-assisted team-member PR was auto-closing within two minutes. (#741, closes #740)
28+
- Marker-guard hotfix: the `isValidDatabricksHost` env-fallback path added in v0.6.0 straddled the post-push Marker Guard's `-U5` diff window; wrapped in an inline `altimate_change` marker pair to keep strict mode green.
29+
30+
### Testing
31+
32+
- New adversarial tests for v0.6.1 in `packages/opencode/test/skill/release-v0.6.1-adversarial.test.ts`: `sanitizeBqRegion` injection vectors (CRLF, null bytes, backticks, path traversal, Unicode homoglyphs, prototype-pollution-adjacent inputs), `interpolateBqRegion` idempotency and multi-placeholder safety, `bqRegionFor` registry edge cases, BIGQUERY_HISTORY_SQL column-name regression guards (all four #739 bugs), cross-module "every BQ template uses `{region}`" guard, and full-pipeline `buildHistoryQuery` behaviour including Snowflake / Databricks no-regression guards.
33+
834
## [0.6.0] - 2026-04-21
935

1036
### Added

‎docs/docs/data-engineering/tools/finops-tools.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Summary:
3535

3636
**Data sources by warehouse:**
3737
- Snowflake: `QUERY_HISTORY` function
38-
- BigQuery: `INFORMATION_SCHEMA.JOBS`
38+
- BigQuery: region-qualified `` `region-<location>.INFORMATION_SCHEMA.JOBS` `` — the region is auto-resolved from the BigQuery connection's `location` (e.g. `us`, `eu`, `us-central1`, `asia-northeast1`). If `location` is unset the tool defaults to `us`. Set `location` explicitly for non-US projects or you will query the wrong region.
3939
- Databricks: `system.query.history`
4040
- PostgreSQL: `pg_stat_statements`
4141

‎docs/docs/drivers.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ altimate-dbt init --project-root /path/to/dbt/project --python-path $(which pyth
114114
| Service Account | `project`, `credentials_path` (path to JSON key file) |
115115
| ADC | `project` (uses Application Default Credentials) |
116116

117+
Optional: `location` (e.g. `us`, `eu`, `us-central1`, `asia-northeast1`). Required for non-US projects using finops tools — the `INFORMATION_SCHEMA` views are region-scoped. Defaults to `us` if unset.
118+
117119
### Databricks
118120
| Method | Config Fields |
119121
|--------|--------------|

0 commit comments

Comments
 (0)