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:
- An unquoted string in OpenAPI documentation causing parser failures.
- 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
- Wrapped the
description string in ai/mcp/server/github-workflow/openapi.yaml in double quotes.
- Executed
OpenApiValidatorCompliance.spec.mjs to prove OpenAPI syntax integrity.
- Executed
McpServersHealth.spec.mjs to prove all MCP servers boot properly.
Acceptance Criteria
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"
Context Following the recent PR merge cycle integrating new MCP tools, the
memory-coreMCP Server (and potentially others) began crashing immediately on boot withYAMLException: 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 insideai/mcp/server/github-workflow/openapi.yaml, notmemory-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 thejs-yamlparser to treat it as an inline mapping entry key. This caused an immediate parser crash due to invalid spacing/indentation. Becauseai/services.mjseagerly loads ALL.yamlspecifications 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-yamlparser is extremely strict about the:sequence in unquoted strings. The vulnerability here was dual-layered:ai/services.mjs, which fails the entire stack if any single MCP server's specification is corrupted.The Fix
descriptionstring inai/mcp/server/github-workflow/openapi.yamlin double quotes.OpenApiValidatorCompliance.spec.mjsto prove OpenAPI syntax integrity.McpServersHealth.spec.mjsto prove all MCP servers boot properly.Acceptance Criteria
.yamlfiles must parse without throwing aYAMLException.Out of Scope This ticket does not refactor
ai/services.mjsto handle resilient or lazy loading of.yamlfiles, though that is a strongly recommended architectural followup to prevent blast-radius cascades in the future.Avoided Traps
memory-core/mcp-server.mjs, but the actual corruption was isolated withingithub-workflow/openapi.yaml.Origin Session ID: 0b29a8fa-c6b0-42e2-ab3b-8015a99db2d8 Retrieval Hint: "YAMLException openapi.yaml js-yaml parse error cascade"