Skip to content

feat: show validation value even on clean PRs — compelling UX#6

Merged
anandgupta42 merged 1 commit intomainfrom
feat/compelling-ux
Mar 25, 2026
Merged

feat: show validation value even on clean PRs — compelling UX#6
anandgupta42 merged 1 commit intomainfrom
feat/compelling-ux

Conversation

@anandgupta42
Copy link
Contributor

What does this PR do?

Redesigns the PR comment to show VALUE even when all checks pass. The old format said "0 issues" which communicates nothing. The new format shows what was validated, how, and calls out zero-cost warehouse-free analysis.

Before (no value):

## ✅ Altimate Code — 1 model modified · all checks passed
| SQL Quality | ✅ 0 issues | 1 files analyzed |

After (shows value):

## ✅ Altimate Code — 1 model validated · 37 downstream safe · no issues
| What We Checked | How | Result |
| SQL Syntax | DataFusion against 14 table schemas | ✅ Valid |
| Anti-Patterns (26 rules) | AST analysis: SELECT *, cartesian joins, ... | ✅ Clean |
| Injection Safety (10 rules) | SQL injection, stacked queries, ... | ✅ Safe |
| PII Exposure | email, SSN, phone, credit card, ... | ✅ No exposure |
| Breaking Changes | 37 downstream models checked | ✅ Compatible |

Plus: Query Profile section, "Validated without hitting your warehouse" footer.

Type of change

  • Enhancement

Stats

  • 439 tests, 0 failures
  • Lint: 0 errors
  • New: query-profile.ts with 14 tests

Replace the old "Check | Result | Details" table with a new
"What We Checked | How | Result" validation table that communicates
what was validated and the technology used (DataFusion, AST analysis,
pattern scan, column classification).

Key changes:
- New `ValidationSummary` and `QueryProfile` types in `types.ts`
- `extractValidationSummary()` in `cli-check.ts` with `CATEGORY_META`
  mapping for all 7 check categories
- New `query-profile.ts` module for regex-based SQL structure extraction
  (complexity, JOINs, CTEs, subqueries, window functions, aggregation)
- Rewritten executive line: "validated" instead of "modified",
  "N downstream safe" instead of "all checks passed", "N findings"
  instead of separate critical/warning counts
- Collapsible Query Profile section with per-file metadata table
- Footer now includes "Validated without hitting your warehouse"
- Always post comment when `filesAnalyzed > 0` (previously skipped
  clean PRs, which showed zero value)
- `runCheckCommand` now returns `CheckCommandResult` with both issues
  and validation summary
- Version bumped to 0.4.0
- Updated all unit and e2e tests for new format

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@anandgupta42 anandgupta42 merged commit a706430 into main Mar 25, 2026
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant