Repository navigation
feat(query): add query complexity limits to prevent resource exhaustion - #57
Merged
Merged
Conversation
- Add max_derived_facts and max_results fields to RecursiveEvaluator - Add max_derived_facts and max_results fields to StratifiedEvaluator - Add DEFAULT_MAX_ITERATIONS (1000), DEFAULT_MAX_DERIVED_FACTS (100_000), DEFAULT_MAX_RESULTS (1_000_000) - Add limit checks in evaluation loop to prevent runaway rule evaluation - Add tests for both limit types on both evaluators - Fix executor.rs to pass new parameters to StratifiedEvaluator Closes #46
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #57 +/- ##
==========================================
+ Coverage 86.00% 86.04% +0.03%
==========================================
Files 25 25
Lines 4237 4248 +11
==========================================
+ Hits 3644 3655 +11
Misses 593 593
🚀 New features to boost your workflow:
|
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.
Summary
max_derived_factsandmax_resultsfields toRecursiveEvaluatorto limit query complexityStratifiedEvaluatorfor stratified rule evaluationDEFAULT_MAX_ITERATIONS(1000),DEFAULT_MAX_DERIVED_FACTS(100k),DEFAULT_MAX_RESULTS(1M)Closes #46