% New-edit acceptance only; restoration has a separate sequence panel. \begin{tikzpicture}[txGuard/.style={font=\footnotesize,fill=none,inner sep=2pt}] \node[initial] (start) {}; \node[plannedActivity,below=0.3cm of start] (request) {Controller requests a supported new edit}; \node[plannedActivity,below=0.35cm of request] (geometry) {Shape provider prepares interpreted geometry; host checks support and constraints}; \node[plannedActivity,below=0.35cm of geometry] (plan) {Host/syntax route prepares original-source byte edits; source remains unchanged}; \node[choice,below=0.4cm of plan] (changed) {Preparation outcome?}; \node[plannedActivity,text width=3.2cm] (noChange) at ([xshift=-7.1cm]changed.center) {Unchanged or cancelled: no error; preserve redo and source}; \node[final,below=0.3cm of noChange] (noEnd) {}; \node[plannedActivity,text width=3.2cm] (cannot) at ([xshift=7.1cm]changed.center) {Cannot prepare: preserve source/history; report one reason}; \node[final,below=0.3cm of cannot] (cannotEnd) {}; \node[plannedActivity,below=0.4cm of changed] (prepare) {Document validates guards and prepares candidate source plus exact history entry}; \node[choice,below=0.4cm of prepare] (ready) {All preparation succeeds?}; \node[plannedActivity,text width=3.2cm] (reject) at ([xshift=-7.1cm]ready.center) {Rejected: preserve source/history; report one reason}; \node[final,below=0.3cm of reject] (rejectEnd) {}; \node[plannedActivity,below=0.4cm of ready] (commit) {Publish source and history together; advance revision; notify once}; \node[plannedActivity,below=0.35cm of commit] (refresh) {Refresh from accepted source; future compiled view becomes stale}; \node[final,below=0.35cm of refresh] (end) {}; \draw[flow] (start)--(request); \draw[flow] (request)--(geometry); \draw[flow] (geometry)--(plan); \draw[flow] (plan)--(changed); \draw[flow] (changed.west)--node[txGuard,above,align=center]{[unchanged /\\cancelled]}(noChange.east); \draw[flow] (noChange)--(noEnd); \draw[flow] (changed.east)--node[txGuard,above]{[cannot prepare]}(cannot.west); \draw[flow] (cannot)--(cannotEnd); \draw[flow] (changed)--node[txGuard,right]{[prepared change]}(prepare); \draw[flow] (prepare)--(ready); \draw[flow] (ready.west)--node[txGuard,above]{[no]}(reject.east); \draw[flow] (reject)--(rejectEnd); \draw[flow] (ready)--node[txGuard,right]{[yes]}(commit); \draw[flow] (commit)--(refresh); \draw[flow] (refresh)--(end); \node[font=\footnotesize,align=center,text width=12cm,anchor=north] at ([yshift=-0.4cm,xshift=-1.4cm]end.south) { Future compilation belongs to successful Save, outside this activity.\\ Compiler failure reports diagnostics without reversing accepted source/history.}; \end{tikzpicture}