fix(checkpoints): preserve cumulative transforms across repeated saves#225
Open
nodesagar wants to merge 1 commit intoc2siorg:mainfrom
Open
fix(checkpoints): preserve cumulative transforms across repeated saves#225nodesagar wants to merge 1 commit intoc2siorg:mainfrom
nodesagar wants to merge 1 commit intoc2siorg:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a checkpoint/history regression where a later save could silently discard transforms that were already included in an earlier checkpoint.
Before this patch,
POST /projects/{project_id}/saverebuilt project state from the original CSV plus only the unapplied change-log entries. In a flow likerenameCol -> save -> addCol -> save, the second save dropped the earlier rename because only the pendingaddCollog was replayed.This patch makes checkpoint creation preserve the current working copy as the source of truth and only use save to mark pending logs as applied.
Closes #224.
What changed
save_project()to read the current working copy instead of rebuilding from only the unapplied log tailassertin the save path with an explicit 500 error if the working copy path is misconfiguredValidation
ruff check .ruff format --check .pytest tests/test_save_revert.py -qpytest -q -k 'not test_add_column_without_name_returns_422'npm run lintnpm run test -- --run['name', 'years', 'city', 'country']['name', 'years', 'city', 'country']Note on baseline
maincurrently has one unrelated backend test failure intests/test_new_features.py::TestAddDeleteColumnEndpoint::test_add_column_without_name_returns_422, which belongs to the separate addCol validation bug fixed in PR #221. Excluding that known baseline failure, the remaining backend suite passed locally on this branch.