Skip to main content

a_live_read_stream_does_not_block_an_append

Function a_live_read_stream_does_not_block_an_append 

pub async fn a_live_read_stream_does_not_block_an_append<F: Fixture>(
    open: impl AsyncFn() -> F,
) -> RuleOutcome
Expand description

A read stream that is still alive does not block an append.

ES-36’s read/write pairing. The stream is built and not drained, an append is made through the same handle, and the stream is drained afterwards.

It rejects a store whose read hands back a stream holding a borrow of the store — a rusqlite adapter yielding rows from a live statement, an Rc-shared cursor, or BorrowHoldingStore, which is that shape in twenty lines. RPITIT lets an implementer return exactly that, so the port cannot forbid it and only a rule will catch it.

The rule deliberately stops short of ES-11’s snapshot claim. It asserts that the pre-existing event is still yielded — which is what makes it non-vacuous, since a store returning nothing would otherwise satisfy a rule about a stream surviving — and says nothing about whether the new event appears. read_result_is_stable_under_concurrent_append is where that belongs, and it is ES-11’s, which is still provisional.