fix: coerce empty-string dialect to no-hint across native handlers (unknown dialect '' throw)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- backend, data-engineering
Research direction
Inspect the listed handlers in packages/opencode/src/altimate/native/altimate-core.ts and packages/opencode/src/altimate/native/sql/register.ts, starting with the existing convention at sql/register.ts:433-434. Check each named dialect-forwarding site and verify that empty-string dialects no longer reach altimate-core as a dialect hint, while valid dialect values remain unchanged.
Written by the indexing model from the issue text.
Description
Description
Pre-existing latent bug surfaced while wiring core 0.5.1 (#925 follow-up). altimate-core throws unknown dialect '' on an empty-string dialect. Several native handlers forward params.dialect ?? undefined, so a literal "" is passed through (empty string is not nullish) and the engine throws:
packages/opencode/src/altimate/native/altimate-core.ts:Schema.fromDdl(migration),columnLineage,formatSql,extractMetadata,compareQueries,importDdlpackages/opencode/src/altimate/native/sql/register.ts:columnLineage
In the dbt review pipeline these are protected today because review/run.ts resolves config.dialect (auto-detect → fallback "snowflake") before runReview. But any direct caller using the documented default (ReviewConfig.dialect = "") would hit the throw → caught → silent degradation (e.g., column-breakage/PII-via-lineage lanes return empty).
Fix
Normalize these sites to params.dialect || undefined (coerce ""/null/undefined → undefined), matching the convention already used in sql/register.ts:433-434 and the checkEquivalence sites hardened in the parent PR. No valid dialect is falsy, so the change is behavior-neutral except for eliminating the "" throw.
Context
Independently flagged by a consensus code-review model (Gemini) during the parent PR. Kept out of the parent PR for scope discipline (those sites are not 0.5.1 functionality).
- Dominant language
- TypeScript
- Stars
- 813
- Forks
- 134
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 67
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AltimateAI/altimate-code
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AltimateAI/altimate-code#1359 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1323 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AltimateAI/altimate-code#1288 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AltimateAI/altimate-code#1285 ·
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifier Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AltimateAI/altimate-code#1284 ·
All issues in AltimateAI/altimate-code
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
bcgov/bc-wallet-mobile#4761 · 1 comment ·
-
external-issue to-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
refactor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100