Repository navigation
Document and characterize recursive applicator resource growth - #1287
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The documentation and bounded tests characterize existing behavior without production changes or identified blocking issues.
Review effort: Balanced
Findings: None
What changed in this PR
Documents the recursive applicator resource-growth limitation reported in #1276 and adds bounded characterization tests; it does not fix the underlying behavior.
Changes:
- Clarifies fail-fast and output-format limitations, with an example and application mitigations.
- Adds 36 cases covering both applicators, three output formats, fail-fast settings, and three depths.
| File | Description |
|---|---|
| src/test/java/com/networknt/schema/Issue1276Test.java | Counts repeated leaf errors without timing or memory-exhaustion thresholds. |
| README.md | Explains recursive resource growth and mitigation options. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recursive overlapping
anyOf/oneOfalternatives can perform exponential validation work and allocate errors even when callers select fail-fast, Boolean, or flag output. The README's validation-error mitigation advice currently omits this limitation.Clarify the security guidance, add a small recursive example and application mitigations, and add 36 bounded characterization cases covering both applicators, three output formats, fail-fast on/off, and depths 0/4/8. Tests count leaf errors as they occur, including errors
oneOfdiscards from the final result. Count expectations explicitly describe today's limitation and should change when the underlying issue is fixed; no timing or OOM thresholds are used.Validation:
mvn -q verifyon JDK 25 passed: 8,577 tests, 0 failures, 0 errors, 30 skipped. All 36 new cases passed.git diff --cached --checkpassed.Related to #1276. Documentation and tests only; this PR does not fix the resource-exhaustion behavior or close the issue.