feat(mcpkit): runtime group lock/unlock — App.Lock/Unlock (MC-45) - #28
Merged
Merged
Conversation
- add registry.locked (runtime, per-group soft lock, distinct from the permanent startup gate) plus the shared shouldRegister predicate (!gateBlocked && !locked) finalize/lockGroup/unlockGroup all consult - App.Lock removes a group's currently-registered tools from the live server (firing notifications/tools/list_changed) and blocks the group's pending tools from future (re)registration - App.Unlock re-registers a locked group's pending tools, but only those shouldRegister still allows — a startup-gate-hard-blocked tool (e.g. a Write tool under ReadOnlyMode) is never resurrected - finalize no longer clears pending, and MC-43/44 never did either — Lock before start now simply makes finalize skip the group, keeping its closures around for a later Unlock - Lock/Unlock on a startup-gate-hard-blocked group return an error; the hard block always wins and can't be runtime-toggled - both are idempotent and callable before or after Run/Connect/HTTPHandler, which is what lets a consumer start a group locked and unlock it mid-session (the lazy tier) - all mutated state (locked, byGroup, pending, started, gate) stays under reg.mu, mirroring finalize's existing lock ordering Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jgangemi
enabled auto-merge (squash)
July 12, 2026 20:17
Coverage Report for CI Build 29207435192Coverage increased (+0.1%) to 96.172%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
permanent startup gate) plus the shared shouldRegister predicate
(!gateBlocked && !locked) finalize/lockGroup/unlockGroup all consult
server (firing notifications/tools/list_changed) and blocks the group's
pending tools from future (re)registration
shouldRegister still allows — a startup-gate-hard-blocked tool (e.g. a
Write tool under ReadOnlyMode) is never resurrected
before start now simply makes finalize skip the group, keeping its
closures around for a later Unlock
hard block always wins and can't be runtime-toggled
which is what lets a consumer start a group locked and unlock it
mid-session (the lazy tier)
reg.mu, mirroring finalize's existing lock ordering
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com