Repository navigation
Remove the enforceAsyncTimeout flag from ApiWebRequestFactory - #9501
Conversation
ApiWebRequest now always enforces HttpWebRequest.Timeout for async sends, so the opt-in flag and the test asserting its opt-in behaviour are obsolete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
6f295f2
into
andrew/refactor-web-request
BenchmarksBenchmark execution time: 2026-10-22 10:29:57 Comparing candidate commit 8146c97 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 71 metrics, 1 unstable metrics, 8 known flaky benchmarks, 118 flaky benchmarks without significant changes.
|
Summary of changes
Removes the opt-in
enforceAsyncTimeoutflag (and the unused_asyncTimeoutplumbing) fromApiWebRequestFactory/ApiWebRequest, its callers (AgentTransportStrategy,FeatureFlagsEvpTransport, tests), and deletesApiWebRequestFactoryTests.AsyncDeadlineAbortsStalledJsonSendOnlyWhenEnabled.Reason for change
#9235 added an opt-in
Timer+Abort()deadline for asyncHttpWebRequestsends. The refactor in #9145 replaces the send path, and #9144 enforcesHttpWebRequest.Timeoutfor every async send, so the flag no longer does anything. The deleted test asserted behaviour specific to the opt-in design: it disablesHttpWebRequest.Timeout, expects a separate deadline to fire anyway, and expects aWebException(RequestCanceled).The previous implementation had multiple issues:
Implementation details
Sits between #9145 (base) and #9144 in the stack.
Test coverage
The deadline behaviour stays covered by:
ApiRequestTests, added in Add handling of timeouts toApiWebRequest#9144FlagEvaluationTransportTests.SlowTcpAgentTimesOutWithoutReplayingBatchExposureApiTimeoutTests.LegacyExposureRequestsAbortStalledConnectionOn their own, #9145 and this PR have no async deadline on .NET Framework, so
SlowTcpAgentTimesOutWithoutReplayingBatchfails on net48 until #9144 is applied. With the full stack applied, all transport and Feature Flags timeout tests pass locally on net48 and net10.0.Other details
Merge together with #9144.