Language

Publish snapshots and the visibility watermark

A snapshot pins a set of immutable pointers, including the theme version, so a rollback always moves the whole site together; content is immediate and configuration publishes explicitly, with 200 recovery points kept by default.

Every publish leaves a snapshot. It is often misread as "the version visitors see" — it is not. Visitors always see the currently effective content; the snapshot exists so you can return to a known state.

What a snapshot pins

A snapshot pins a set of pointers: the content visibility watermark, the category-tree version, the category-association version, the language-list version, the site-copy version, the theme version, the operation-slot version and so on. Each version points at an immutable payload.

Because the theme version is also in this set of pointers, "rolling back to a recovery point" necessarily rolls the theme back with it — you cannot roll back only the body text while keeping today's navigation and today's styles. This is not a limitation; it is its only self-consistent semantics: only when a set of pointers moves together can the site become consistent again.

Content is immediate, configuration publishes explicitly

Editing and publishing a piece of content synchronously advances the visibility watermark inside the write request, and the same batch of visitor requests reads the new version; a recovery point is created at the same time. Only site-level configuration needs explicit publishing (navigation, categories, operation slots, themes, site copy).

The price of this asymmetry: an operator does not wait after editing body text, but must click publish after editing configuration, otherwise the visitor side still reads by the last published pointers.

Reading by watermark and reading live must give the same answer

The snapshot read path takes content by "that watermark at that moment", and the live path takes the current one. Their consistency is guaranteed by two implementation rules:

The snapshot filters out mismatched translations at the moment it records, rather than judging at read time. So what reading by watermark returns is what visitors should have seen then.

Derived values are computed on the spot by the module that owns the data, without caching a "looks like it" conclusion. Whether a translation is effective depends on whether the source version it records equals the one of this moment — this comparison is done live on the read side.

If the snapshot stored "the current pointer" instead of "that version's payload", any later data fix would quietly rewrite history. When fixing a bug, re-pointing only the current pointer is not enough: that cell in published snapshots still points at the bad record, so a data fix must also ask "who else references this bad thing".

How many to keep

Automatic recovery points are kept 200 by default, and this number is configurable in the backend. They are kept by count, not converted to time, and publishing frequency is not changed either — "the last 200 publishes" is a question with a direct answer, while "the last 30 days" degenerates into "the last three" on a low-traffic site.

One configuration kind, one shape

Each configuration kind (ConfigKind) holds only one payload shape. Version storage does not parse payloads, and deduplication relies on content digests — so stuffing two shapes into the same kind produces no error at all, only an explosion on the read side: the theme cannot be resolved from the snapshot version, and the public site becomes unusable outright.

When adding a new "site-level configuration that goes into snapshots or is read by gates", first confirm whether it needs its own kind. It does by default. Adding a snapshot column for it is the correct cost, cheaper than guessing the shape on the read side.

The two sentences a rollback must say

A rollback is creating a new publish, not deleting history — after the rollback those recovery points still exist, and you can still return to today.

Rolling back by kind cannot just move pointers: the payload behind the pointers, and other pointers referencing them, must align together, otherwise "the watermark says this version, the content table says another".