Skip to content

fix: CREATE OR REPLACE PAGE reuses existing UUID#72

Merged
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/create-or-replace-uuid
Apr 1, 2026
Merged

fix: CREATE OR REPLACE PAGE reuses existing UUID#72
ako merged 1 commit intomendixlabs:mainfrom
engalar:fix/create-or-replace-uuid

Conversation

@engalar
Copy link
Copy Markdown
Contributor

@engalar engalar commented Apr 1, 2026

Summary

  • CREATE OR REPLACE PAGE now preserves the existing page UUID instead of generating a new one
  • Avoids git delete+add churn in MPR v2 projects (mxunit files)

Test plan

  • go build passes
  • Verify in Studio Pro that replaced pages retain references

🤖 Generated with Claude Code

When a page already exists, UpdatePage now preserves the original UUID
instead of generating a new one, avoiding git delete+add churn.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

AI Code Review

Moderate Issues

Incomplete test verification

  • The test plan shows [ ] Verify in Studio Pro that replaced pages retain references is not checked off
  • According to the checklist, integration paths should be tested, not just helpers
  • This fix specifically addresses MPR v2 git churn and Studio Pro compatibility, so Studio Pro verification is critical

What Looks Good

Correct logic implementation

  • Properly distinguishes between CREATE (no existing pages) and REPLACE (existing pages found)
  • When replacing: reuses first existing page's UUID, updates it, deletes additional duplicates
  • When creating: generates new UUID as expected
  • Clear comment explaining the motivation (avoiding git delete+add churn that crashes Studio Pro RevStatusCache)

Scope appropriateness

  • Single-focused change addressing only the CREATE OR REPLACE PAGE UUID preservation issue
  • No unrelated modifications mixed in
  • Follows the principle of atomic commits

Code quality

  • Clean, readable implementation
  • Proper error handling with contextual messages
  • Consistent with existing executor patterns

Recommendation

Approve the PR, but require completion of the Studio Pro verification test before merging. The fix appears correct and addresses the stated problem of git churn in MPR v2 projects, but the integration testing with Studio Pro (which is the ultimate validation for this fix) is incomplete per the test plan.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

Copy link
Copy Markdown
Collaborator

@ako ako left a comment

Choose a reason for hiding this comment

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

Review

Clean, well-scoped PR — single file, single concern, good commit message. This is the UUID reuse change that was correctly split out of PR #66.

Logic looks correct

The branching is sound:

  • Existing page(s): reuse first page's UUID via UpdatePage, delete any additional duplicates
  • New page: create normally

This preserves referential integrity (other documents pointing to the page UUID keep working) and avoids git delete+add churn in MPR v2.

One concern: comment mentions RevStatusCache crash

// Reuse first existing page's UUID to avoid git delete+add (which crashes Studio Pro RevStatusCache)

The PR description says "Avoids git delete+add churn" but the comment says it "crashes Studio Pro RevStatusCache." If this is a known Studio Pro crash, it's worth mentioning in the PR description — it changes the severity from "nice to have" to "bug fix." If it's speculative, the comment should be toned down.

Minor

  • The pagesToDelete[0] assignment assumes the first match is the canonical one. If duplicates exist with different content, the choice is arbitrary — but this is an edge case and the old behavior (delete all, create new) was no better.
  • Test plan has [ ] Verify in Studio Pro that replaced pages retain references unchecked — same note as PR #71, would be good to confirm before merge.

Looks good.

@ako ako merged commit 550e338 into mendixlabs:main Apr 1, 2026
2 checks passed
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.

2 participants