Repository navigation
fix(tests): reject polling results after the deadline - #443
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthrough
ChangesPolling timeout enforcement
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Polling now honors its timeout budget by avoiding expired probes and rejecting results that arrive too late. The intended timeout behavior is covered without an active merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
The durable test polling function could accept success after its timeout. It could also start another check after the budget had expired. CodeRabbit identified this during review of #419.
Check the deadline before and after each synchronous check, and limit sleep to the remaining time. The function documents that it cannot interrupt a blocked callback.
Three regression tests cover immediate success, late success, and an expired budget. They run in the normal Gateway unit test suite. The old implementation failed both deadline cases; all three pass with this change. Targeted formatting and diff checks pass.
This PR includes the fixture correction from merged #442 and now targets main. Changing the base preserved the source tree under test. The review diff contains only the polling change.
Implemented and reviewed with GPT-5.6 and GPT-6 in Codex.