docs(adr): record that FastMCP 4 fired ADR 0001's revisit trigger - #192
Closed
lesnik512 wants to merge 1 commit into
Closed
docs(adr): record that FastMCP 4 fired ADR 0001's revisit trigger#192lesnik512 wants to merge 1 commit into
lesnik512 wants to merge 1 commit into
Conversation
add_extension/ServerExtension.lifespan satisfies the trigger's second clause, but ServerExtension.identifier is advertised under ServerCapabilities.extensions, so adopting it would announce a protocol capability the bootstrapper does not implement. Narrow the trigger to a hook that is not client-visible.
Member
Author
|
Closing unmerged; the ADR amendment is not being pursued for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADR 0001 chose
FastMCP.add_provider()for teardown and set a revisit trigger: FastMCP grows afirst-class shutdown hook, either an
on_shutdownAPI or a documented public way to compose alifespan post-construction.
Checked against
fastmcp4.0.3. The trigger fired on its second clause, but the replacement itpointed at is worse than what we have, so this records the evaluation and narrows the trigger rather
than changing the decision.
on_shutdownandon_startupare still absent, so the first clause did not fire.add_extension(ServerExtension)exists, andServerExtension.lifespan()is documented as"A context manager entered with the server's lifespan, exited on shutdown", to "start and stop
resources an extension owns". That satisfies the second clause literally.
ServerExtension.identifieris a required reverse-DNS string, validated at registration, anddocumented as "advertised under
ServerCapabilities.extensions". Registering one purely for ashutdown callback would announce a protocol capability the bootstrapper does not implement. The
Providerroute's thinness is invisible outside the process; this would not be.fastmcpextra declares an unbounded"fastmcp", soServerExtensionmay not exist atruntime. Adopting it would force a
fastmcp>=4floor on an optional extra.The trigger now names a hook that is neither client-visible nor tied to another abstraction's
semantics, and says explicitly that
add_extensiondoes not qualify, so this does not getre-litigated on every version bump.
Docs only, no code change.