Repository navigation
fix(test): tolerate delayed MCP handler scheduling - #1622
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 11:56 PM ET / October 3, 2026, 03:56 UTC. ClawSweeper reviewWhat this changesThe PR gives two MCP server disposal tests up to ten seconds to enter their request handler, using a bounded asynchronous wait. Merge readiness✅ Ready for maintainer review Keep open: the change remains useful on current main and preserves the disposal regression assertions. No introduced correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherThe local MCP HTTP server accepts tool requests and dispatches them to Windows node capabilities. These tests start a request, wait for its handler to enter, and check that shutting down the server does not surface disposal exceptions. flowchart LR
A[Test HTTP request] --> B[Local MCP server]
B --> C[Gated test capability]
C --> D[Bounded handler-entry wait]
D --> E[Server shutdown]
E --> F[Exception assertions]
Before mergeNone. Agent review detailsSecurityNone. Review metricsNone. Technical reviewBest possible solution: Use bounded handler-entry waits in both disposal tests while retaining their shutdown ordering and exception assertions. Do we have a high-confidence way to reproduce the issue? No deterministic reproduction of the scheduling flake was established during this read-only review. The PR reports a suite failure followed by a passing isolated retry, and source confirms the existing two-second admission deadline. Is this the best way to solve the issue? Yes. WaitAsync preserves the requirement that the handler enter before disposal, fails on timeout, and avoids a separate delay race without changing production shutdown behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dcc6afe2bfcd. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
Task.WhenAnyadmission race with a boundedWaitAsyncInvestigation
The full validation rerun for #1610 (fix(local-ai): launch with physical MSIX paths) failed in
McpHttpServerTests.Dispose_DuringInFlightHandler_DoesNotSurfaceObjectDisposedException, then the isolated retry passed in 79 ms. The production disposal path was not implicated. The flaky gate was the test-only 2-second handler-entry race, which is shorter than the suite's established slow-runner tolerance and leaves an unobserved delay task behind.Required proof pools
none: test-only async synchronization change; no custom Windows hardware or interactive product behavior changed.Validation
git show --check.cbx_c37d7b0dfe2candcbx_3cdeb27960ebfailed during provider provisioning and were recovered for cleanup. AWS leasecbx_50cdfa494ca4lacked the .NET and Windows SDK prerequisites, andsetup-dev.ps1could not install them because App Installer/winget was absent. The local Parallels VM could not start because its host volume required another 99,960 MB free. Hosted Windows CI is the remaining closeout path.Real Behavior Proof