Skip to content

Commit 5b3a5d5

Browse files
anandgupta42claude
andcommitted
chore: upgrade @altimateai/altimate-core to 0.8.0
- Pin `@altimateai/altimate-core` 0.8.0 and refresh `bun.lock` (main + 5 platform packages). - Exempt the first-party `@altimateai/altimate-core*` packages from the 3-day `minimumReleaseAge` in `bunfig.toml`, matching the existing first-party/pinned excludes, so a core release can be adopted on the day it ships. - Update the tests that pinned the old fail-closed behaviour: DuckDB `//`, `TIMESTAMPTZ '...'`, a `match` alias and SQLite `NOT GLOB` now parse and run as reads; enable the previously skipped `//` aggregate test; keep parse-failure coverage with a malformed `string_agg`. Closes #1529 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent b12bce3 commit 5b3a5d5

5 files changed

Lines changed: 28 additions & 20 deletions

File tree

‎bun.lock‎

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎bunfig.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
exact = true
33
# Only install newly resolved package versions published at least 3 days ago.
44
minimumReleaseAge = 259200
5-
minimumReleaseAgeExcludes = ["@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "opentui-spinner", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron-builder", "electron-publish"]
5+
minimumReleaseAgeExcludes = ["@altimateai/altimate-core", "@altimateai/altimate-core-darwin-arm64", "@altimateai/altimate-core-darwin-x64", "@altimateai/altimate-core-linux-arm64-gnu", "@altimateai/altimate-core-linux-x64-gnu", "@altimateai/altimate-core-win32-x64-msvc", "@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "opentui-spinner", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron-builder", "electron-publish"]
66

77
[test]
88
root = "./do-not-run-tests-from-root"

‎packages/opencode/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@ai-sdk/togetherai": "2.0.41",
8080
"@ai-sdk/vercel": "2.0.39",
8181
"@ai-sdk/xai": "3.0.82",
82-
"@altimateai/altimate-core": "0.7.0",
82+
"@altimateai/altimate-core": "0.8.0",
8383
"@altimateai/drivers": "workspace:*",
8484
"@aws-sdk/credential-providers": "3.1057.0",
8585
"@clack/prompts": "1.0.0-alpha.1",

‎packages/opencode/test/altimate/tools/sql-classify.test.ts‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -341,18 +341,20 @@ describe("SQL-building aggregates are reads", () => {
341341
})
342342
}
343343

344-
// Known core-parser gap (altimate-core-internal): DuckDB `//` integer division fails to parse,
345-
// so a read-only string_agg query using it is conservatively classified as a write.
346-
// Flip to `test` once the parser supports it.
347-
test.skip("duckdb: `//` integer division in a string_agg query → read (core parser gap)", () => {
344+
test("duckdb: `//` integer division in a string_agg query → read", () => {
348345
const sql = "SELECT 'c' || (rn // 240) c, count(*), string_agg('''' || Symbol || '''', ',' ORDER BY Symbol) FROM t GROUP BY 1"
349-
expect(classifyAndCheck(sql, "duckdb").queryType).toBe("read")
346+
expect(classifyAndCheck(sql, "duckdb")).toEqual({ queryType: "read", blocked: false })
350347
})
351348

352-
test("duckdb: `//` currently fails closed with an explanatory diagnostic", () => {
349+
test("duckdb: `//` classifies as read without a parse diagnostic", () => {
353350
const r = classifyAndCheck("SELECT 'c' || (rn // 240) c, string_agg(Symbol, ',') FROM t GROUP BY 1", "duckdb")
351+
expect(r).toEqual({ queryType: "read", blocked: false })
352+
})
353+
354+
test("duckdb: malformed string_agg fails closed with an explanatory diagnostic", () => {
355+
const r = classifyAndCheck("SELECT string_agg(Symbol, ','", "duckdb")
354356
expect(r.queryType).toBe("write")
355357
expect(r.blocked).toBe(false)
356-
expect(r.parseError).toBeTruthy()
358+
expect(r.parseError).toMatch(/Parse error.*Expected RParen/)
357359
})
358360
})

‎packages/opencode/test/altimate/tools/sql-execute.test.ts‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,20 @@ describe("sql_execute parser read boundary", () => {
109109
["sqlite", "SELECT 'article' NOT GLOB 'a*'"],
110110
["duckdb", "SELECT TIMESTAMPTZ '2024-02-03 00:00:00+00'"],
111111
["duckdb", "SELECT * FROM items match"],
112-
])("explains unsupported %s read syntax: %s", async (type, query) => {
112+
])("accepts %s read syntax the parser now supports: %s", async (type, query) => {
113113
const config = spyOn(Registry, "getConfig").mockReturnValue({ type })
114114
const tool = await initTool(SqlExecuteTool)
115115
const ask = spyOn(ctx, "ask").mockImplementation(() => Effect.die(new Error("write denied by test")))
116116
try {
117-
await expect(tool.execute({ query, warehouse: "source" }, ctx)).rejects.toThrow("write denied by test")
118-
expect(ask).toHaveBeenCalledTimes(1)
119-
expect(dispatch).not.toHaveBeenCalled()
117+
const result = await tool.execute({ query, warehouse: "source" }, ctx)
118+
expect(result.metadata.error).toBeUndefined()
119+
expect(ask).not.toHaveBeenCalled()
120+
expect(dispatch).toHaveBeenCalledTimes(1)
121+
expect(dispatch).toHaveBeenCalledWith(
122+
"sql.execute",
123+
expect.objectContaining({ sql: query, warehouse: "source" }),
124+
expect.anything(),
125+
)
120126
} finally {
121127
ask.mockRestore()
122128
config.mockRestore()

0 commit comments

Comments
 (0)