LearnNewsExamplesServices
Frontmatter
id13069
titleMC healthcheck: drop static database.topology + redundant mailboxPreview (context-tax slice of #12768)
stateClosed
labels
enhancementai
assigneesneo-opus-grace
createdAtJun 13, 2026, 9:12 AM
updatedAtJun 21, 2026, 2:17 AM
githubUrlhttps://github.com/neomjs/neo/issues/13069
authorneo-opus-grace
commentsCount0
parentIssue12768
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 13, 2026, 3:45 PM

MC healthcheck: drop static database.topology + redundant mailboxPreview (context-tax slice of #12768)

neo-opus-grace
neo-opus-grace commented on Jun 13, 2026, 9:12 AM

Context

The first, cleanly-separable slice of #12768 ("Trim the Memory Core healthcheck to a lean liveness probe"). The healthcheck response schema loads into every agent's context at MCP tool-enumeration, so each dead field is a permanent per-agent context-tax. Two fields are confirmed-dead and removable without any relocation (unlike the migration census, which #12768 keeps for an on-demand move).

The Problem

  • database.topologybuildTopologyBlock returns a static projection: post-federation-retirement, mode is statically 'unified' and resolvedVia statically 'engines.chroma' (per its own JSDoc). A constant cosplaying as a diagnostic. It was also never documented in the openapi database schema — undocumented runtime drift.
  • mailboxPreview — a degraded-mode fallback, redundant with the dedicated list_messages tool. Its openapi schema (38 lines) had also drifted from the runtime shape ({unreadCount, inbox, outboxRecent} documented vs {unreadCount, latestPreview} returned).

The Fix

  • Remove database.topology from the healthcheck payload + the buildTopologyBlock pure function + its dedicated unit-spec describe + the integration-spec assertions.
  • Remove mailboxPreview from the payload + the now-unused MailboxService dynamic import + its 38-line openapi schema + the spec stubbing.
  • MailboxService.getHealthcheckPreview() stays as a method (its own tests unchanged); only the healthcheck's call to it is removed.

Contract Ledger

Field Value
Target Surface ai/services/memory-core/HealthService.mjs, ai/mcp/server/memory-core/openapi.yaml, + 2 specs
Source of Authority #12768 (parent trim ticket); the static-constant + redundant-field analysis confirmed in source
Proposed Behavior Healthcheck output no longer carries database.topology or mailboxPreview; openapi schema aligned (net −38 lines)
Fallback n/a — pure removals; topologyConflicts (a distinct real REM-axis signal) is untouched
Evidence HealthService.spec.mjs green (59 passed); integration healthcheck.spec.mjs topology assertions removed

Acceptance Criteria

  • database.topology + buildTopologyBlock removed from output + the pure-fn + its specs.
  • mailboxPreview removed from output + openapi schema + the unused MailboxService import/stub.
  • topologyConflicts (distinct REM-axis signal) left intact.
  • Unit + integration specs updated; npm run test-unit green for HealthService.spec.mjs.

Out of Scope (remains in #12768)

  • migration census → on-demand surface (the per-call ~17.9k-record batch-scan relocation — a new script behind a service method, separable).
  • wake.gateReason + verbose provider/auth trimming.

Related

Refs #12768 (parent trim umbrella; this delivers its first AC). aligned-with the MCP-tool-output-schema context-tax placement principle.

Release classification: post-release (token-cost / observability hygiene; nothing v13.x-blocking).

Authored by Claude Opus 4.8 (Claude Code, @neo-opus-grace / Grace).

tobiu referenced in commit 2a12f1d - "refactor(memory-core): drop static database.topology + redundant mailboxPreview from healthcheck (#13069) (#13071) on Jun 13, 2026, 3:45 PM
tobiu closed this issue on Jun 13, 2026, 3:45 PM