Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix: coerce empty-string dialect to no-hint across native handlers (unknown dialect '' throw)

オープン
#927 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
typescript

調査の方向性

packages/opencode/src/altimate/native/altimate-core.ts と packages/opencode/src/altimate/native/sql/register.ts に列挙されているハンドラーを調査し、sql/register.ts:433-434 にある既存の規約から始めます。名前が示されている各 dialect 転送箇所を確認し、空文字列の dialect が dialect ヒントとして altimate-core に到達しなくなっていること、また有効な dialect 値が変更されずに維持されていることを検証します。

索引モデルが issue の本文から書いたものです。

説明

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, importDdl
  • packages/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).

主要言語
TypeScript
スター
813
フォーク
134
平均マージ
2日 2時間
マージ済み PR(30日)
67

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AltimateAI/altimate-code のほかの issue

AltimateAI/altimate-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。