LearnNewsExamplesServices
Frontmatter
id13834
titleIdle-window starvation: per-message concept-extraction fires ungated gemma4 calls in parallel with exclusive-heavy tasks
stateClosed
labels
bugaiarchitecturemodel-experience
assigneesneo-opus-grace
createdAtJun 22, 2026, 1:48 AM
updatedAtJun 22, 2026, 2:21 AM
githubUrlhttps://github.com/neomjs/neo/issues/13834
authorneo-opus-grace
commentsCount0
parentIssue13624
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 22, 2026, 2:21 AM

Idle-window starvation: per-message concept-extraction fires ungated gemma4 calls in parallel with exclusive-heavy tasks

Closed v13.1.0/archive-v13-1-0-chunk-5 bugaiarchitecturemodel-experience
neo-opus-grace
neo-opus-grace commented on Jun 22, 2026, 1:48 AM

Context

Operator-flagged live reality (2026-06-21): "the current scheduling is NUTS. there are no free slots and gemma4 gets hammered all the time… we NEED an idle window where gemma4 does not get hammered with other tasks in PARALLEL." The idle window is the prerequisite for clean REM extraction and for any benchmarking/experiments. Sub of #13624 (orchestrator heavy-maintenance).

Root Cause (V-B-A'd against dev)

Two hot-path tool calls fired chat-model inference fire-and-forget, bypassing the exclusive-heavy serialization the registry tasks respect:

  • MailboxService.mjs:677extractMessageConcepts (a gemma4 chat call, up to 2 attempts) on every A2A message.
  • MemoryService.mjs:536buildMiniSummary (a gemma4 chat call) on every memory write.

Vicious cycle: the load scales with swarm A2A traffic — the more the maintainers coordinate, the more gemma4 calls fire.

The Fix (operator-directed — deletion, not a new scheduled task)

The scheduled equivalents already exist — so the inline calls are redundant duplicates, not a missing capability. Remove them:

  • Concepts: DreamService already runs ConceptDiscoveryService.runDiscoveryCycle() (L929, auto-mining) + ConceptIngestor.syncConceptsToGraph() (L341, curated sync) under the heavy lease. The inline per-message extraction duplicated this on the hot path.
  • Mini-summaries: the scheduled backfillMiniSummaries pass already fills miniSummary IS NULL AGENT_MEMORY nodes (the node itself is projected by _projectMemoryToGraph, awaited).

Acceptance Criteria (revised — see Evolution)

  • Per-message extractMessageConcepts removed from the addMessage hot path.
  • Per-write buildMiniSummary removed from the addMemory hot path; the AGENT_MEMORY node still projects (_projectMemoryToGraph), the scheduled backfill enriches the miniSummary.
  • The per-message TAGGED_CONCEPT@0.8 auto-tagging edges are retired as noise (NOT preserved) — they were the bulk of the non-curated graph bloat. The concept population is retained via the orchestrator-scheduled ConceptDiscoveryService + ConceptIngestor; curated taggedConcepts@1.0 edges still link inline.
  • No new model inference on the message/memory tool hot paths; all model inference is orchestrator-driven (scheduled, lease-gated).
  • Measurable idle gap in gemma4 utilization between heavy tasks (the operator's "free slot") — validated post-merge.

Evolution

The original ACs proposed moving per-message concept-extraction into a new scheduled, backpressure-aware task with a conceptExtracted marker and no-loss TAGGED_CONCEPT@0.8 preservation. The operator's directive (2026-06-21, "we already HAVE a scheduled task… remove it from messaging. ONLY orchestrator driven") superseded that: no new task is needed because ConceptDiscoveryService.runDiscoveryCycle already mines concepts under the heavy lease, and the per-message @0.8 auto-tags are redundant noise (the ~19.5k non-curated CONCEPT bloat), not signal to preserve. The fix is therefore a deletion (PR #13836), and the contract is retire-the-redundant-inline-path, not relocate-it-losslessly. (Resolves @neo-gpt's #13836 contract-drift CHANGES_REQUESTED.)

Related

  • Parent: #13624. Unblocks: the gemma4-rem-benchmark / keep-alive-probe; the REM-extraction consolidation (#12439 / #12073).
  • Root: MailboxService.mjs:677, MemoryService.mjs:536. Retained paths: DreamServiceConceptDiscoveryService.runDiscoveryCycle (L929) + ConceptIngestor.syncConceptsToGraph (L341); backfillMiniSummaries.

Origin Session ID: e96a0867-4c28-4877-b2f4-f56173ee9fd1

tobiu referenced in commit 149e611 - "fix(ai): remove inline per-message/per-memory chat-model calls to free the orchestrator idle window (#13834) (#13836) on Jun 22, 2026, 2:21 AM
tobiu closed this issue on Jun 22, 2026, 2:21 AM