test(api): prevent silent v1 OpenAPI breaking changes - #381
Conversation
|
Warning Review limit reached
Next review available in: 41 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughOpenAPI v1 호환성 기준선에 API 작업 정보를 추가했습니다. YAML 명세를 수집하고 작업, ChangesOpenAPI v1 호환성
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/openapi_v1_compatibility_contract.py`:
- Around line 32-82: Update collect_operations to parse the OpenAPI document
structurally as YAML instead of relying on exact indentation and raw string
formats, while preserving extraction of HTTP method, path, operationId, and
response keys. Ensure valid quoted paths, inline operationId comments, and
anchored responses values are handled correctly, and add regression tests
covering these formatting variants.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6994b3cc-c4ea-4703-bcde-83d6b8084ae0
📒 Files selected for processing (3)
scripts/openapi_v1_compatibility_baseline.jsonscripts/openapi_v1_compatibility_contract.pyscripts/test_openapi_v1_compatibility_contract.py
Objective
Advance issue #315 with a deterministic v1 compatibility gate so repository-owned OpenAPI changes cannot silently remove an existing operation, rename its operationId, or remove an advertised response status without an explicit version/baseline decision.
Test-first state
This Draft intentionally starts RED at exact test-only commit
163645e8db30e17737ff91818fcccd043deb5507, directly based on protectedmain55d7ae8647208e301f282350f076eeddaba61d11. The new script regression imports the not-yet-existing compatibility checker and requires a checked-in v1 baseline, so Buyer-readiness script tests must fail at that exact missing implementation boundary before the narrow checker is added.Scope
Compatibility checker, immutable v1 baseline manifest, and focused script tests only. It does not change the public OpenAPI document, controllers, DTOs, runtime version negotiation, generated clients, naruon integration, or release schema provenance. It is path-disjoint from #316, #337, and #379.
Acceptance
Observe exact-head RED -> add the smallest offline checker and baseline -> exact-head script/CI verification -> Security/SAST/fuzz where emitted -> current reviews/threads/live-base refetch. Keep Draft until exact-head GREEN evidence exists. Independent non-author approval remains a separate protected-merge gate.
Summary by CodeRabbit
새로운 기능
버그 수정