LearnNewsExamplesServices
Frontmatter
id12874
titleai/deploy base+dev compose missing in-process WAL drain → recall broken post-#12859
stateClosed
labels
bugaiarchitecturebuild
assigneesneo-opus-grace
createdAtJun 11, 2026, 12:22 AM
updatedAtJun 11, 2026, 12:42 AM
githubUrlhttps://github.com/neomjs/neo/issues/12874
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 11, 2026, 12:42 AM

ai/deploy base+dev compose missing in-process WAL drain → recall broken post-#12859

Closed v13.0.0/archive-v13-0-0-chunk-17 bugaiarchitecturebuild
neo-opus-grace
neo-opus-grace commented on Jun 11, 2026, 12:22 AM

Context

Empirically validating the canonical ai/deploy cloud stack (full dockerized boot — all containers healthy on current dev) surfaced a config gap CI doesn't catch: post-#12859 (the add_memory embed decouple), add_memory writes its WAL but nothing drains it on the production compose → embeddings never materialize → semantic recall (query_summaries / query_raw_memories) reads empty. Confirmed empirically: no embed-daemon process runs, and the mc-server doesn't host the in-process drain.

The Problem

The base ai/deploy/docker-compose.yml + docker-compose.dev.yml mc-server services do not set NEO_MEMORY_WAL_IN_PROCESS_DRAIN=true. Only docker-compose.test.yml does — so the CI integration suite drains + passes, masking the gap for real deployments. The config JSDoc (config.template.mjs:308-318) is explicit: inProcessDrain is "the containerized / single-process deployment shape (dockerized MC, npx-neo-app workspaces) where no orchestrator-supervised embed daemon exists." The base compose IS exactly that shape — single-process dockerized MC, no embed-daemon container — but doesn't enable it. Per #12859's design: the in-process drain is the canonical single-container mode (the embed-daemon is for multi-container splits with a shared WAL volume; the sidecar shape was evaluated and rejected).

The Architectural Reality

  • ai/deploy/docker-compose.yml mc-server (~:93-114) — env list, no NEO_MEMORY_WAL_IN_PROCESS_DRAIN.
  • ai/deploy/docker-compose.dev.yml mc-server — same gap.
  • ai/deploy/docker-compose.test.yml (:154-160, :217-220) — has the flag + poll + dir + the single-process comment (the pattern to mirror).
  • config.template.mjs:318inProcessDrain: leaf(false, 'NEO_MEMORY_WAL_IN_PROCESS_DRAIN', 'boolean').

The Fix

Add to the base + dev ai/deploy compose mc-server (mirroring test.yml):

  • NEO_MEMORY_WAL_IN_PROCESS_DRAIN=true
  • NEO_MEMORY_WAL_POLL_INTERVAL_MS=250
  • a persistent NEO_MEMORY_WAL_DIR on the data volume (verify the default lands on the persistent volume; test.yml's /tmp is ephemeral-by-design)
  • the single-process / sole-drainer comment block (mutual-exclusion: never enable alongside the embed-daemon).

Decision Record impact

none — aligned-with ADR 0014 (cloud deployment topology); applies #12859's documented single-container mode.

Acceptance Criteria

  • base + dev ai/deploy compose mc-server set NEO_MEMORY_WAL_IN_PROCESS_DRAIN=true (+ poll + persistent WAL dir).
  • The single-process / sole-drainer comment carried (mutual-exclusion invariant).
  • CI green.

Out of Scope

  • The embed-daemon-as-sidecar (rejected per #12859's design).
  • Private/client deployment composes (operator-gated, separate trackers).

Related

  • #12859 (the add_memory embed decouple), #12864 (drain-lock guards the sole-drainer invariant), #12840.

Release classification: ON the board — production-deployment recall is broken post-#12859; release-blocking (per the §4 scope-gate).

Retrieval Hint: "ai/deploy compose NEO_MEMORY_WAL_IN_PROCESS_DRAIN recall empty post-#12859 single-container"

tobiu referenced in commit b27451b - "fix(deploy): enable in-process WAL drain on base+dev mc-server compose (#12874) (#12875) on Jun 11, 2026, 12:42 AM
tobiu closed this issue on Jun 11, 2026, 12:42 AM