Skip to main content

Module rules

Module rules 

Expand description

The conformance rules. See the crate documentation for the map of what each group covers.

Functions§

a_live_read_stream_does_not_block_an_append
A read stream that is still alive does not block an append.
acknowledged_writes_survive_a_reopen
An append acknowledged with Ok is still there after a reopen.
append_is_atomic
A batch lands entirely or not at all.
append_is_atomic_under_a_mid_batch_fault
A batch interrupted by a fault part way through lands whole or not at all.
append_preserves_an_empty_payload
A zero-length payload round-trips as a zero-length payload.
append_preserves_event_payload
Payload, tags and metadata survive the round trip unchanged.
append_preserves_event_type_and_tags_byte_for_byte
An event type and a tag survive the round trip byte for byte, whitespace included.
append_rejects_empty_batch
An empty batch is refused.
append_reports_exceeded_store_limits
A store that refuses an over-capacity append reports it as AppendError::ExceedsStoreLimit, and never by truncating.
append_returns_last_written_position
append returns the position of the last event written.
append_stamps_a_local_event_id
VT-5 — a locally appended event’s EventId is this store’s incarnation paired with the position this store just assigned.
append_stamps_a_recorded_time
VT-9 — the store stamps a time at append, and reports that same value on every read of that event.
append_stamps_identity_and_time
VT-4 — the four facts on a SequencedEvent are persisted, not produced by the read that returned them.
appending_equal_events_yields_two_events
VT-2 — structural equality is not identity.
arming_a_mid_batch_fault_makes_the_append_fail
A fixture that declares MID_BATCH_FAULT supported must arm a fault the store cannot absorb, so the append returns Err.
arming_a_read_fault_makes_the_stream_yield_an_error
A fixture that declares READ_FAULT supported must arm a fault the store surfaces as an Err item, not as the end of the stream.
batch_is_not_evaluated_against_its_own_condition
A condition is evaluated only against events the store already held.
batch_positions_follow_slice_order
Positions within one batch are assigned in slice order, strictly ascending.
condition_after_beyond_head_admits_the_append
A condition whose after is beyond the store’s head admits the append.
condition_after_beyond_the_last_matching_position_admits_the_append
after past the last matching position admits the append, even while later non-matching events exist.
condition_after_ignores_events_at_the_boundary
after is exclusive: an event exactly at the boundary was already seen by the caller and must not reject the append.
condition_after_ignores_non_matching_events
Non-matching events beyond the boundary are irrelevant.
condition_after_rejects_events_beyond_the_boundary
A matching event beyond the boundary rejects the append.
condition_against_an_empty_store_admits_the_append
A condition evaluated against an empty store admits the append.
condition_guards_carry_independent_boundaries
Each guard of an AppendCondition is evaluated against its own boundary.
condition_matches_on_every_tag_in_an_item
An event carrying only SOME of a condition item’s tags does not match it, so the append stands.
condition_matches_on_tags
A condition’s verdict depends on tags, not on types alone.
condition_matching_every_tag_rejects_the_append
An event carrying ALL of a condition item’s tags does match it, so the append is refused.
condition_over_removed_history_does_not_reject
ES-40 (ADR-0028, decision 2): a condition whose only matching event was removed outside the port admits the append, and a condition over an event the store still holds still refuses it.
condition_rejection_is_reported_as_condition_violated
The rejection is reported as the specification’s concurrency signal, not as an adapter-specific failure.
condition_rejection_leaves_store_unchanged
A rejected append changes nothing observable.
condition_with_an_unheld_tag_does_not_reject
The mirror: a condition carrying a tag no event holds must not reject, even when a stored event matches its types.
condition_with_one_guard_behaves_as_today
A one-guard condition is evaluated by the same rules as any other guard.
condition_without_after_allows_non_match
A condition that matches nothing lets the append through.
condition_without_after_rejects_any_match
Without after, any matching event rejects the append.
contains_event_id_reports_a_held_row_above_the_frontier
ES-41 (ADR-0095): contains_event_id answers whether the store holds an event, not whether a read would show it now.
contains_event_id_reports_membership
ES-41 (VT-7) — contains_event_id answers about an identity, not about a position.
dropped_append_future_leaves_no_partial_batch
Dropping an append future leaves the store fully applied or unchanged, never partially applied.
duplicate_items_do_not_duplicate_events
An event matching several items, or carrying several tags, is yielded once.
empty_batch_is_refused_before_the_condition_is_evaluated
An empty batch is refused before the condition is evaluated.
event_id_is_not_matchable_by_query
VT-7 — an EventId is outside the query language, and in particular it is not a Tag.
event_ids_are_unique_within_a_store
VT-5 and VT-8 — a store holds at most one event per EventId, and it is the store’s job to make that true rather than the caller’s.
head_advances_across_two_handles
A head read through one handle covers what another handle wrote.
head_is_the_highest_visible_position
head() covers the whole store, not the part some default query matches.
head_of_an_empty_store_is_none
A store holding nothing reports no head.
interleaved_appends_on_one_handle_elect_one_winner
Two append futures from one handle both complete, and exactly one wins.
limit_applies_across_items_not_per_item
limit is a budget for the whole result, not one per query item.
metadata_distinguishes_absent_from_empty
Absent metadata and present-but-empty metadata are two different values.
nothing_below_an_observed_position_appears_later
Nothing becomes visible below a position a reader has already observed.
positions_are_not_reused_after_removal
ES-38 (ADR-0028, decision 2): a store that has had events removed outside the port never hands a removed position out again, and its read(Query::all()) and head describe exactly the events it still holds.
positions_are_strictly_monotonic
Positions strictly increase. Gaps are permitted, so this checks ordering rather than density.
positions_are_unique
Positions are unique across the store.
query_all_matches_every_event
Query::all() matches every event in the store.
query_item_combines_types_and_tags_with_and
Within one item, the type constraint and the tag constraint combine with AND.
query_item_order_does_not_change_the_result_set
The order of a query’s items does not change what it selects.
query_item_rejects_partial_tag_overlap
Overlapping-but-incomplete tags must not match.
query_item_tags_are_and
Tags within one query item combine with AND.
query_item_tags_match_supersets
An event carrying extra tags still matches.
query_item_types_are_or
Types within one query item combine with OR.
query_items_are_or
Items within a query combine with OR.
query_items_share_one_snapshot
Every item of one Query is evaluated against the same sample.
query_matching_nothing_yields_empty
A query that matches nothing yields an empty stream rather than an error.
query_union_is_item_concatenation
The match set of concatenated items is the union of their match sets.
racing_conditional_appends_elect_one_winner
Two command handlers that decided from the same snapshot cannot both commit.
read_backwards_from_with_limit
The specification’s own worked example: N events at or before a position, newest first.
read_backwards_limit_applies_after_filtering
The same claim from the other end, because a store truncates the scan at whichever end it reads from.
read_backwards_reverses_order
ReadOptions::backwards reverses the order.
read_defaults_to_ascending_order
Reading is ascending by position unless asked otherwise.
read_from_a_gap_position
from is a range predicate over assigned positions, not a seek.
read_from_and_to_bound_a_closed_window
from and to together name a closed window, and nothing outside it is yielded.
read_from_composes_with_limit
Reading forwards from a cursor with a budget spends the budget.
read_from_composes_with_multi_item_query
Every read option composes with a multi-item query.
read_from_is_inclusive
ReadOptions::from includes the event at that position.
read_limit_applies_after_filtering
limit counts matches, not scanned rows.
read_limit_truncates
ReadOptions::limit truncates the result.
read_limit_zero_yields_nothing
limit(0) yields nothing.
read_result_is_stable_under_concurrent_append
One read is one sample: an append made after the stream has been polled does not appear in it.
read_to_composes_with_limit
A window and a budget on the same read, with the budget the smaller.
read_to_composes_with_multi_item_query
The upper bound composes with a multi-item query.
read_to_is_inclusive
ReadOptions::to includes the event at that position.
read_to_under_backwards_bounds_the_older_end
Under backwards, to bounds the older end.
reading_an_empty_store_yields_nothing
A store nobody has appended to reads as empty, and does not error.
recorded_time_survives_a_reopen
VT-9 — a reopen does not restamp an event’s recorded time.
reissued_batch_conditioned_on_other_events_lands_twice
A conditional append whose condition does not match its own events has no at-most-once property either.
reissued_conditional_batch_lands_once
A conditional append whose condition matches its own events is at-most-once under verbatim reissue.
reissued_unconditional_batch_lands_twice
An unconditional append has no at-most-once property: a reissue appends a second copy.
removal_outside_the_port_removes_exactly_the_named_events
CF-27 (ADR-0028): a fixture that declares REMOVAL removes exactly the events it is told to, from the store a caller already holds, and leaves every other event as it was.
reopened_store_does_not_reissue_an_event_id
VT-6 — reopening a store does not reissue an EventId.
store_accepts_a_max_length_identifier
An identifier at the documented maximum length survives, and still matches itself.
store_accepts_non_ascii_identifiers
Non-ASCII identifiers survive, and are not folded into each other.
store_accepts_the_guaranteed_minimum_batch_size
A batch at the guaranteed minimum size is accepted whole.
store_accepts_the_guaranteed_minimum_payload
A payload at the guaranteed minimum is accepted whole.
store_accepts_the_guaranteed_minimum_tag_count
An event carrying the guaranteed minimum number of tags keeps all of them.
store_accepts_the_guaranteed_minimum_tags_per_batch
A batch carrying the guaranteed minimum number of tags is accepted whole.
store_evaluates_a_query_at_the_guaranteed_minimum_item_count
A query at the guaranteed minimum item count is evaluated in full.
tags_differing_only_by_unicode_normalisation_are_distinct
Two tags that differ only by Unicode normal form are two tags.
tags_may_repeat_a_key
One key, two values, two tags — and both are queryable.
two_fixture_instances_observe_none_of_each_others_appends
Two fixture instances are two backing stores.
two_handles_observe_each_others_appends
Two handles onto one backing store see each other’s writes, on both the read side and the append-condition side.
untagged_events_match_query_all
An event carrying no tags at all is still yielded by Query::all().