CultLib/packages/cultcache-ts/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 1f442f3345 Refuse duplicate global records while staging a pull
A load is all-or-nothing. TypeScript checked for a second record of a
global type inside #applyHydratedEntry, which runs after
#resetHydratedState, so a refused pull left the cache cleared and partly
reloaded. The check now runs in the staging pass beside the home check,
before anything is cleared; the apply step's pull-only branch is gone.

Python already validated before swapping, but its check only fired when
the __global__ record arrived second, so a store holding __global__ then
another key of a global type loaded both. Any second record of a global
type is now refused regardless of order.

Rust has no global document types and replaces its entry map only after
staging; it had neither flaw.

pullWithDuplicateGlobalLeavesCacheUnchanged (TS) and
test_pull_with_duplicate_global_leaves_cache_unchanged (Python) fail on
9ab1706 and pass here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 00:57:09 +02:00
..
cult-cache-inspector.ts Recover schema-stamped cache records across runtimes 2026-06-27 14:34:53 +01:00
cult-cache.ts Refuse duplicate global records while staging a pull 2026-09-14 00:57:09 +02:00
document.ts Bring language packages into CultLib monorepo 2026-05-30 00:39:39 +01:00
index.ts Promote the swarm document catalog into cultcache-ts 2026-09-06 19:40:37 +02:00
single-file-messagepack-backing-store.ts Add single-file document handles 2026-06-27 15:46:25 +01:00
swarm-documents.ts Promote the swarm document catalog into cultcache-ts 2026-09-06 19:40:37 +02:00
types.ts Bring language packages into CultLib monorepo 2026-05-30 00:39:39 +01:00