From 67f7ce19ebb574814fda320c5f735425d9e82fe5 Mon Sep 17 00:00:00 2001 From: Libby Date: Thu, 12 Nov 2026 21:07:53 +0000 Subject: [PATCH] Settle the stale dangling-link statements Soul found (changelog, docs, DiskStore::absent comment) Co-Authored-By: Claude Sonnet 5.5 --- docs/document-variants-cut.md | 2 +- docs/write-ownership-map.md | 4 ++-- packages/cultcache-rs/src/lib.rs | 2 +- packages/cultcache-ts/CHANGELOG.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/document-variants-cut.md b/docs/document-variants-cut.md index d7245e2d..f363521f 100644 --- a/docs/document-variants-cut.md +++ b/docs/document-variants-cut.md @@ -1672,7 +1672,7 @@ The one door per runtime, and who walks through it: - **Shared paths.** TS `pushAll` and Rust `push_all` only. - **Cut line.** `merge-r1` h4 (TS) and h6 (Rust). - **Pinned by.** The manifest walks run a soft flush over every vector in TS (the `softPushAll` operation, TS test :2336) and Rust (`soft_push_all`, RS:5149), each with an absent and a dangling-link case; `a_soft_push_all_writes_where_nothing_is_and_refuses_a_dangling_link` RS:6019. -- **Known gaps.** C# and Python have no soft decision, and the C# Mesh flag is dead; no follow-up is registered (h6 `undone` names it). `writer-dangling-link-tolerance` applies to the non-soft branch. +- **Known gaps.** C# and Python have no soft decision, and the C# Mesh flag is dead; no follow-up is registered (h6 `undone` names it). `writer-dangling-link-tolerance` is settled: the non-soft branch refuses a dangling link too. ### What no cut owns yet diff --git a/docs/write-ownership-map.md b/docs/write-ownership-map.md index 44452dc6..79140c2b 100644 --- a/docs/write-ownership-map.md +++ b/docs/write-ownership-map.md @@ -107,8 +107,8 @@ Authority map (also in the spec): - `variants:follow_up:public-store-writes-behind-cache`: **leave**. It asks who may stage behind an attached cache (API shape); this cut changes what any staging is judged by. No collision: direct `Push`/`CommitBatch` reach the same on-disk judge, so they get the per-key rule for free. Hands must not give direct staging a different predicate. -- `variants:follow_up:writer-dangling-link-tolerance`: **leave**. Rust/TS whole-store `push_all` reading a dangling link is - a reader/writer tolerance question, not ownership; this cut touches no leaf. +- `variants:follow_up:writer-dangling-link-tolerance`: **settled** (the reader owns the verdict; every runtime's whole-store + `push_all` refuses a dangling link, as `push` does). ## Deferred doc findings this cut fixes diff --git a/packages/cultcache-rs/src/lib.rs b/packages/cultcache-rs/src/lib.rs index 678ff4d6..b3d6a441 100644 --- a/packages/cultcache-rs/src/lib.rs +++ b/packages/cultcache-rs/src/lib.rs @@ -4120,7 +4120,7 @@ struct DiskStore { } impl DiskStore { - /// A file that is gone, or a dangling link a whole-file replace is about to replace: an empty v1 store. + /// Nothing at the path: an empty v1 store. A dangling link is something at the path and is refused, not read as this. fn absent() -> Self { Self { absent: true, format: STORE_FORMAT_V1, envelopes: Vec::new(), catalog: Vec::new() } } diff --git a/packages/cultcache-ts/CHANGELOG.md b/packages/cultcache-ts/CHANGELOG.md index 73884941..fea670db 100644 --- a/packages/cultcache-ts/CHANGELOG.md +++ b/packages/cultcache-ts/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to `@gamecult/cultcache-ts` are recorded here, following ### Breaking - `SingleFileMessagePackBackingStore.pushAll` through a dangling symbolic link at the store path is refused with `ENOENT`, as `push` and `pullAll` are, and writes nothing; it used to replace the link with a new store. The reader owns the verdict on what is at the path. -- `SingleFileMessagePackBackingStore.pushAll` writes the given entries onto the store as it is under the lock, as `push` does: a record under the same key is replaced and no other is removed. It used to replace the whole file with the entries, so `CultMesh.flush()` from a cache that held less than the store (a node created with `pullOnStart: false`, or one whose image was stale) wiped the records it never read. A caller that relied on `pushAll` to reset a store removes the file first. A soft flush and the dangling-link case are unchanged. `CultCache.storedSnapshot()` is the image as the stores hold it (a global loaded from a legacy key under that key) and is what `CultMesh.flush` persists, so a flush no longer leaves such a global under two keys; `snapshot()` is unchanged. +- `SingleFileMessagePackBackingStore.pushAll` writes the given entries onto the store as it is under the lock, as `push` does: a record under the same key is replaced and no other is removed. It used to replace the whole file with the entries, so `CultMesh.flush()` from a cache that held less than the store (a node created with `pullOnStart: false`, or one whose image was stale) wiped the records it never read. A caller that relied on `pushAll` to reset a store removes the file first. A soft flush is unchanged. `CultCache.storedSnapshot()` is the image as the stores hold it (a global loaded from a legacy key under that key) and is what `CultMesh.flush` persists, so a flush no longer leaves such a global under two keys; `snapshot()` is unchanged. - A single-file store marked `cultcache.store.v3` (it holds an element id, written by the C# runtime) is read, and a rewrite keeps the mark and the ids; this runtime does not decide when a document carries ids. A runtime from before this change refuses a v3 store by name, so rolling back to an older release after a store has been written as v3 is one-way: there is no carry-back, so restore from a copy taken before upgrading. - `indexes` are unique, as C# `[CultIndex]`: a write or a load that leaves two records of a type holding one non-blank value under one alias is refused naming both keys and the alias, and writes nothing. Index text is the C# canonical