As-Of / Bi-Temporal Correctness Benchmark
mempill ships a reproducible, assertion-based benchmark of its as-of query correctness on both independent bi-temporal axes — valid-time and transaction-time — including the valid-time succession scenario described in Valid-Time Succession.
Reproducing the results
Section titled “Reproducing the results”cargo run --release --example asof_correctness_benchmark -p mempill- Artifact:
mempill-facade/examples/asof_correctness_benchmark.rs - Data: none external — every claim ingested by the benchmark is constructed inline with fixed, deterministic RFC 3339 timestamps. No network access, no proprietary fixtures, no environment-specific configuration.
- Backend: in-memory SQLite (
mempill::open_default_in_memory()) — the same public API surface a first-time integrator uses.
A third party can clone the public mempill repository and run the command above to reproduce identical PASS/FAIL results.
Results
Section titled “Results”Run against mempill 0.4.0, in-memory SQLite, release build:
mempill as-of / bi-temporal correctness benchmark===================================================
[PASS] valid_time::point_in_time_recall[PASS] valid_time::gap_returns_no_belief[PASS] tx_time::independent_of_valid_time[PASS] combined::valid_time_and_tx_time[PASS] succession::three_way_chain[PASS] contested::genuine_conflict_not_silently_resolved[PASS] point_claim::documented_no_belief_at_instant
===================================================Result: 7/7 scenarios passed| Scenario | Axis | What it demonstrates |
|---|---|---|
valid_time::point_in_time_recall |
valid-time | Point-in-time recall correctly selects the right value across a 3-claim history at three distinct query instants |
valid_time::gap_returns_no_belief |
valid-time | A query instant in the gap between two non-overlapping windows returns no belief, not a false contested or resolved result |
tx_time::independent_of_valid_time |
tx-time | “What did we believe as of tx-time T?” correctly excludes a claim learned after T, independent of that claim’s valid-time window |
combined::valid_time_and_tx_time |
both | The two axes compose correctly when both are set on the same query — the valid-time axis governs claim selection without being overridden by tx-time visibility |
succession::three_way_chain |
valid-time (succession) | A 3-window non-overlapping succession chain selects the correct claim at 5 distinct query instants, including exact boundary instants (start-inclusive/end-exclusive) |
contested::genuine_conflict_not_silently_resolved |
valid-time (conflict) | Two trusted, overlapping windows surface as Contested with both candidates exposed — the honest counter-case to succession |
point_claim::documented_no_belief_at_instant |
valid-time (edge case) | A zero-duration point claim queried at its own instant returns NoBelief, matching mempill’s documented half-open [start, end) interval semantics |
What these results affirmatively demonstrate
Section titled “What these results affirmatively demonstrate”- mempill’s as-of queries correctly separate two independent time axes: what was true in the world (valid-time) and what the system had learned by a given moment (transaction-time). Setting one axis does not corrupt or override the other.
- A chronological chain of non-overlapping facts (a succession) is resolved to a single correct value at any queried instant, including exact boundary instants, without producing a false conflict.
- A genuine conflict — two trusted claims that actually overlap in time — is surfaced
explicitly as
Contested, with both candidates visible, rather than silently guessed at or averaged away. - Every one of the above is reproducible from a single public command against the published crate, with no external data or environment-specific setup.
Related concepts
Section titled “Related concepts”- Valid-Time Succession — how the succession scenario is resolved
- Contested & Dispositions — the full 12-state
disposition model, including
Contested - Bi-Temporal Claim Store — the two independent time axes
- Changelog — 0.4.0 release notes (unreleased)