altimate-code
altimate-code copied to clipboard
dbt tool regression: silent failures, schema format inconsistencies, wrong results
Ran a comprehensive test of 30+ dbt-related tools against the jaffle_shop-altimate project (DuckDB backend, dbt 1.8.7). Found 5 broken tools and 6 degraded tools out of 31 tested.
Broken Tools (❌)
sql_rewrite—Failed to parse JSON schema: missing field 'tables'. Schema format expects{tables: ...}wrapper but docs/other tools use flat{table: {col: type}}.lineage_check— Same schema format error:missing field 'tables'.altimate_core_fix— "Could not auto-fix the SQL" for an obviousasdasstray alias (order_id as order_id asdas). Should be trivially fixable.altimate_core_rewrite— "No rewrites suggested" for aSELECT *query with schema_context provided. Should have expanded the wildcard.altimate_core_schema_diff— Returns "Schemas are identical" when comparing schemas with dropped columns (first_name,last_name) and added columns (full_name,phone). Correctness bug.
Degraded Tools (⚠️)
sql_analyze— "Analysis failed: Unknown error" with no details. Core analysis tool is silently failing.altimate_core_validate— Returns "Validation failed:" with empty message body.altimate_core_grade— Returns "Grade: undefined" instead of an A-F score.altimate_core_column_lineage— "No column lineage edges found" for valid multi-join SQL with schema_context.altimate_core_testgen— "No test cases generated" for a GROUP BY query that should produce boundary/NULL tests.altimate_core_complete— "No completions available" with valid prefix and schema_context.
Root Cause Patterns
- Schema format inconsistency:
sql_rewriteandlineage_checkexpect Rust-engine format ({tables: ...}), whilealtimate_core_*tools accept flat format. This is a DX footgun. - Silent failures:
sql_analyze,altimate_core_validate, andaltimate_core_gradefail without actionable error messages. - AltimateCore Rust engine: Several core functions (
column_lineage,testgen,complete,schema_diff,fix) return empty/wrong results — suggesting the Rust engine may not be fully wired up for all inputs.
Steps to Replicate
- Load
jaffle_shop-altimatedbt project with DuckDB - Run
sql_analyzeon any valid compiled SQL → "Unknown error" - Run
altimate_core_schema_diffwithschema1_context = {"customers": {"customer_id": "INTEGER", "first_name": "VARCHAR", "last_name": "VARCHAR", "email": "VARCHAR"}}andschema2_context = {"customers": {"customer_id": "INTEGER", "full_name": "VARCHAR", "email": "VARCHAR", "phone": "VARCHAR"}}→ incorrectly returns "Schemas are identical" - Run
lineage_checkwith flat schema_context → schema parse error
Working Tools (20/31)
sql_optimize, sql_format, sql_translate, altimate_core_check, altimate_core_equivalence, altimate_core_compare, altimate_core_extract_metadata, altimate_core_migration, altimate_core_import_ddl, altimate_core_semantics, dbt_manifest, dbt_profiles, dbt_lineage, altimate_memory_*, training_*, dbt CLI.
Metadata
| Field | Value |
|---|---|
| CLI Version | 0.0.0-worktree-fix/trest-local-202603181439 |
| Platform | darwin |
| Architecture | arm64 |
| OS Release | 24.6.0 |
| Category | bug |
| Working Directory | anandgupta |
| Session ID | ses_2fe984384ffeTDEu16q1motgO4 |