Review finding (PR #791): rows carried only version/watermark/state, so a recreated session id, or a persistence store replaced under a surviving cache, could pass every watermark check and seed state folded from an unrelated log; a checkpoint racing ahead of an eager log flush could likewise expose values no stored log contains. Records now store the header identity (createdAt, cwd) they were folded from — reads validate it against the live header (listing) or the tail's stored header (cold read) and discard unrelated records whole (domain version 2 discards v1 media by the pre-release stance). A live checkpoint additionally flushes the session's buffered events durably before the cache row lands: the cache can trail the log, never lead it. cachedValues is reshaped into cachedSnapshot(meta): the identity witness plus the {asOfSeq, values} cut the list carrier serves.
session-projection/
English | 中文
Session-projection capability family: the seam through which domain host plugins serve whole current values of log-derived per-session state to client carriers.
| Package | ctx key | Role |
|---|---|---|
session-projection |
sessionProjections |
The interface package: the merge-extensible SessionProjectionMap type table, the ProjectionDefinition unit contract, and the eagerly driven registry carriers read synchronously |
session-projection-cache |
sessionProjectionCache |
Persisted projection cache: durable per-session unit checkpoints over the domain data form, throttled write-behind with mandatory turn/end + detach points, and the cold-read ladder (cache row + persistence tail replay) |