Skip to content

Document and characterize recursive applicator resource growth - #1287

Merged
stevehu merged 1 commit into
masterfrom
docs/issue-1276-master
Oct 5, 2026
Merged

stevehu merged 1 commit into
masterfrom
docs/issue-1276-master

Conversation

@stevehu

@stevehu stevehu commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Recursive overlapping anyOf/oneOf alternatives 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 oneOf discards 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 verify on JDK 25 passed: 8,577 tests, 0 failures, 0 errors, 30 skipped. All 36 new cases passed. git diff --cached --check passed.

Related to #1276. Documentation and tests only; this PR does not fix the resource-exhaustion behavior or close the issue.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@stevehu
stevehu merged commit 51dab24 into master Oct 5, 2026
5 checks passed
@stevehu
stevehu deleted the docs/issue-1276-master branch October 5, 2026 16:52
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.

2 participants