Skip to content

BUG: Events from model instances are not returned in chronological order #751

@eloramirez1356

Description

@eloramirez1356

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

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions