Skip to content

durable: an older journal's misplaced settle clock read can arm a replayed timer at the wrong instant #262

Closed as not planned

Description

@reka18

A journal an older version wrote (format 1 or earlier) can put a service settle's clock read in the next Record instead of the settle's own, because that version's RunService didn't drain the clock into its Record. Replay takes readings in order, so when such a read is missing (the process restarted after the settle) or sits in front of a later step's own reads, a replayed timer can be armed at the wrong instant. The recovered instance can then fire a timer early, or end in a different state from the live run.

This version (journal format 2) records a settle's read in its own Record, so only older journals are affected. It happens on main too.

Tests that pin it, skipped in #236 with this issue's number:

  • TestRecover_OlderJournal_TickPassesAnEarlierSettleRead
  • TestRecover_OlderJournal_SettleSkipsAnUnusedRead
  • TestRecover_OlderJournal_TailEndingOnASettle_CarriesItsRead
  • TestRecover_OlderJournal_FireArmsFromItsOwnRead

An earlier version of #236 aligned each Record from its end, on the rule that a step's own reads come last. Since #234, an actor-driven parent Fire can arm timers and add reads after the step's own, so that rule no longer holds in every Record. A fix needs either a rule that survives actor-driven arms or a format gate that limits the repair to Records that can't hold them.

Relates to: #214, #236

Activity

  1. reka18 commented on Nov 19, 2026

    @reka18
    ContributorAuthor

    Closed into #253, which tracks the compatibility items to decide before durable's first release. durable is unreleased, so this can't happen yet.

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