[LOW PRIORITY] refactor: Switch from jsonref to prance for OpenAPI parsing
loading diff…
Follow-up to PR #861 to reduce custom code and improve maintainability. PR #861 fixed the exponential OOM issue by skipping JsonRef proxy conversion. This PR takes it further by replacing jsonref with a mature library.
Important: This PR is based on #861 and should be merged after #861 is merged to next.
Replace custom jsonref implementation with the prance library, eliminating JsonRef proxy complexity entirely.
Changes:
jsonref>=1.1.0,<2 with prance[osv]>=25.0.0,<26jsonref>=1.1.0,<2 (still used in test resources)_load_and_resolve_spec() from 56 lines to 23 lines (58% reduction)Mapping[...] back to Dict[...] since prance returns plain dictsisinstance(x, Mapping) back to isinstance(x, dict)Benefits:
# Run extractor tests (22 tests)
uv run pytest cortex/tests/test_agents/test_action_finder/test_extractors.py -v
# Run code quality checks
make fmt && make chk