Skip to content

Harden OpenAPI ingest for large real-world specifications - #125

Merged
SonAIengine merged 1 commit into
mainfrom
codex/realdata-ingest-hardening-0.42
Aug 16, 2026
Merged

Harden OpenAPI ingest for large real-world specifications#125
SonAIengine merged 1 commit into
mainfrom
codex/realdata-ingest-hardening-0.42

Conversation

@SonAIengine

Copy link
Copy Markdown
Owner

Summary

  • resolve OpenAPI references lazily per path instead of expanding and renormalizing the entire document
  • handle literal schema properties named $ref, circular references, and escaped JSON Pointer segments safely
  • cache schema leaf extraction within one ingest to avoid repeated traversal of shared response contracts
  • add regression coverage for lazy root resolution, shared caches, circular schemas, and Kubernetes-style $ref properties

Real-world validation

  • Stripe official OpenAPI (4.48 MB): 615 tools in 21.89s, max RSS about 1.05 GB; baseline timed out at 120s after exceeding 5.18 GB
  • Kubernetes official Swagger (4.48 MB): 1,202 tools in 4.75s, max RSS about 271 MB; baseline failed on a literal $ref schema property

Verification

  • poetry run ruff check .
  • poetry run ruff format --check .
  • poetry run pytest tests/ -q (1240 passed, 47 skipped)
  • poetry build

@SonAIengine
SonAIengine marked this pull request as ready for review August 16, 2026 11:23
@SonAIengine
SonAIengine merged commit 2ab9a96 into main Aug 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant