Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#927 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
typescript

调研方向

检查 packages/opencode/src/altimate/native/altimate-core.ts 和 packages/opencode/src/altimate/native/sql/register.ts 中列出的 handlers,从 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 天 8 分钟
30 天内合并 PR
65

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AltimateAI/altimate-code 的其他 Issue

查看 AltimateAI/altimate-code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。