LearnNewsExamplesServices
Frontmatter
id12978
titleAudit + exempt the non-embedding MC reads (get_session_memories, query_recent_turns) from the health-gate
stateClosed
labels
bugaimodel-experience
assigneesneo-opus-grace
createdAtJun 12, 2026, 11:38 AM
updatedAtJun 21, 2026, 2:16 AM
githubUrlhttps://github.com/neomjs/neo/issues/12978
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 12, 2026, 9:18 PM

Audit + exempt the non-embedding MC reads (get_session_memories, query_recent_turns) from the health-gate

Closed v13.1.0/archive-v13-1-0-chunk-1 bugaimodel-experience
neo-opus-grace
neo-opus-grace commented on Jun 12, 2026, 11:38 AM

Context

Carved from #12972 (the add_memory health-gate exemption) per cross-family review of PR #12975 (@neo-gpt REQUEST_CHANGES — close-target residual ownership). #12975 delivers the surgical add_memory exemption; this leaf owns #12972's separable secondary AC — auditing the other non-embedding reads for the same gate over-reach — so #12975 can Resolves #12972 cleanly without auto-closing a live residual.

The Problem

BaseServer.mjs:324 health-gates every non-exempt MC tool through the embedding write-canary (HealthService.mjs). When the embedder times out (REM/backfill saturation), it blocks tools that don't actually need the embedder. #12752 exempted the messaging tools; #12975 exempts add_memory (never-fail WAL write). But get_session_memories and query_recent_turns are ID / recency graph reads with no embedding dependency — yet they're still gated, so they go dark on any embedder hiccup too.

The Fix

V-B-A each tool's service read-path for an embedder call, and if confirmed embedder-independent (ID/recency reads), add them to getHealthExemptTools() (Server.mjs). Each needs a unit test asserting it bypasses the degraded health-gate (mirroring #12975's add_memory Server.spec pattern).

Explicitly NOT query_raw_memories / query_summaries — those embed the query for semantic search, so they genuinely cannot serve a result during an embedder outage; exempting them only changes the failure mode (gate-reject → embed-timeout), not the outcome.

Contract Ledger

Field Value
Target Surface Server.mjs#getHealthExemptTools() return array
Source of Authority BaseServer.mjs:324 (the gate); #12752 (messaging-exempt precedent); #12975 (add_memory exempt)
Proposed Behavior add get_session_memories + query_recent_turns iff the audit confirms they don't embed
Evidence audit of each tool's service read-path (does it call the embedder?) + a per-tool health-gate-bypass unit test

Acceptance Criteria

  • Audit documented: do get_session_memories / query_recent_turns invoke the embedder? (read their service paths)
  • If embedder-independent: both added to getHealthExemptTools() + a unit test per tool asserting bypass under a degraded health gate (mirroring #12975's Server.spec pattern).
  • query_raw_memories / query_summaries remain gated (NOT in scope — they embed the query).

Out of Scope

  • add_memory exemption (#12975 / #12972 — delivered).
  • The embedding-provider timeout root (the openAiCompatible 15s timeout under REM/backfill load — vega's diagnostic lane).
  • The cloud WAL-drain mirror (separate deployment-side ticket).

Related

#12972 (parent — the add_memory exemption this is carved from), #12975 (the PR that triggered the carve), #12752 (messaging-exempt precedent), #12838 (never-fail add_memory).

Sweep note: session-fresh carve-out from #12972 (filed today); no pre-existing dup possible. Live latest-open sweep light under the GitHub API rate-limit/timeout weather this hour.

Release classification: not release-blocking — same as #12972 (MC self-recovers per operator); embedder-outage resilience hygiene. Boardless per ticket-create §4.

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

tobiu referenced in commit fae1ab0 - "fix(memory-core): exempt non-embedding reads (get_session_memories, query_recent_turns) from the embedder health-gate (#12978) (#13007) on Jun 12, 2026, 9:18 PM
tobiu closed this issue on Jun 12, 2026, 9:18 PM