Caching: a cacheless write owns a record only through a claimant it writes

Owns takes a condition on the claimant's answer (mayClaim): the cache arm accepts any
claimant, the cacheless arm only one of the entries the call writes. Another registered
type's record, under its current id or an old one it lists, is refused as at 0e57bf11.
Tests pin P1a/P1e/P1f shapes, the writer's own drift under a larger registry, and that a
second same-name type in the lent registry only refuses. CHANGELOG entry for the cacheless
claimant; stale comments on the store's owns predicate and WriteDocument's registry doc fixed.

Builds not yet run when committed; verified on Yggdrasil before push.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-27 08:19:21 +01:00
commit d3a4d0a3bc
4 changed files with 97 additions and 14 deletions

View file

@ -208,8 +208,10 @@ loaded, is refused typed, and the record is reloaded as the store holds it, read
read it. This holds for every write through the store, the store's own `Push`, `Delete` and
`CommitBatch` included. A CultMesh single-file write asks the same rule: it owns its entry's own id and the ids that entry lists
compatible, and an id whose publishing entry its claimant reads whole (no persisted slot unread). The claimant is
the one a cache with the call's registry would pick, so a cacheless write is never more permissive than a cache;
with no registry the call's one entry is the claimant. It is refused the same way otherwise.
the one a cache with the call's registry would pick, and it owns the record only when it is the entry the call writes, so a
cacheless write is never more permissive than a cache, nor than its own declaration: a record another registered type claims
is refused, under that type's current id or an old one it lists. With no registry the call's one entry is the claimant. It is
refused the same way otherwise.
A record that resolves to no local type is a foreign record, for example one of a type this build does not
have, or one renamed under a new schema name without declaring its old id. A store never destroys or relabels it: the store carries it