Skip to content

Stabilize the MCP teardown deadline test - #4698

Merged
Widthdom merged 1 commit into
mainfrom
fix-issue4653
Jul 20, 2026
Merged

Stabilize the MCP teardown deadline test#4698
Widthdom merged 1 commit into
mainfrom
fix-issue4653

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • keep both counted in-flight requests behind cancellation-insensitive gates until teardown diagnostics are captured
  • verify shutdown cancellation separately without making the asserted request count depend on cancellation callback scheduling
  • document the deterministic teardown-test contract in English and Japanese
  • add the bilingual changelog fragment changelog.d/unreleased/4653.internal.md

Root cause

The isolated Release test counted a cancellation-responsive task as unfinished. Once shutdown cancellation started, whether that task was pruned before the zero-length final deadline depended on callback scheduling, so the final diagnostic intermittently reported a different state or was absent.

Validation

  • exact isolated Release test: passed on .NET 8 and .NET 9
  • 10 repeated isolated Release runs: passed on both target frameworks (20/20)
  • focused DrainInFlightTasksAsync_* tests: 7/7 passed on each target framework
  • full Release solution tests: 9,743 passed / 6 skipped on .NET 8; 9,278 passed / 410 skipped on .NET 9
  • Release solution build: 0 warnings, 0 errors
  • make lint
  • changelog fragment validation
  • Codex adversarial review: No blocking/actionable issues found.

Fixes #4653

@Widthdom
Widthdom marked this pull request as ready for review July 20, 2026 03:45
@Widthdom
Widthdom merged commit 9be71b3 into main Jul 20, 2026
8 checks passed
@Widthdom
Widthdom deleted the fix-issue4653 branch July 20, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release MCP teardown deadline test is timing-sensitive when isolated

1 participant