Expand description
The provisional layer: one node’s discovered neighborhood, shown to the user
but not yet adopted into the committed Graph.
Discovery is asynchronous, so a preview can be superseded before its data
arrives. Every preview therefore carries a monotonic generation, and
fill refuses anything but the live one — a late arrival can never
repopulate a layer the user has already moved on from. This guard is
independent of (and holds even without) the AbortSignal the host fetcher
receives.
Pure: no I/O, no wasm, no geometry. Positions for provisional nodes are the caller’s business.
The generation is deliberately write-only from the outside: there is no
accessor for it. begin hands the caller a token; fill only accepts
that exact token back. A getter would let a caller “refresh” the token by
reading it right before calling fill, which launders away the guard
this type exists to provide.