
## Problem Traditional code review workflows rely on simplistic metrics—such as lines of code changed or arbitrary file paths—to determine review requirements. This flat-rate approach fails to capture true operational risk. Critical changes to high-velocity, incident-prone services often receive the same level of scrutiny as cosmetic UI tweaks. As a result, engineering teams face developer friction from unnecessary review gates on low-risk PRs, while high-risk changes slide into production without proper safety checks, leading to preventable outages. ## Solution [Risk-Weighted-Review-Router](https://github.com/SarthakDeo/Risk-Weighted-Review-Router?utm_source=gemini) is an automated PR routing and governance platform that dynamically evaluates pull request risk based on historical incident correlation, blast radius, git history, and domain sensitivity tags—not just code volume. By combining deep risk analysis with real-time GitHub workflow enforcement, the platform automatically determines required approval gates, assigns subject-matter reviewers, and posts explainable risk annotations directly to the PR. ## Target Users & User Interaction * **Software Engineers & Authors:** Push code normally via GitHub. The router instantly analyzes the PR, posting automated comments that explain its risk tier, driving risk factors (e.g., past incident ties, high blast radius), and exact review requirements. * **Engineering Managers & Tech Leads:** Configure scoring weights, threshold limits, hotfix keywords, and sensitivity tags via structured YAML configs. They use the interactive **React + Vite dashboard** to inspect current risk maps, review pipeline health, and audit scoring decisions. * **Reviewers & Approvers:** Receive routed PR requests based on domain expertise and risk tier, ensuring senior oversight is spent where it matters most. ## Creativity & Uniqueness Unlike standard CI tools that only enforce static linter or coverage rules, this system bridges **production operational history** with **pre-merge code review**: * **Incident-Correlated Scoring:** Incorporates postmortem records and past incident data directly into the risk model to flag historically fragile components. * **Blast Radius Mapping:** Calculates systemic impact by analyzing dependency trees and code modification patterns across services. * **Explainable Risk Contracts:** Rather than operating as a black box, the backend exposes clear driving reasons (e.g., *"3 incidents in 180d"*, *"tagged: payments"*, *"blast radius 14"*) so developers understand *why* extra reviews are requested. * **Unified Modular Architecture:** Features a stable `/score` service layer paired with a webhooks-driven workflow agent capable of dynamically enforcing approval gates and blocking unapproved high-risk merges. ## Impact & Efficiency By shifting from fixed review policies to dynamic, risk-weighted governance, the router eliminates review bottlenecks for safe, low-risk contributions while guaranteeing strict compliance for critical changes. Automated background map refreshes, Postgres-backed persistence, and flexible API contracts ensure seamless integration into existing CI/CD pipelines—reducing incident occurrence without slowing down deployment velocity.
27 Sep 2026