Skip to content

Commit 6edf2e5

Browse files
VJ-yadavVijay Yadav
andcommitted
fix: include dialect in all early-return metadata paths
Address behavioral analysis findings: the NO SCHEMA early returns in validate, semantics, and equivalence tools, plus the NO MANIFEST and MODEL NOT FOUND early returns in impact-analysis, were missing the dialect field in their metadata. All return paths now consistently include dialect for telemetry. Co-Authored-By: Vijay Yadav <vijay@studentsucceed.com>
1 parent 0c66a13 commit 6edf2e5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

packages/opencode/src/altimate/tools/altimate-core-equivalence.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const AltimateCoreEquivalenceTool = Tool.define("altimate_core_equivalenc
2424
"No schema provided. Provide schema_context or schema_path so table/column references can be resolved."
2525
return {
2626
title: "Equivalence: NO SCHEMA",
27-
metadata: { success: false, equivalent: false, has_schema: false, error },
27+
metadata: { success: false, equivalent: false, dialect: args.dialect, has_schema: false, error },
2828
output: `Error: ${error}`,
2929
}
3030
}

packages/opencode/src/altimate/tools/altimate-core-semantics.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const AltimateCoreSemanticsTool = Tool.define("altimate_core_semantics",
2323
"No schema provided. Provide schema_context or schema_path so table/column references can be resolved."
2424
return {
2525
title: "Semantics: NO SCHEMA",
26-
metadata: { success: false, valid: false, issue_count: 0, has_schema: false, error },
26+
metadata: { success: false, valid: false, issue_count: 0, dialect: args.dialect, has_schema: false, error },
2727
output: `Error: ${error}`,
2828
}
2929
}

packages/opencode/src/altimate/tools/altimate-core-validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const AltimateCoreValidateTool = Tool.define("altimate_core_validate", {
2424
"No schema provided. Provide schema_context or schema_path so table/column references can be resolved."
2525
return {
2626
title: "Validate: NO SCHEMA",
27-
metadata: { success: false, valid: false, has_schema: false, error },
27+
metadata: { success: false, valid: false, dialect: args.dialect, has_schema: false, error },
2828
output: `Error: ${error}`,
2929
}
3030
}

packages/opencode/src/altimate/tools/impact-analysis.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const ImpactAnalysisTool = Tool.define("impact_analysis", {
3737
if (!manifest.models || manifest.models.length === 0) {
3838
return {
3939
title: "Impact: NO MANIFEST",
40-
metadata: { success: false },
40+
metadata: { success: false, dialect: args.dialect },
4141
output: `No models found in manifest at ${args.manifest_path}. Run \`dbt compile\` first to generate the manifest.`,
4242
}
4343
}
@@ -54,7 +54,7 @@ export const ImpactAnalysisTool = Tool.define("impact_analysis", {
5454
.join(", ")
5555
return {
5656
title: "Impact: MODEL NOT FOUND",
57-
metadata: { success: false },
57+
metadata: { success: false, dialect: args.dialect },
5858
output: `Model "${args.model}" not found in manifest. Available models: ${available}${manifest.models.length > 10 ? ` (+${manifest.models.length - 10} more)` : ""}`,
5959
}
6060
}

0 commit comments

Comments
 (0)