Skip to content

durable: StateAt returns a later checkpoint's state for a compacted step, with no error #275

Closed as not planned

Description

@reka18

What happens

On a Store that doesn't implement HistoryStore, StateAt loads the latest checkpoint as its baseline. A request for a step before that checkpoint passes the range check, replays no Records, and returns the checkpoint's state, which is later than the step asked for, with a nil error. A time-travel read gives the wrong answer and doesn't say so.

This has applied to instances driven by Fire since checkpoints were added. #237 makes it reachable for timer-driven instances too: their tick barriers used to step over the checkpoint interval, so they never compacted. #237's changelog discloses the behavior.

Possible fix

The checkpoint envelope already carries NextStep. StateAt could return ErrStepOutOfRange for a step below the loaded baseline's step when the Store has no HistoryStore, so a caller learns the step was compacted away. Steps could report the same lower bound.

This changes StateAt's behavior, so it needs a decision.

Relates to: #237

Activity

  1. reka18 commented on Nov 19, 2026

    @reka18
    ContributorAuthor

    Closing for now: this came out of a review, not a failure anyone has hit. Reopen it if it turns up in practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions