Skip to content

Conversation

@justschen
Copy link
Collaborator

fix #274084

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the checkpoint navigation logic where navigating to a checkpoint was incorrectly setting the current epoch to one past the target checkpoint's epoch, causing the checkpoint to not be applied.

Key change:

  • Corrected the epoch calculation in navigateToCheckpoint to align with the system's invariant that _currentEpoch equal to a checkpoint's epoch means the checkpoint is applied.

throw new Error(`Checkpoint ${checkpointId} not found`);
}

return this._navigateToEpoch(targetCheckpoint.epoch + 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should have been good as-is. Having _currentEpoch === thing.epoch means 'thing' hasn't happened yet.

@justschen justschen closed this Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restoring checkpoint does not delete last message, shows broken button

2 participants