Repository navigation
test: widen property tests to joins, negation, predicates and time travel (#386, v2.x backport) - #492
Merged
Merged
Conversation
…avel (#386, v2.x backport) Backport of the v3 property tests. tests/property_test.rs writes random histories (batched transacts, retracts, write transactions, checkpoints) and compares random queries (1-3 joined patterns, not/not-join, a comparison predicate, :as-of, :valid-at, :any-valid-time) with a reference evaluator, in memory and against a file before and after a reopen. A write or query error fails the test. The histories leave out the v2.x known issues: a second value of one entity and attribute in a transaction (#371, also covering #477), and an assertion of a triple that is already live (#435). Without either filter the test fails on v2.x within a few thousand cases. The nightly job drops from 8M to 1M cases. Refs #386 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 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.
Refs #386. v2.x backport of #491 (v3).
What
The same
tests/property_test.rsandtests/reference_model/mod.rsas #491: random histories (batched transacts, retracts, write transactions, checkpoints) with random queries (1–3 joined patterns,not/not-join, a comparison predicate,:as-of,:valid-at,:any-valid-time). Each query is compared with a reference evaluator, in memory and on a file before and after a reopen. A write or query error fails the test, including in the three existing properties.The only v2.x-specific code is
v2_safe, which filters each generated history.Known issues left out (#421)
Without either filter the test fails on v2.x within 3,000 cases. The v3 test has neither filter.
verify()is not used (v3 only). #406/#414 do not apply, since generated:findvariables are always bound.CI
The nightly
property_testjob drops from 8,000,000 to 1,000,000 cases: 1M in memory, 100k file-backed, and 1M of each one-pattern property.Merge note
When
mainis next merged intov3, keep v3'stests/property_test.rs,tests/reference_model/mod.rsand workflow matrix. v3's test has nov2_safefilter.🤖 Generated with Claude Code
https://claude.ai/code/session_012wXxZguv7PgKQjMMH4yJ5h