feat(review): expand grain-key not_null detector to fire on any contracted-model column change
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- data-engineering
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 813
- Forks
- 134
- Avg merge
- 2d 8m
- Merged PRs (30d)
- 65
Getting set up
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 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
AltimateAI/altimate-code#1323 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AltimateAI/altimate-code#1288 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
AltimateAI/altimate-code#1285 ·
Maintainers usually reply within 1 day
-
privacy: Altimate Base consent dialog no longer discloses persistent per-installation identifierOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
AltimateAI/altimate-code#1284 ·
Maintainers usually reply within 1 day
All issues in AltimateAI/altimate-code
Similar issues
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Fission-AI/OpenSpec#1986 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nestjs/docs.nestjs.com#3554 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
publicodes/publicodes#868 ·
-
namespace operations
Difficulty 1/5 Under an hour Newbie friendliness 78/100
EclipseFdn/open-vsx.org#13488 ·
Maintainers usually reply within 2 days