Skip to content

Rework Sentinel into a change-risk and review-assurance engine - #1

Open
SAY-5 wants to merge 25 commits into
mainfrom
rework/change-risk-assurance
Open

Rework Sentinel into a change-risk and review-assurance engine#1
SAY-5 wants to merge 25 commits into
mainfrom
rework/change-risk-assurance

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Rebuilds Sentinel around a provider-agnostic thesis: stop guessing whether code was AI-authored, and instead measure how risky each change is and whether it was actually reviewed.

Core model

Change Risk Score = Blast Radius x (1 - Review Assurance). Risk is high-blast-radius change that went under-reviewed. Every score cites the concrete facts behind it.

  • Blast radius: file-sensitivity classification (auth, payments, migrations, crypto, infra = critical) plus coupling, churn, and hot-file modifiers.
  • Review assurance: grounded penalties (unreviewed merge, self-merge, rubber-stamp approvals faster than readable, stale approvals, direct-to-default pushes) and credits (multiple engaged reviewers, passing checks).
  • Outcome linkage: revert, hotfix, and incident detection, feeding a tier-calibration view that checks whether higher-risk predictions actually fail more.

What changed

  • New scoring engine (src/analysis): blast-radius, review-assurance, and outcome signals, each producing human-readable evidence; scoreChange computes the deterministic Change Risk Score.
  • Schema: dropped the per-file attribution table; code_events carries per-change scores and review metadata; repo_metrics now rolls up Change Risk Index, Review Assurance, Unreviewed Critical Changes, and Revert-Linked Rate.
  • Webhook flow scores every merged change and direct push; alerts retargeted to unreviewed-critical, index spikes, assurance drops, and revert clusters.
  • Dashboard, routers, seed data, and docs reframed end to end. New CI workflow (lint, typecheck, test, build).

Verification

  • pnpm lint, pnpm exec tsc --noEmit, pnpm test (17 unit tests), and pnpm build all green locally.
  • Dashboard pages render dynamically, so the build needs no database.

SAY-5 added 25 commits July 20, 2026 08:43
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentinel Ready Ready Preview, Comment Jul 20, 2026 4:53pm

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