AltimateAI / AltimateAI/altimate-code

feat(review): expand grain-key not_null detector to fire on any contracted-model column change

オープン
#1,034 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
811
フォーク
134
平均マージ
3日 2時間
マージ済み PR(30日)
50

説明

Deferred from the v0.9.3 pre-release review.

### Current behavior

`extractGrainKeyGaps` in `packages/opencode/src/altimate/review/dbt-patterns.ts` fires only when the grain declaration itself changes, filtered by `grainDeclChangedEntities` — which iterates `newMap` and compares against `oldMap` for additions.

### Gap

A PR that adds a new column to an existing contracted model without touching `unique_combination_of_columns` will not surface uncovered grain columns, even when new columns increase the exposure surface. The scoping is conservative and correct for the initial ship, but leaves recall on the table.

### Proposal

Extend the change-scoping filter to also fire when any column added/modified in a contracted model's schema.yml overlaps with existing grain-key coverage. Keep the current "grain declaration changed" path as one of two entry conditions.

### Why deferred

Scope expansion touches filter semantics and could shift the false-positive rate; the initial detector is intentionally conservative and documented, so a follow-up release is the right cadence for widening.

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

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

調査の方向性

Start in packages/opencode/src/altimate/review/dbt-patterns.ts at extractGrainKeyGaps and the grainDeclChangedEntities filter. Trace how newMap and oldMap identify additions, then inspect how contracted-model schema.yml column changes are represented. Done means the detector preserves the existing grain-declaration path and also evaluates added or modified columns that overlap existing grain-key coverage without unnecessarily broadening unrelated changes.

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

評価

技術スタック
typescript
領域
data-engineering
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

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

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