Conversation
ITimeoutRequest)
1bab4f4 to
7439b56
Compare
| /// When <see cref="GlobalTimeout"/> is set, all requests that do not implement | ||
| /// <see cref="Extensibility.ITimeoutRequest"/> are also subject to the global deadline. | ||
| /// Requests that implement <see cref="Extensibility.ITimeoutRequest"/> always use their own | ||
| /// <see cref="Extensibility.ITimeoutRequest.Timeout"/> value, which takes precedence over | ||
| /// <see cref="GlobalTimeout"/>. |
There was a problem hiding this comment.
The remarks claim GlobalTimeout affects requests not implementing ITimeoutRequest, but interceptor control flow always bypasses those requests, so this documented behavior is impossible.
Show fix
| /// When <see cref="GlobalTimeout"/> is set, all requests that do not implement | |
| /// <see cref="Extensibility.ITimeoutRequest"/> are also subject to the global deadline. | |
| /// Requests that implement <see cref="Extensibility.ITimeoutRequest"/> always use their own | |
| /// <see cref="Extensibility.ITimeoutRequest.Timeout"/> value, which takes precedence over | |
| /// <see cref="GlobalTimeout"/>. | |
| /// When <see cref="GlobalTimeout"/> is set, it applies as a fallback to requests that implement | |
| /// <see cref="Extensibility.ITimeoutRequest"/> but return <see langword="null"/> from their | |
| /// <see cref="Extensibility.ITimeoutRequest.Timeout"/> property. | |
| /// Requests that implement <see cref="Extensibility.ITimeoutRequest"/> and return a non-null | |
| /// <see cref="Extensibility.ITimeoutRequest.Timeout"/> value always use their own timeout. | |
| /// Requests that do not implement <see cref="Extensibility.ITimeoutRequest"/> are not subject | |
| /// to any timeout enforcement. |
Details
✨ AI Reasoning
The codebase defines that only opted-in requests participate in timeout enforcement, but this documentation states that requests without opt-in are also affected by the global timeout. That creates an impossible expectation for consumers because the documented path cannot occur under the current control flow.
Reply @AikidoSec feedback: [FEEDBACK] to get better review comments in the future.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #154 +/- ##
==========================================
+ Coverage 85.19% 85.40% +0.20%
==========================================
Files 42 44 +2
Lines 1385 1411 +26
Branches 125 129 +4
==========================================
+ Hits 1180 1205 +25
- Misses 168 169 +1
Partials 37 37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Agent-Logs-Url: https://github.com/dailydevops/pulse/sessions/38188320-52ea-4c0b-aadd-c1c8a2f0e5c6 Co-authored-by: samtrion <3283596+samtrion@users.noreply.github.com>
…always passes through Agent-Logs-Url: https://github.com/dailydevops/pulse/sessions/c2973fdb-e879-427e-ab42-c3e898b2ab33 Co-authored-by: samtrion <3283596+samtrion@users.noreply.github.com>
7439b56 to
cae0f7c
Compare
Adds a BCL-only per-request timeout mechanism via a linked
CancellationTokenSource, filling the gap for projects that need deadline enforcement without pulling inNetEvolve.Pulse.Polly.Changes
NetEvolve.Pulse.ExtensibilityITimeoutRequest— marker interface; implement alongsideICommand<T>/IQuery<T>to declare a per-request deadline viaTimeSpan? Timeout { get; }(nullable — returningnulldefers to the global fallback)NetEvolve.PulseTimeoutRequestInterceptor<TRequest, TResponse>— only activates for requests implementingITimeoutRequest; requests that do not implementITimeoutRequestalways pass through regardless of any global timeout setting; creates a linked CTS, throwsTimeoutExceptionon deadline exceeded, and correctly distinguishes timeout from caller cancellation (OperationCanceledException)TimeoutRequestInterceptorOptions—TimeSpan? GlobalTimeoutapplies as a fallback only toITimeoutRequestimplementations that returnnullfromTimeoutTimeoutMediatorConfiguratorExtensions.AddRequestTimeout()— fluent registration; per-requestITimeoutRequest.Timeouttakes precedence over the global fallback; non-ITimeoutRequestrequests are never affectedTests
Usage
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.