Skip to content

Commit d2ad6ac

Browse files
VJ-yadavanandgupta42
authored andcommitted
fix: thread dialect through altimate_core.policy handler
Code review (Gemini 3.1 Pro) caught a missed handler in the dialect-threading migration: 'altimate_core.policy' (altimate-core.ts:200) called schemaOrEmpty() without params.dialect, while the 6 other policy- family handlers (validate, check, fix, semantics, equivalence, correct, explain) all pass it through. AltimateCorePolicyParams already declares 'dialect?: string' in types.ts and the tool definition plumbs it into Dispatcher.call(), so the param was reaching the handler but being silently discarded at the schema resolution step — meaning the fallback empty schema was always built with the default (Snowflake) dialect instead of the user-selected one, defeating the purpose of PR #550 for policy checks specifically. 1-line fix brings the policy handler into line with its 6 siblings.
1 parent 4ceea83 commit d2ad6ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/opencode/src/altimate/native/altimate-core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export function registerAll(): void {
197197
// 8. altimate_core.policy
198198
register("altimate_core.policy", async (params) => {
199199
try {
200-
const schema = schemaOrEmpty(params.schema_path, params.schema_context)
200+
const schema = schemaOrEmpty(params.schema_path, params.schema_context, params.dialect)
201201
const raw = await core.checkPolicy(params.sql, schema, params.policy_json)
202202
const data = toData(raw)
203203
return ok(true, data)

0 commit comments

Comments
 (0)