Repository navigation
test(engine): recursive acceptance at 5M derived facts and envelope recursive shape (#548) - #671
Merged
Merged
Conversation
…sive shape (#548) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 20, 2026
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.
Part 6 of the streaming engine (#473), #548 PR 3 of 3: acceptance and measurement (plan steps 16–19, spec §7). No code change to the library.
Acceptance test
tests/recursive_acceptance_test.rs(#[ignore]d, one test so the process's RSS high-water mark is the query's own): a layered graph, 63 layers of 50 nodes with complete bipartite edges between neighbours (155,000 facts);reachderives 4,882,500 facts in 62 rounds./proc/self/clear_refs= 5) just before the query, and its peak must stay under 256 bytes per derived fact. Measured on a laptop: 226 s, 169 B/fact (178 → 966 MiB).max_derived_facts(1M), the same rule fails withINT-020.smoke.yml(45 min timeout). Note: scheduled runs usemain's copy of the workflow, so like the existing size-per-fact step this job runs onworkflow_dispatchagainstv3untilv3becomesmain.Envelope
recursiveshape[:find ?x ?b :where (boss ?x ?b)], the whole transitive closure of:managerwith no constant (no magic sets). The envelope now opens withmax_derived_facts(usize::MAX)(only rule queries are affected).A/B on an idle server,
v3before #670 (84ac845, rule queries on the executor, with the new shape) vs this branch, in parallel on different sockets, swapped for round 2; rounds agree within 2%:recursive_ancestorsp50, executor → enginerecursive_ancestorspeak RSSrecursivep50recursivepeak RSS#379 point queries: bimodal per process on that server (~20 µs or ~50 µs at 1M) in both builds; six fresh processes per shape per build gave the same medians within 7 µs. No regression.
Observation (not addressed here)
The 5M test spends its time in ~250M candidate derivations (each
reachfact is reached through 50 middle nodes): per-row entity probes decoding a leaf, and SipHash on the identity set. It is a cost of the plan, not memory; a possible follow-up.Docs
CHANGELOG.md(#548 entry measured at all scales, Tests entry),docs/BENCHMARKS.md(new #548 section, supported-workloads row; the "rule queries not interactive past 100K" limitation removed), counts 1702 (1691 passing, 11 ignored). No docs-site change (measurements only). Codex review: one finding (VmHWM lifetime high-water mark could hide the query's peak), fixed in 93e3746.Part of #548 (closed by hand after merge) and #473.
🤖 Generated with Claude Code
https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT