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.
Deferred from the v0.9.3 pre-release review.
Current behavior
extractGrainKeyGapsinpackages/opencode/src/altimate/review/dbt-patterns.tsfires only when the grain declaration itself changes, filtered bygrainDeclChangedEntities— which iteratesnewMapand compares againstoldMapfor additions.Gap
A PR that adds a new column to an existing contracted model without touching
unique_combination_of_columnswill 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.