Skip to content

Expose fact query max_rows cap#327

Merged
justinjoy merged 2 commits into
mainfrom
fix-issue-326-query-max-rows
May 16, 2026
Merged

Expose fact query max_rows cap#327
justinjoy merged 2 commits into
mainfrom
fix-issue-326-query-max-rows

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

Summary

  • Add optional fact schema registration max_rows support through HTTP, client API, and wyctl.
  • Preserve the default 1000-row Datalog materialization cap while allowing explicit caps up to 1000000 rows.
  • Reject out-of-range caps and keep executor-side clamping as defense in depth.
  • Document max_rows behavior and add HTTP coverage for invalid caps, >1000 retrieval, request-limit truncation, and schema-cap truncation.

Closes #326

Review flow

  • Architect and critic analysis identified the remaining issue as the fixed 1000 query cap; HTTP retract/forget already exists on main.
  • Implementer produced atomic commit a95e5f9.
  • Reviewer found unbounded max_rows risk.
  • Follow-up commit 8015301 added the 1000000 server cap, policy validation, executor clamp, and cap tests.
  • Final reviewer reported no findings.

Test

  • git diff --check
  • meson test -C builddir-facts daemon-http-facts --print-errorlogs
  • meson test -C builddir-facts policy-store --print-errorlogs
  • meson test -C builddir --print-errorlogs --suite wyrelog

Notes

  • A full fact-enabled suite also surfaced existing unrelated local failures in fact-replay and fact-store; the changed HTTP/policy tests above pass, and the default CI-style suite passes locally.

@justinjoy justinjoy merged commit e6b0886 into main May 16, 2026
3 checks passed
@justinjoy justinjoy deleted the fix-issue-326-query-max-rows branch May 16, 2026 14:46
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.

Document 1M fact benchmark results for Homebrew HEAD build

1 participant