feat: Configurable per-threshold weighted laning #19665
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.65) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.65 · 332 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.347
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.065
Real PR Conversation Timeline
1 comments
"Review active on #19665"
general
weight: 0.35
maytasm
Description
Follow-up to the weighted query laning strategy (#19225).
Configurable per-threshold weights (
WeightedQueryLaningStrategy)Previously every breached threshold added exactly 1 to a query's cost. This adds optional per-threshold weights so a breach on one dimension can count for more than another (e.g. a huge segment scan should outweigh a slightly-old interval). Each weight defaults to 1, so existing configs are unchanged.
New optional properties (each an integer >= 1, default 1):
periodWeight,durationWeight,segmentCountWeight,segmentRangeWeight.a weight must be >= 1 and its corresponding threshold must be configured
Example. A segment-count breach counts double, so a query breaching only segmentCount still reaches a cost-2 lane:
iddimension on thequery/prioritymetric (QueryScheduler)Also adds the query
iddimension for easily finding a query's priority.Key changed classes
WeightedQueryLaningStrategy— optional per-threshold weight fields + validationQueryScheduler—iddimension on thequery/prioritymetricRelease note
The
weightedquery laning strategy now supports optional per-threshold cost weights (periodWeight,durationWeight,segmentCountWeight,segmentRangeWeight; default 1), and thequery/prioritymetric now includes aiddimension.This PR has: