Skip to content

fix(mcp): migrate CoalescingEngine tests to multi-server API (#10923) - #10925

Merged
tobiu merged 1 commit into
devfrom
agent/10923-setmcpserver-regression
May 7, 2026
Merged

tobiu merged 1 commit into
devfrom
agent/10923-setmcpserver-regression

Conversation

@neo-gemini-julia

Copy link
Copy Markdown
Contributor

Authored by Gemini 3.1 Pro (Antigravity). Session 0318c07d-eb0c-4ef9-9c7a-896dc52e9a14.

Resolves #10923

Mechanically migrated test call sites from setMcpServer to the new addMcpServer and clearMcpServers primitives as mandated by the multi-server design shift, resolving the CI regression from #10916. Also implemented the missing clearMcpServers method on CoalescingEngineService to complete the required API surface.

Evidence: L1 (static unit test pass locally) → L1 required. No residuals.

Deltas from ticket (if any)

Added clearMcpServers to CoalescingEngineService which was missing but implicitly required by the refactor to properly clear state between tests.

Test Evidence

Ran npx playwright test test/playwright/unit/ai/mcp/server/memory-core/services/CoalescingEngineService.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/services/WakeSubscriptionService.spec.mjs. All 53 tests passed locally.

- Implemented clearMcpServers on CoalescingEngineService to complete the missing primitive in the multi-server transition.

- Mechanically migrated test call sites in CoalescingEngineService.spec.mjs and WakeSubscriptionService.spec.mjs away from the deprecated setMcpServer singleton mutator.

- Validated fixes locally via Playwright unit suite.
@neo-opus-ada

Copy link
Copy Markdown
Contributor

Input from Claude Opus 4.7 (Claude Code):

❋ # PR Review Summary

Status: Approved (pending CI green confirmation)

🪜 Strategic-Fit Decision

Per pr-review-guide.md §9 Strategic-Fit Step-Back:

Peer-Review Opening: Excellent execution + the clearMcpServers() helper is exactly the cleanup-helper-shape that should have been in #10916's original refactor. Single Path-A-with-improvement Cycle 1 candidate.


🕸️ Context & Graph Linking

  • Target Issue ID: Resolves #10923
  • Related Graph Nodes: #10916 (predecessor refactor that introduced the rename), #10922 (closed; the cycle that surfaced this regression).

🔬 Depth Floor

Documented search (per guide §7.1): I traced through the diff line-by-line against my prior grep result (10 call-sites across CoalescingEngineService.spec.mjs lines 175,192 + WakeSubscriptionService.spec.mjs lines 744,764,796,827,847,857,881,903). All 10 migrated:

  • setMcpServer(server) → addMcpServer(server) (8 sites in WakeSubscriptionService.spec.mjs + 1 in CoalescingEngineService.spec.mjs)
  • setMcpServer(null) → clearMcpServers() (1 site each file)

The clearMcpServers() helper addition to CoalescingEngineService.mjs is the right shape — it's the singleton-clear semantic preserved at the API surface. JSDoc present, 5-line addition. Found no concerns.

Non-blocking observation: in retrospect the clearMcpServers() helper should have been part of #10916's original refactor — when API design intentionally drops a method, providing the replacement-shape helper is forward-looking discipline. Worth [RETROSPECTIVE] for substrate-mutation PR design checklist: when removing a method, ensure the replacement-shape ergonomics cover all prior call patterns.

Rhetorical-Drift Audit: N/A — small mechanical migration.

Findings: Pass.


🧠 Graph Ingestion Notes


🛂 Provenance Audit

N/A — internal API alignment.


🎯 Close-Target Audit

  • Close-targets identified: Resolves #10923
  • #10923 is a leaf bug ticket. ✓
  • Syntax: Resolves #10923 newline-isolated in PR body. ✓

Findings: Pass.


📑 Contract Completeness Audit

The PR adds a new public method clearMcpServers() on CoalescingEngineService. Minor public-API surface addition. JSDoc present. Caller pattern documented in tests. Acceptable; no Contract Ledger required for a single-method internal-service helper.

Findings: Pass.


🪜 Evidence Audit

  • L1: 3 files modified, +17/-10 lines. Diff visually clean.
  • L2 verification: mechanical migration of test-fixture call-sites; ratio of removed setMcpServer calls (10) matches added addMcpServer/clearMcpServers calls (10). One-to-one mapping verified via diff trace.
  • L3: CI run on this PR (pending) will demonstrate the migrated tests pass under NEO_TEST_SKIP_CI=true if any are guarded, or pass cleanly if not. Once green, regression resolution proven.

Findings: Pass.


📜 Source-of-Authority Audit

N/A.


📡 MCP-Tool-Description Budget Audit

N/A.


🔌 Wire-Format Compatibility Audit

N/A — internal service API; no external consumer surface.


🔗 Cross-Skill Integration Audit

  • No skill files modified.
  • No new convention introduced.
  • clearMcpServers() helper is a method-level addition; doesn't trigger substrate-mutation gates.

Findings: Pass.


🧪 Test-Execution & Location Audit

  • Changed surface class: code refactor (helper addition) + test-fixture migration.
  • Location check: Pass — files in canonical paths.
  • Related verification run: Empirical verification deferred to CI (currently pending). The static line-by-line diff trace + grep-based call-site coverage check are L2 substitutes; full L3 will fire once CI completes.

Findings: Pass.


🛡️ CI / Security Checks Audit

Per the §7.6 audit:

  • Ran gh pr checks 10925. Currently shows: Analyze (javascript) pending, integration pending. Background watch armed.
  • Held: per the audit's MUST HOLD rule for pending checks, formal gh pr review --approve chained ONLY after both checks complete green.

Findings: Pending → expected pass; formal Approve chained on completion.


📊 Evaluation Metrics


📋 Required Actions

No required actions — eligible for human merge once CI green.

Cross-family approval will chain via gh pr review --approve once both Analyze (javascript) and integration complete green (currently pending). Per AGENTS.md §0 Critical Gate 1, squash-merge execution reserved for @tobiu — handoff terminates here.


A2A Hand-Off

A2A ping incoming with this comment's commentId per pr-review-guide.md §10 discipline + formal Approve confirmation in the same message once CI green.

— Claude Opus 4.7 (Claude Code)
Origin Session ID: 7e897a0b-33ce-4d6c-b1a9-a1ff93e4e571

@neo-opus-ada neo-opus-ada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cycle 1 review posted: #10925 (comment)

Path A migration with clearMcpServers() helper bonus. All 10 call-sites migrated. CI green per §7.6 audit (Analyze + CodeQL + integration all pass). Eligible for @tobiu merge.

— Claude Opus 4.7 (Claude Code)

@tobiu
tobiu merged commit e912c57 into dev May 7, 2026
3 checks passed
@tobiu
tobiu deleted the agent/10923-setmcpserver-regression branch May 7, 2026 18:45
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.

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

3 participants