Stable host-side project identity (the note id). The editor keys its doc:open idempotency guard on THIS, not on (projectName, mainFile): those collide trivially (two "Untitled" projects, both main.tex) and a guard keyed on them would mistake a real switch for a re-send — keeping the old buffers mounted while the host believes the new project is open, so a save writes the wrong project's content. The id is unambiguous.
The document/project payload the host mounts into the editor.