editing
These cases protect a client from merging an edit-mode reply wrongly: replacing, appending, and deleting statements by name, removing what root no longer reaches, and merging only the fenced part of a reply. They cover language.md section 7 and prompt.md section 6.4. Each case has input.oui (the current program), patch.oui (the reply), and the expected merged statements. Numbers 004 and 007 are not used.
| Case |
What it checks |
Spec |
| 001-replace-and-add |
The patch replaces root and a and adds c: b is kept, c is appended at the end, and the page shows A2, B, C. |
7 |
| 002-delete-and-gc |
b = null deletes b, c is removed because root no longer reaches it, and the state declaration $x is kept. |
7 |
| 003-state-delete |
$x = null deletes the state declaration, so the merged program has no $x default. |
7, 5.1 |
| 005-fenced-patch |
A reply of prose around an openui fence: only the fenced statement is merged, and the prose is ignored. |
7, 1.2 |
| 006-no-root-statement-no-gc |
With no root statement nothing is removed: x is replaced and kept, page renders as the fallback entry with a non-fatal no-root, and x is an orphan. |
7, 2.2 |