Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feat: Periodic capability polling for silent redeployment detection#496

Open
teemow wants to merge 2 commits into
main from
feat/issue-494-periodic-capability-polling
Open

Feat: Periodic capability polling for silent redeployment detection #496
teemow wants to merge 2 commits into
main from
feat/issue-494-periodic-capability-polling

Conversation

@teemow

@teemow teemow commented Mar 16, 2026
edited
Loading

Copy link
Copy Markdown
Member

Summary

  • Adds a background capability poller to the AggregatorServer that periodically re-fetches tool lists from downstream MCP servers, detecting silent redeployments where servers restart without sending notifications/tools/list_changed
  • Handles both non-authenticated servers (global client) and authenticated servers (per-session pooled clients), using singleflight.Group for deduplication
  • Includes unit tests for the poller, GetSessionsForServer, and a BDD scenario (poll-capability-refresh-nonoauth) that validates poll-based detection of silently-added tools
  • Introduces ADR-012 to standardize server classification terminology (non-authenticated vs authenticated)

Closes #494

Review fixes (1c1e03b)

  • Replaced time.Sleep with require.Eventually in poller stop test to comply with architecture rules
  • Added field validity guards in injectToolSilently so mcp-go internal field renames fail with a clear panic
  • Fixed misleading "deep-merging" comment to accurately describe one-level shallow merge
  • Used baseCount delta pattern in TestPollAllServers to decouple assertion from Register internals

Test plan

  • All unit tests pass (make test)
  • All BDD scenarios pass (muster test --parallel 50)
  • New BDD scenario poll-capability-refresh-nonoauth verifies the poller detects a tool added without notification
  • CI passes

...loses #494)
Add a background capability poller to the AggregatorServer that periodically
re-fetches tool lists from downstream MCP servers. This detects silent
redeployments where servers restart without sending notifications/tools/list_changed.
Made-with: Cursor
@teemow teemow requested a review from a team as a code owner March 16, 2026 14:09
- Replace time.Sleep with require.Eventually in
 TestRunCapabilityPoller_StopsOnContextCancel to comply with
 architecture rules (no timers in tests)
- Add field validity guards in injectToolSilently so an mcp-go
 upgrade that renames internal fields panics with a clear message
 instead of silently corrupting memory
- Fix misleading "deep-merging" comment in muster_manager.go to
 accurately describe the one-level shallow merge
- Use baseCount delta pattern in TestPollAllServers to decouple the
 assertion from how many times Register calls ListTools internally
Made-with: Cursor
QuentinBisson added a commit that referenced this pull request May 12, 2026
Reorder the critical path so Phase 4 (Edge auth — agw moves in front of
muster, JWT or extAuth) lands last as part of a coordinated final
milestone with Phase 6 (ADR-006 → traffic.authorization) and Phase 8
(aggregator HTTP server bypass in cluster mode), instead of mid-sequence.
Rationale documented in the new "Reordered critical path" section:
- Lowest marginal observability value (Phase 1 already delivers per-backend
 audit/traces/metrics; identity at agw is additive)
- Most public-facing churn; best done as a single coordinated event
- External dependency on mcp-oauth JWT-mode PR has its own review cycle
- Phase 5 doesn't depend on Phase 4; translator emits Phase-1-shaped routes
- Phase 6 stays in muster aggregator until Phase 4 lands; cluster-mode
 migration to traffic.authorization is opt-in
New shape: ship-to-customers happens at end of Phase 5. Final milestone
(Phase 4 + 6 + 8) lands later when mcp-oauth JWT-mode is ready AND a
customer audit/RBAC trigger materializes.
Also adds a "Current PR status" snapshot reflecting:
- 3 PRs in pre-Phase-1 ServiceClass removal
- 7 of ~8 PRs in Phase 2 broker series (#647-#657)
- 2 PRs in Phase 3 tracing/logging (#652, #653)
- ADR-012 (#613) revised
- approved/mergeable: #570 (lean list_tools), #629 (architectbot alignment)
- stalled / needs review: #496, #543, #623, #627 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Layer 3: Periodic capability polling for silent redeployment detection

1 participant

AltStyle によって変換されたページ (->オリジナル) /