test(ployz): keep the fake Cloud listening until the relay-stage client returns #3176
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.44) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 268 lines diff across 3 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.335
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #3176"
general
weight: 0.35
nick-potts
Fixes #3171.
cloud_enroll::tests::enrollment_stages_name_the_relay_only_when_cloud_says_it_never_reaches_the_serverflaked on main and has been ejecting PRs from the merge queue.Cause
The fake Cloud answered one request with a 503 and
Connection: close. It then spent the stage's 60s wait with a single manualadvance, timed off the client closing that first connection. After that, the server task ended and dropped its listener. Two races came from this:ECONNRESETbecame the stage's last error in place of Cloud's answer. The main CI run 39878591469 shows exactly this:last: Some(Connect(... ConnectionReset ...)),in_flight: false, on the test's own fake-Cloud port.Fix
The test stops coordinating one clock jump with client internals.
tick_through_ioin the checkin tests.The change is test-only and adds no real-clock wait.
Design bets
The change is test-only, so no bet is touched.
Testing
The testing rung is 1, the crate unit test.
--stress-count 300passed 300 of 300 both idle and with 16 busy loops on 24 cores, so the race didn't show locally. The CI log above is the evidence for the cause.--stress-count 150with 16 busy loops on 24 cores, and 150 of 150 passed. One run takes about 4s with a 1ms tick, and less with 10ms.cargo clippy -p ployz --tests -D warningswas clean, and the real-wait lint overcrates/*exited 0.