fix: CREATE OR REPLACE PAGE reuses existing UUID#72
Conversation
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>
AI Code ReviewModerate IssuesIncomplete test verification
What Looks GoodCorrect logic implementation
Scope appropriateness
Code quality
RecommendationApprove 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 |
ako
left a comment
There was a problem hiding this comment.
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 referencesunchecked — same note as PR #71, would be good to confirm before merge.
Looks good.
Summary
CREATE OR REPLACE PAGEnow preserves the existing page UUID instead of generating a new oneTest plan
go buildpasses🤖 Generated with Claude Code