Related test issue
Discovered while implementing #609 — tiered event-store coverage.
Problem
TieredEventStore.StreamExists effectively requires a stream to exist in both the hot and archive stores. Streams that exist in only one tier are incorrectly reported as missing. Existence checks also fail to account for an archive exposed only through IEventReader, which the constructor accepts.
This makes the existence result inconsistent with readable data: an archived stream can still be read after hot-store deletion, yet StreamExists returns false.
Reproduction
- Create separate hot and archive
InMemoryEventStore instances.
- Append events to a stream in only the hot store.
- Construct
TieredEventStore(hot, archive) and call StreamExists for that stream.
- Repeat with events in only the archive store.
Actual: both single-tier cases return false.
Expected: a stream exists if either tier contains it.
| Hot tier |
Archive tier |
Expected result |
| Missing |
Missing |
false |
| Present |
Missing |
true |
| Missing |
Present |
true |
| Present |
Present |
true |
Fix and acceptance criteria
Existing regression tests and implementation
TieredEventStoreTests.cs in src/Core/test/Eventuous.Tests.Application reproduced five failing cases before the fix:
- Hot-only stream existence.
- Archive-only stream existence.
- An existing stream in an archive exposed only as
IEventReader.
- An empty existing stream in a read-only archive.
- Existence after deleting the hot copy while retaining the archive copy.
Additional tests cover archive failures, cancellation, an unavailable archive when the hot stream exists, bounded reads across tiers, and hot-only mutations.
An implementation is already committed locally on fix/issue-609-tiered-store, commit 1639f36c. All 36 tests in the application test project pass on .NET 10, including 15 tiered-store cases. The branch has not been published or merged as part of this work.
Related test issue
Discovered while implementing #609 — tiered event-store coverage.
Problem
TieredEventStore.StreamExistseffectively requires a stream to exist in both the hot and archive stores. Streams that exist in only one tier are incorrectly reported as missing. Existence checks also fail to account for an archive exposed only throughIEventReader, which the constructor accepts.This makes the existence result inconsistent with readable data: an archived stream can still be read after hot-store deletion, yet
StreamExistsreturnsfalse.Reproduction
InMemoryEventStoreinstances.TieredEventStore(hot, archive)and callStreamExistsfor that stream.Actual: both single-tier cases return
false.Expected: a stream exists if either tier contains it.
falsetruetruetrueFix and acceptance criteria
truewhen the hot store contains the stream, without requiring an archive lookup.IEventStore.IEventReader, establish existence with a bounded read according to that interface's missing-stream contract.StreamNotFoundrepresents absence.false.Existing regression tests and implementation
TieredEventStoreTests.csinsrc/Core/test/Eventuous.Tests.Applicationreproduced five failing cases before the fix:IEventReader.Additional tests cover archive failures, cancellation, an unavailable archive when the hot stream exists, bounded reads across tiers, and hot-only mutations.
An implementation is already committed locally on
fix/issue-609-tiered-store, commit1639f36c. All 36 tests in the application test project pass on .NET 10, including 15 tiered-store cases. The branch has not been published or merged as part of this work.