feat: add repository risk hotspot analysis#104
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds deterministic repository risk hotspot analysis (complexity, coverage gaps, and architectural uncertainty) and surfaces the ordered hotspot scoring through inspect results and the human-readable inspect report, with new/updated tests covering the integration.
Changes:
- Introduce
analyzeRepositoryRiskwith provider scoring and deterministic hotspot ranking. - Extend
runInspect/InspectResultto includerisk_analysisand render a “Risk Hotspots” section in the inspect report. - Add/update Vitest coverage for risk scoring and inspect integration.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/diagnostics/risk-analysis.test.ts | New tests asserting deterministic provider definitions and hotspot scoring output. |
| tests/diagnostics/inspect.test.ts | Updates inspect integration test to include tests folder + risk hotspot assertions in the report. |
| tests/cli/inspect-command.test.ts | Updates CLI inspect test fixture to include required risk_analysis field. |
| src/core/diagnostics/riskAnalysis.ts | New risk analysis module implementing providers, scoring, and hotspot ranking logic. |
| src/core/diagnostics/inspect.ts | Wires risk analysis into inspect orchestration and prints hotspots in formatInspectReport. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #51