Restore does not copy bytes behind the editor's back. The selected snapshot is loaded, validated against the active schema, and written through the same lock → validate → atomic-write pipeline as an ordinary save.
It also requires the current revision you were shown. If the file changed since, the restore is rejected with a conflict instead of overwriting a newer edit.
Before any of that, the UI computes a structural diff between the snapshot and the current document — key-by-key, not text-line-by-line — so reordering or formatting noise does not masquerade as a change.
Nothing is touched until you confirm the restore. The confirmation flow restores focus on cancel and supports Escape.
FIRST SAVE
A brand-new config has no prior content, so there is nothing to snapshot. A stub file is touched only to satisfy the advisory lock; the real write still runs through validation and atomic replacement.