altimate-code
altimate-code copied to clipboard
feat: wire altimate-core 0.5.1 equivalence dialect + decidable into dbt review
Description
altimate-core was bumped 0.4.0 → 0.5.1 (#925). 0.5.1 adds net-new equivalence surface that altimate-code does not yet consume:
checkEquivalence(sqlA, sqlB, schema, dialect?)— a new optional dialect parameter. The dbt PR reviewer already resolves and threads a dialect end-to-end (orchestrate → runner → dispatcher), but a prior commit (89f77a75ca) had to drop it at the engine boundary because 0.4.0 only accepted 3 params. The carefully-resolved dialect never reaches the engine.EquivalenceResult.decidable: boolean— a new authoritative flag for "the engine could not decide." The runner currently guesses decidability viavalidation_errors.
Goal
- Forward the
dialecthint tocore.checkEquivalencein the native equivalence handler and thesql.diffhandler so dialect-specific compiled warehouse SQL parses and becomes decidable instead of abstaining on a syntax error. - Honor the engine's authoritative
decidableflag in the review runner (strictly safer — only ever abstains more; preserves FP-safety). - Add extensive E2E tests against the real engine, including the full
runReviewpipeline.
Acceptance
- [ ]
dialectreachescore.checkEquivalencein both handlers - [ ] Empty-string dialect (the
ReviewConfig.dialectdefault) is coerced to "no hint" (engine throws onunknown dialect '') - [ ] Runner honors
decidable === falseand stays backward-compatible when the field is absent (0.4.0 shape) - [ ] Real-engine native tests + full-pipeline E2E tests, all green; typecheck + marker check clean