Record request labels in the mock model server client #1111
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.41) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.41 · 180 lines diff across 2 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.311
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1111"
general
weight: 0.35
rishabhsinha17
Part of #524
Old behavior. The OpenAI-compatible clients copy a request's labels onto the recorded metric (#523). The mock client builds its own
InferenceInfoand leaveslabelsempty, so aserver.type: mockrun reports every request without labels. A timed-out mock request also records a coroutine repr as itsrequest_data, because the timeout path does not awaitto_request_body.New behavior. The mock client records the request's labels on the success, timeout and stage-teardown-cancelled metrics, the same outcomes the real clients label. A timed-out request records its request body.
Changes:
MockModelServerClient._recorded_infobuilds theInferenceInfofor a recorded metric and attachesdata.labels; the three recording sites use it.data.to_request_body.Testing:
await.server.type: mockandattribute_to_label_map; all 6 per-request entries carry the mapped label and the fallback for a missing attribute.ruff format --check,ruff check,mypy --strict, type-escape check.pdm run test:e2e(full),pdm run check:cov,pdm run check:mutation.