Documentation / @etherfold/processor-entities / ENTITY_SNAPSHOT_FORMAT
Variable: ENTITY_SNAPSHOT_FORMAT ​
constENTITY_SNAPSHOT_FORMAT:2=2
Defined in: packages/state-store/dist/snapshot-document.d.ts:99
The on-the-wire version of the ENTITY snapshot document.
Named for its envelope because it was not always the only format number a snapshot carried in this repo: the free-form path's blob envelope had its own (BLOB_SNAPSHOT_FORMAT, @etherfold/core) and a reader could hold both at once, so they were separate constants with separate names rather than one number a change to either would falsely invalidate the other. That envelope is deleted with its path (ADR-0037) and this is the only one left; the NAME stays, because a bare SNAPSHOT_FORMAT would be the coin toss the split existed to prevent if a second artifact ever earns a number again.
Bumped when the SHAPE changes in a way an older reader would misread. An unknown format is refused (SnapshotFormatError) rather than parsed for the fields that happen to be recognisable, because a snapshot half-understood is state a client would accept and act on (ADR-0040).
2: rows at a floor, then per-block changes, columnar, newline-delimited, gzipped ​
Format 1 was a JSON object of Mutation upserts at one block. It was never published, so it was REPLACED rather than kept beside this one (ADR-0095), and a format-1 document is refused like any other unknown format: it is plain JSON, so the reader takes it for an already-inflated body, and its head is not format 2.
It did NOT move when processor stopped being a declared version hash ​
ADR-0086 changed where a processor label COMES FROM -- the identity the producing deployment's arrival derived, rather than a hash of a field its author wrote -- and that is a VALUE change, not a FORMAT change. processor is the same field, saying the same thing (WHICH FOLD computed these rows), and it is opaque on both sides, compared for EQUALITY and never parsed, so a label derived the old way is simply not this client's fold: NOT A CANDIDATE (processor-mismatch), or SnapshotProcessorMismatchError at install. A bump would have converted that precise refusal into unreadable-format, which tells a user their app or the publisher is out of date when the truth is that the snapshot is for another processor. Bump this when a FIELD appears, disappears or changes meaning, as format 2 did.