You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
enhancement: expose query complexity limits via OpenOptions #76
These constants are not exposed through any public API. Embedders with large graphs or legitimate deep recursive queries have no way to raise (or lower) them without patching the source.
Expected behaviour
OpenOptions (in src/db.rs) gains two optional builder methods:
When not set, the existing defaults apply unchanged. The configured limits are threaded through to the evaluator at query time.
Files to change
src/db.rs — OpenOptions struct + builder methods
src/query/datalog/evaluator.rs (or wherever the constants live) — replace compile-time constants with per-query values drawn from OpenOptions
Potentially src/query/datalog/executor.rs — if limits are enforced there
Test
Add a test that:
Opens a database with a very low max_derived_facts limit (e.g. 5)
Runs a recursive rule that would produce more than 5 derived facts
Asserts the query returns an error mentioning the limit
Confirms the same query succeeds when the limit is raised to a larger value
Do NOT use {:?} on Result in test assert messages (see CLAUDE.md Testing Conventions).
Philosophy note
This is consistent with Minigraf's zero-configuration philosophy: the defaults work out of the box, but power users can tune them. It does not add external dependencies or server-side configuration.
Activity
feat(db): expose query complexity limits via OpenOptions
feat(db): expose query complexity limits via OpenOptions
feat(db): expose query complexity limits via OpenOptions
Merge pull request #92 from adityamukho/fix/issue-76-query-complexity