Repository navigation
feat(rules): one total max_derived_facts limit; max_results a deprecated alias (#553) - #663
Merged
Merged
Conversation
…ted alias (#553) max_derived_facts (OpenOptions and :max-derived-facts) now limits every fact the rules of one query derive, across iterations, strata and repeated passes; base facts do not count. The per-iteration check is gone from both evaluators. max_results / :max-results become deprecated aliases (#[deprecated] on the OpenOptions field and builder); with both, the lower applies, and a per-query value still replaces the database's. INT-020 text names derived facts. Test counts brought up to date (1679 total, 1669 passing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
…ed_facts alone can raise the limit (#553) Codex review: the alias defaulted to 1,000,000 and the lower of the two applied, so max_derived_facts(2_000_000) alone stayed at 1,000,000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Implements #553 on
v3, ahead of #548 (the streaming engine'sRecursiveoperator enforces this one limit; semi-naive evaluation cannot reproduce today's per-iteration count, which counts naive re-derivations).Change
OpenOptions::max_derived_facts/:max-derived-factsnow count every fact the rules derive, across iterations, strata and the Recursion through a rule with not / not-join / or returns too few rows #633 repeated passes; base facts do not count. The per-iteration checks inRecursiveEvaluatorand inStratifiedEvaluator's mixed pass are removed.max_results/:max-resultsare deprecated aliases.#[deprecated(since = "3.0.0")]on theOpenOptionsfield and builder method. The lower of the two applies (OpenOptions::derived_fact_limit);OpenOptions::max_resultsnow defaults tousize::MAX(no limit of its own), so it can lower the limit but not raise it (Codex finding: with a 1,000,000 default,max_derived_facts(2_000_000)alone stayed at 1,000,000). A per-query value still replaces the database's (lower of the two per-query values when both are given).INT-020text is nowevaluator: iteration or derived-fact limit exceeded: Max derived facts (N) exceeded. …. Code and category unchanged.ERROR_REFERENCE.mdupdated, with the pre-v3 meaning.DatalogExecutornow carry one limit (internal API).CHANGELOG.mdbreaking-changes entry.Tests
db::tests: the limit is the total, not one iteration (15 facts derived, at most 5 new per iteration: 15 passes, 14 fails with the new text); the alias alone, and the lower of the two in either order; per-query values replace the database's, alias too, lower of two per-query values applies.max_resultstest is removed.max_resultsnow usemax_derived_facts.max_derived_factsalone raises the limit above the default; the alias alone does not.origin/v3); all three docs now show the measured value.Docs site
project-minigraf/minigraf-docs PR (branch
v3/553-max-derived-facts):datalog-reference.mdandperformance-tuning.md,@since v3.0.0/@range v2.0.5..v3.0.0.Not changed:
minigraf-playground's system prompt mentions:max-results, which still works as an alias. No binding exposes either option. No v2.x backport (per #553).Part of #473 prep (#548). Closes nothing by keyword: #553 is closed by hand after merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT