Skip to content

Comments

Fix rank merges on delta vibe#582

Merged
MarcelGeo merged 5 commits intodev-r85-v2-pullfrom
fix-rank-merges-on-delta-vibe
Feb 20, 2026
Merged

Fix rank merges on delta vibe#582
MarcelGeo merged 5 commits intodev-r85-v2-pullfrom
fix-rank-merges-on-delta-vibe

Conversation

@tomasMizera
Copy link
Collaborator

@tomasMizera tomasMizera commented Feb 20, 2026

Related to https://github.com/MerginMaps/server-private/issues/3221

  • added update action if delete create, this is handling all cases.

  • added improvment to rules for mergin to fix edge cases when global checkpoints are merging together

  • we just added UPDATE action when DELETE + CREATE

@tomasMizera tomasMizera changed the base branch from master to dev-r85-v2-pull February 20, 2026 09:53
- previous fix of AI was bad beacuse it added all changes to database (delta file)
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 addresses incorrect delta results when merging cached delta checkpoints across rank/chunk boundaries, particularly around delete+create/recreate edge cases (“rank merges on delta vibe”). It adjusts change-merge rules to preserve correct client outcomes and adds regression coverage for the cross-checkpoint scenarios.

Changes:

  • Updates ProjectVersionDelta.merge_changes/_compare_changes to better handle CREATE/DELETE/CREATE sequences across checkpoints (including introducing a “force update” path).
  • Adds regression tests for cross-checkpoint create→delete→recreate and recreate→delete scenarios.
  • Updates existing delta-change expectations where delete+create sequences should be represented as UPDATE rather than CREATE.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
server/mergin/sync/models.py Adjusts delta merge comparison rules and introduces a FORCE_UPDATE action to avoid losing delete+create semantics across checkpoints.
server/mergin/tests/test_public_api_v2.py Adds cross-checkpoint regression tests and updates expected delta change types for delete+create behavior.
Comments suppressed due to low confidence (1)

server/mergin/tests/test_public_api_v2.py:35

  • This file now imports from .utils twice (with overlapping names) and the PR adds another symbol to the second block. Consider consolidating into a single .utils import to avoid duplicate/overlapping imports (which can also hide unused-import issues).
from .utils import (
    add_user,
    create_blank_version,
    create_project,
    create_workspace,
    diffs_are_equal,
    execute_query,
    login_as_admin,
    push_change,
)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 22226588552

Details

  • 57 of 57 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 94.614%

Totals Coverage Status
Change from base Build 21514078503: 0.03%
Covered Lines: 8872
Relevant Lines: 9377

💛 - Coveralls

MarcelGeo and others added 3 commits February 20, 2026 15:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MarcelGeo MarcelGeo requested a review from varmar05 February 20, 2026 14:17
@MarcelGeo MarcelGeo merged commit 6f81f79 into dev-r85-v2-pull Feb 20, 2026
4 checks passed
@MarcelGeo MarcelGeo deleted the fix-rank-merges-on-delta-vibe branch February 20, 2026 14:21
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.

4 participants