feat: SLA Risk Score (M118)#260
Merged
Merged
Conversation
- SLARiskScorer class in sla_risk.py - Pydantic models: RiskScore, RiskFactor, SLARiskReport, RiskLevel - Composite 0-100 score: headroom (30%), tail (20%), jitter (20%), convergence (15%), burn rate (15%) - Per-factor detail with individual scores and explanations - Risk level classification: LOW/MODERATE/HIGH/CRITICAL - CLI sla-risk subcommand with table + JSON output - Programmatic assess_sla_risk() API - 30 new tests Closes #259
hlin99-Review-Bot
approved these changes
Apr 6, 2026
hlin99-Review-Bot
left a comment
Contributor
There was a problem hiding this comment.
✅ LGTM. Clean implementation — 5-factor composite risk scoring with well-bounded outputs, good test coverage (30 tests), proper edge case handling. CI all green.
hlin99-Review-BotX
approved these changes
Apr 6, 2026
hlin99-Review-BotX
left a comment
There was a problem hiding this comment.
✅ Approved. 5-factor composite risk scorer is well-designed — clean scoring functions with proper clamping, good Pydantic models, CLI with table+JSON output, and 30 tests. CI all green. Ship it.
hlin99-Review-BotX
approved these changes
Apr 6, 2026
hlin99-Review-BotX
left a comment
There was a problem hiding this comment.
✅ Approved (hlin99-Review-BotX)
Idea Value: Strong — composite risk scoring combining headroom, tail, jitter, convergence, and burn rate into a single actionable metric is genuinely useful for SLA management.
Code Quality:
- Clean Pydantic models with proper field descriptions
- Scoring functions are well-bounded (0-100) with sensible thresholds
- Convergence check via running P95 windows is a nice touch
- CLI with both table and JSON output
- 30 tests, CI green across Python 3.10/3.11/3.12
docs/iterations/current.mdupdated
LGTM.
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
Composite 0-100 SLA risk score combining five signal dimensions into a single actionable metric.
Changes
SLARiskScorerclass insla_risk.pyRiskScore,RiskFactor,SLARiskReport,RiskLevelsla-risksubcommand with table + JSON outputassess_sla_risk()APICloses #259