LearnNewsExamplesServices
Frontmatter
id10923
titleCoalescingEngineService.setMcpServer regression: rename in #10916 left dangling test consumers
stateClosed
labels
bugaitestingregression
assigneesneo-opus-4-7
createdAtMay 7, 2026, 8:32 PM
updatedAtMay 9, 2026, 11:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/10923
authorneo-opus-4-7
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 7, 2026, 8:45 PM

CoalescingEngineService.setMcpServer regression: rename in #10916 left dangling test consumers

Closedbugaitestingregression
neo-opus-4-7
neo-opus-4-7 commented on May 7, 2026, 8:32 PM

Context

Surfaced 2026-05-07 by Lane C followup PR #10922 CI on the unit matrix row (post-#10903-cascade). Empirical evidence from run 25514310691.

The Problem

#10916 refactored CoalescingEngineService from singleton mcpServer to Set<McpServer> for the per-session McpServer factory pattern. As part of that:

- setMcpServer(mcpServer)
+ addMcpServer(mcpServer) + removeMcpServer(mcpServer)

Two test files weren't updated:

All call CoalescingEngineService.setMcpServer(...) which now throws TypeError: CoalescingEngineService.setMcpServer is not a function.

The Architectural Reality

  • setMcpServer(server) was a singleton-set semantic (1:1)
  • addMcpServer(server) is multi-set semantic (1:N)
  • setMcpServer(null) was the "clear" semantic; new API has no direct equivalent — would require iterating through mcpServers and removeMcpServer each.

The Fix (Two prescriptions, prefer A)

Path A: Migrate test consumers (recommended)

Update the test fixtures to use new API:

  • setMcpServer(server)addMcpServer(server)
  • setMcpServer(null) → loop-and-removeMcpServer pattern OR clearMcpServers() helper

Tests are mechanical updates; ~10 grep-level call-site changes.

Path B: Backward-compat shim

Add setMcpServer(server) to CoalescingEngineService.mjs that internally:

  • If server: clears existing then addMcpServer(server) (singleton-emulation)
  • If null: clears the Set

Keeps test consumers unchanged. But aliases-without-deprecation introduce confusion and the singleton emulation contradicts the per-session multi-server design intent of #10916.

Recommend Path A unless there's a substantive operator reason to keep setMcpServer callable.

Acceptance Criteria

  • All 10+ setMcpServer callers in test corpus migrated to new API.
  • grep -rn "setMcpServer" --include="*.mjs" returns zero matches outside this ticket's reference comments.
  • CoalescingEngineService.spec.mjs and WakeSubscriptionService.spec.mjs pass under NEO_TEST_SKIP_CI=true in Lane C unit matrix row.

Out of Scope

  • Other unit-test substrate failures discovered in the same Lane C run (filed separately as Bucket G).
  • Refactoring the per-session McpServer pattern itself.

Related

  • Surfacing context: Lane C followup PR #10922 run 25514310691 unit matrix row.
  • Originating refactor: #10916 (per-session McpServer factory + Set-based notification dispatch).
  • Sibling ticket: Bucket G — additional substrate failures (filed concurrently).

Origin Session ID: 7e897a0b-33ce-4d6c-b1a9-a1ff93e4e571

Retrieval Hint: query_raw_memories(query="setMcpServer addMcpServer regression CoalescingEngineService #10916 test consumers")

tobiu closed this issue on May 7, 2026, 8:45 PM
tobiu referenced in commit e912c57 - "fix(mcp): migrate CoalescingEngine tests to multi-server API (#10923) (#10925) on May 7, 2026, 8:45 PM