LearnNewsExamplesServices
Frontmatter
id10305
titleMemory Core MCP Server boot crash due to openapi.yaml indentation syntax
stateClosed
labels
bugaiarchitecture
assigneesneo-gemini-pro
createdAtApr 24, 2026, 9:56 PM
updatedAtApr 24, 2026, 10:37 PM
githubUrlhttps://github.com/neomjs/neo/issues/10305
authorneo-gemini-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 24, 2026, 10:37 PM

Memory Core MCP Server boot crash due to openapi.yaml indentation syntax

Closed v13.0.0/archive-v13-0-0-chunk-6 bugaiarchitecture
neo-gemini-pro
neo-gemini-pro commented on Apr 24, 2026, 9:56 PM

Context Following the recent PR merge cycle integrating new MCP tools, the memory-core MCP Server (and potentially others) began crashing immediately on boot with YAMLException: bad indentation of a mapping entry. This effectively brought down the Agent OS infrastructure locally.

The Problem Initial triage suspected a cross-contamination error (e.g., copying a block incorrectly from one file to another). The stack trace reported YAMLException: bad indentation of a mapping entry (1209:114). However, forensic investigation revealed the actual bug was an illegal YAML sequence inside ai/mcp/server/github-workflow/openapi.yaml, not memory-core/openapi.yaml.

On line 1209, the description was: description: The canonical GitHub global node ID of the comment. Use with \get_conversation({comment_id: ...})` or in A2A payloads to reference just-this-comment.`

Because the string was unquoted, the sequence : inside {comment_id: ...} triggered the js-yaml parser to treat it as an inline mapping entry key. This caused an immediate parser crash due to invalid spacing/indentation. Because ai/services.mjs eagerly loads ALL .yaml specifications synchronously, a single syntax error in the GitHub Workflow spec cascaded and actively prevented all dependent servers (including Memory Core) from booting.

The Architectural Reality The js-yaml parser is extremely strict about the : sequence in unquoted strings. The vulnerability here was dual-layered:

  1. An unquoted string in OpenAPI documentation causing parser failures.
  2. The eager, synchronous initialization design of ai/services.mjs, which fails the entire stack if any single MCP server's specification is corrupted.

The Fix

  1. Wrapped the description string in ai/mcp/server/github-workflow/openapi.yaml in double quotes.
  2. Executed OpenApiValidatorCompliance.spec.mjs to prove OpenAPI syntax integrity.
  3. Executed McpServersHealth.spec.mjs to prove all MCP servers boot properly.

Acceptance Criteria

  • All .yaml files must parse without throwing a YAMLException.
  • All MCP servers must boot and respond to JSON-RPC healthchecks.

Out of Scope This ticket does not refactor ai/services.mjs to handle resilient or lazy loading of .yaml files, though that is a strongly recommended architectural followup to prevent blast-radius cascades in the future.

Avoided Traps

  • Assuming the error source: The stack trace originally appeared during the boot of memory-core/mcp-server.mjs, but the actual corruption was isolated within github-workflow/openapi.yaml.

Origin Session ID: 0b29a8fa-c6b0-42e2-ab3b-8015a99db2d8 Retrieval Hint: "YAMLException openapi.yaml js-yaml parse error cascade"

tobiu referenced in commit 12f8ffc - "fix(mcp): wrap openapi description in quotes to prevent YAMLException on boot (#10305) (#10306) on Apr 24, 2026, 10:37 PM
tobiu closed this issue on Apr 24, 2026, 10:37 PM