ceramicnetwork / ceramicnetwork/rust-ceramic
BUG: Events from model instances are not returned in chronological order
- Dominant language
- Rust
- Stars
- 51
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When querying events from a specific model instance via:
`/experimental/events/model/{modelStreamId}`
the events are returned lexicographically by event ID, not by creation time. This makes it difficult to reliably fetch the most recent events using resumeOffset, as the latest event may appear in the middle of the response instead of at the end.
**To Reproduce**
Steps to reproduce the behavior:
1. Query events from a model instance using /experimental/events/model/{modelStreamId}.
2. Observe the list of events returned.
3. Add a new event to the model instance.
4. Query the events again and notice that the newly added event is not necessarily the last item in the response.
**Expected behavior**
Events should be returned in chronological order, with the most recent events at the end. resumeOffset should correctly fetch only the newest events.
**Screenshots**
**Ceramic versions**
0.58.0
**Machine, OS, browser information (please complete the following information):**
Machine: Macbook Air M1 2020
OS: Tahoe 26.0.1 (25A362)
Browser: Firefox Developer Edition 147.0b1
Contributor guide
Assessment
This issue has not been assessed yet.