Branches, PRs & merges
Cloudrizz is versioned like real software. Changes are committed to feature branches, previewed in isolation, and merged into main through a pull request an org admin reviews. Disjoint changes auto-merge; same-file conflicts are handed to the assistant to resolve — but a human approves what ships.
Why main is protected
You can't commit straight to main — save_version and edit_file refuse it. Work goes on a feature branch and reaches main only via a merged pull request. This keeps production deployable and gives every change a review point.
The flow
- Commit to a feature branch — just pick a branch name when calling
save_version/edit_fileand it's auto-created frommain. (manage_branch(action: create) only when forking from a non-HEAD commit.) deploy_appon the branch to get a live preview URL, backed by your personal throwaway sandbox so it can't touch production data.manage_pull_request(action: open) with a clear title and description. One open PR per branch.- An app admin reviews and merges — via the dashboard or
merge_pull_request. If the target hasn't moved the merge fast-forwards; if it advanced but the two branches touched different files, Cloudrizz merges them automatically. Only when the same file changed on both sides do you resolve a conflict (below).
When the same file changed on both sides
If main moved on while your branch was open and you both edited the same file, merge_pull_request doesn't fail — it returns a conflict (with merged: false) listing each clashing file with three versions: the common base, the current main, and your branch. Cloudrizz never auto-resolves with AI — you reconcile each file. The loop:
- Read the
base/main/branchcontents in the conflict and write the reconciled version back to your source branch withsave_version/edit_file. - Call
merge_pull_requestagain withresolvedAgainstTargetHeadset to thetargetHeadfrom the conflict — that tells Cloudrizz you've reconciled against that exact state ofmain. - If
mainmoved again in the meantime you simply get a fresh conflict (or a 409) — nothing is merged or lost; re-resolve against the newtargetHead.
manage_pull_request (action: get) returns canFastForward — false means main has diverged and the branch needs a rebase before it can merge cleanly. The dashboard PR view shows the same.Managing the PR queue
manage_pull_request(action: list/get/close) — list open PRs, inspect one (with itscanFastForwardmerge status), or close one without merging.merge_pull_request— the real merge. Disjoint changes auto-merge; for same-file conflicts it hands you each file's base/main/branch versions to reconcile. Cloudrizz never AI-generates a merged result.
Previews & cleanup
Each branch (and each per-user preview) gets its own preview instance and playground sandbox. Merging a PR can tear the branch down for you, and manage_branch (action: delete) removes one on demand (its commits stay on main); abandoned previews are also cleaned up automatically after a period of inactivity. Reset your preview data anytime with reset_playground.
main requires admin on the app — an org owner/admin, or a member with a per-app admin grant. See the tool reference for which tools mutate.