Preview safety

Branches and safe preview worktrees

Preview branches let a user test source/data mutations in isolated worktrees while preserving the same URL shape, graph identity, and Inspector surfaces. The switchboard is a system capability (hypermake branches list works here); this corpus does not yet stage a live preview toggle — the diagram below describes the promoted routing model.

Same URL, selected backend

The browser sees one dev origin; Hypermake routes the session to the chosen worktree backend.

Browser URLsite.localhost/page Switchboardsession route main worktree preview worktree

Preview lifecycle

StepStateUser choice
CreateNew worktree backend and graph roots.Open preview or keep main.
EditMutations apply to preview source/data only.Commit more changes or discard.
ValidateTesting digest and diagnostics run against preview graph.Promote if green.
PromoteChanges move back to main through normal git/graph flow.Review and commit.