Compute each pull request's risk tier from its changed paths and label it #824
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 381 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.356
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #824"
general
weight: 0.35
alvarosanchez
Fixes #821
What changed
.github/scripts/risk-tier.py. Onpull_request_targetit checks out only the base SHA and reads the pull request through the API.jev-1.14.0, pinned) classifies each pull request with a choice question over T0, T1 and T2. It gets the title, description, labels, changed file names with line counts, the repository's T2 areas, and the changed lines of main source files (T2 areas first, about 15k tokens at most; no tests, docs, build files or context lines). The highest tier with at least 25% probability wins, so unsure answers round up.@Internalandinternalpackages) and whether it breaks users. Either at 50% or more makes it T2. They never lower a tier, since the diff is text its author controls, and the build's binary compatibility check stays the definitive test..github/risk-tiers.global.toml, synced to every repository, and an optional per-repository.github/risk-tiers.tomlmerged on top (values replace, lists add up,descriptionreplaces andadd_descriptionappends). They hold the tier descriptions Jev reads, path globs, T2 labels, the model and thresholds, so classification is tuned by editing text. Invalid rules fail the check.type: breakingby default), or a declared API change is T2 whatever Jev answers, so text in a pull request cannot talk its way down. The other path rules remain only as a per-file hint and asreplay --rules-only.risk-tier: T0|T1|T2andai-use: none|assisted|agent-generated. Labels added by a reviewer or maintainer are kept, in either direction.risk-tiercheck fails when the declared tier is lower than the classified one, on AI tool footers in the description, and whenTYPESAFE_API_KEYis missing or Jev does not answer (it never guesses a tier).Why
WP2 of micronaut-projects/.github#18. Path rules alone put 93% of core's recent pull requests in T1, so they cannot tell low-risk work apart.
How to test
python3 .github/scripts/test_risk_tier.py), with Jev's HTTP call mocked; actionlint is clean.jev-1.14.0answered T0 at 97%. A one-off replay of last month's merged pull requests gave serialization 5 T0 / 2 T1 / 14 T2 and security 8 T0 / 4 T1 / 9 T2, against 0 T2 for path rules.Checklist
MAINTAINING.md)Review declaration
| Field | Value |
|-----------------------------|-----------------|
| AI use | agent-generated |
| AI tool | Claude Code |
| Risk tier | T0 |
| API or behaviour change | no |