Skip to content

v1.51.5

Choose a tag to compare

@erraggy erraggy released this 16 Feb 06:46
· 25 commits to main since this release
Immutable release. Only release title and notes can be modified.
51bf851

πŸ› Circular Ref Fix & MCP Server Improvements

This patch release fixes two parser bugs that affected resolve_refs behavior β€” circular references are now handled correctly and memory usage drops dramatically for large specs β€” alongside MCP server UX improvements.

Circular Reference Resolution (Fixes #326)

Previously, detecting any circular $ref in a document caused the parser to discard all resolution work and fall back to the original unresolved bytes. Now, non-circular $refs are resolved normally even when circular refs exist in the same document. Only the truly circular nodes remain as $ref pointers.

# Before: ANY circular ref β†’ entire document stays unresolved
# After:  only circular $ref nodes stay as pointers; everything else is inlined

Memory Blowup Elimination

The resolve_refs code path previously used a marshal/unmarshal roundtrip that inflated peak memory (e.g., GitHub API spec: 11.6 MB input β†’ 108 MB intermediate allocation). The new decodeFromMap approach decodes resolved map[string]any data directly to typed OAS structs, eliminating the intermediate []byte allocation entirely.

MCP Server Improvements

  • Detail mode limit (25): Walk tools in detail=true mode now default to 25 results instead of 100, keeping output manageable for LLM context windows
  • Parameter filter auto-resolution: walk_parameters automatically resolves $ref parameters when filtering by in or name β€” no need to set resolve_refs=true manually
  • Join strategy names fixed: The join tool now correctly documents accept-left/accept-right (hyphenated) instead of accept_left/accept_right, eliminating first-attempt errors from LLM agents
  • Known behaviors documented: Filter edge cases, cross-tool limitations, and detail defaults now documented in MCP server docs

πŸ”’ User Impact

  • No breaking changes to the public Go API
  • resolve_refs behavior change is a bug fix β€” documents that previously lost all resolution now correctly resolve non-circular refs
  • MCP server changes are backward compatible (detail limit is a default, not a hard cap)

πŸ“Š Quality Metrics

  • βœ… All tests passing (8,200+ unit tests)
  • βœ… Zero vulnerabilities (govulncheck clean)
  • βœ… All 10 benchmark suites passing with no regressions
  • βœ… Documentation verified accurate

What's Changed

Other Changes

  • feat(mcp): detail limit, param auto-resolve, and known behavior docs by @erraggy in #327
  • fix(parser): resolve circular refs and eliminate resolve_refs memory blowup by @erraggy in #329
  • fix(mcp): use correct hyphenated collision strategy names in join tool by @erraggy in #330
  • chore: prepare v1.51.5 release by @erraggy in #331

Full Changelog: v1.51.4...v1.51.5