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.topology — buildTopologyBlock 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
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).
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
migrationcensus, which #12768 keeps for an on-demand move).The Problem
database.topology—buildTopologyBlockreturns a static projection: post-federation-retirement,modeis statically'unified'andresolvedViastatically'engines.chroma'(per its own JSDoc). A constant cosplaying as a diagnostic. It was also never documented in the openapidatabaseschema — undocumented runtime drift.mailboxPreview— a degraded-mode fallback, redundant with the dedicatedlist_messagestool. Its openapi schema (38 lines) had also drifted from the runtime shape ({unreadCount, inbox, outboxRecent}documented vs{unreadCount, latestPreview}returned).The Fix
database.topologyfrom the healthcheck payload + thebuildTopologyBlockpure function + its dedicated unit-spec describe + the integration-spec assertions.mailboxPreviewfrom the payload + the now-unusedMailboxServicedynamic 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
ai/services/memory-core/HealthService.mjs,ai/mcp/server/memory-core/openapi.yaml, + 2 specsdatabase.topologyormailboxPreview; openapi schema aligned (net −38 lines)topologyConflicts(a distinct real REM-axis signal) is untouchedHealthService.spec.mjsgreen (59 passed); integrationhealthcheck.spec.mjstopology assertions removedAcceptance Criteria
database.topology+buildTopologyBlockremoved from output + the pure-fn + its specs.mailboxPreviewremoved from output + openapi schema + the unusedMailboxServiceimport/stub.topologyConflicts(distinct REM-axis signal) left intact.npm run test-unitgreen forHealthService.spec.mjs.Out of Scope (remains in #12768)
migrationcensus → 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-withthe 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).