Skip to content

Fix checkpoints when mixed data changes cancel - #297

Open
dajiaohuang wants to merge 1 commit into
tinyplex:mainfrom
dajiaohuang:fix/checkpoint-mixed-cancellation
Open

Fix checkpoints when mixed data changes cancel#297
dajiaohuang wants to merge 1 commit into
tinyplex:mainfrom
dajiaohuang:fix/checkpoint-mixed-cancellation

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Fixes #296.

Preserve pending keyed-value changes when tabular changes cancel, and vice versa. Each checkpoint listener now checks that the other delta map is empty before restoring the previous checkpoint ID.

Adds two regression cases covering both cancellation directions, checkpoint IDs, listener notifications, undo, and redo. No public API or dependency changes.

How did you test this change?

  • Native compileForTest build passes, including export parity.
  • Standard checkpoint test file: 35 tests pass, 342 assertions.
  • Regression sensitivity: without the two guards, exactly the two new cases fail and the 33 existing cases pass.
  • Source-level Istanbul coverage of the checkpoint module: 100% statements, branches, functions, and lines. This is module coverage, not whole-repository coverage.
  • ESLint and Prettier for both changed files pass; git diff --check passes.
  • Expanded test/unit/core/other run: 754 pass, two middleware synchronization cases fail (expected A, received a). Both failures were reproduced after removing the checkpoint guards, verifying the source matched the base, and rebuilding. The guards were then restored and the native build and checkpoint tests rerun successfully. These are existing failures in this environment; their underlying cause is not diagnosed here.

Environment: Windows, Node.js v24.14.1.

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.

Checkpoints lose pending changes when the other data domain returns to its checkpoint state

1 participant