test(metrics): drop wall-clock bound from flaky periodic reader test #1329
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 170 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.308
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1329"
general
weight: 0.35
nachoBonafonte
Summary
testTimerKeepsEnqueueingWhileExportIsBlockedasserted that the third export arrived within 0.3 s of unblocking the exporter. That bound includes thread scheduling, so on a loaded macOS runner it fails with no change in the reader (0.333 s in the run linked from the issue).This removes the bound. It doesn't separate correct from broken behaviour: with the 0.05 s export interval, the third export lands well inside 0.3 s whether or not the timer queued exports during the block. A reader that stops draining is still caught by the existing
XCTAssertGreaterThan(exportCallCount, 2)within the 1 s deadline.Resolves #1325
Testing
PeriodicMetricReaderSdkTestsrun 10 times in a row locally, all 8 tests passing each time.swift test --enable-all-traitspasses locally.Limitations
Removing the assertion rather than loosening it is a judgement call. I considered deriving a looser bound from
exportInterval, but any wall-clock bound here stays timing-sensitive and would not catch anything the 1 s deadline misses.Checklist
swift test --enable-all-traitspasses locally🤖 Generated with Claude Code