Skip to content

Run FastMCP teardown after user lifespan shutdown - #413

Merged
lesnik512 merged 1 commit into
mainfrom
fix/411-fastmcp-lifespan
Nov 3, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/411-fastmcp-lifespan

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #411.

Wrap the FastMCP user lifespan so tracing stays active during user shutdown. Preserve the lifespan result and document the private lifecycle hook.

Verification

  • Confirmed the regression failed before the fix on the missing shutdown span.
  • All 55 FastMCP tests passed on 4.0.0, 4.0.11, 4.1.0, 4.1.5, and 4.1.6.
  • just lint-ci passed. just test-ci passed with 616 tests and 100% coverage.

Breaking changes

Lite-bootstrap teardown now runs after FastMCP user lifespan shutdown.

@lesnik512
lesnik512 merged commit b32bd8f into main Nov 3, 2026
35 checks passed
@lesnik512
lesnik512 deleted the fix/411-fastmcp-lifespan branch November 3, 2026 05:03
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.

Run FastMCP teardown after the user's lifespan shutdown code

1 participant