CultCache C#: the directory store refuses a write into a moved store, as the single-file store does #188

Merged
eureka merged 4 commits from hands/cs-directory-stale-write-gate into main 2026-11-28 00:49:19 +00:00
Owner

The single-file store's refusal of a write into a store that moved since this cache last read it moves into the shared base class; the directory store applies it in CommitBatch and PushAll, inside the lease it already takes. Two caches racing to write records holding one unique value: exactly one commits, the other gets CultWriteConflictException and reloads (50/50 forced rounds), matching the single-file store and the Rust gate (#182). Closes the Medium variants:finding:cut-unique-index.s1.directory-store-concurrent-duplicates under operator ruling variants:ruling:unique-indexes.

Spec variants:cut_spec:cut-cs-directory-stale-write-gate.r1; reports h1, h2; Soul s1, s2 hold. Caching 1471 passed.

🤖 Generated with Claude Code

The single-file store's refusal of a write into a store that moved since this cache last read it moves into the shared base class; the directory store applies it in CommitBatch and PushAll, inside the lease it already takes. Two caches racing to write records holding one unique value: exactly one commits, the other gets CultWriteConflictException and reloads (50/50 forced rounds), matching the single-file store and the Rust gate (#182). Closes the Medium `variants:finding:cut-unique-index.s1.directory-store-concurrent-duplicates` under operator ruling `variants:ruling:unique-indexes`. Spec `variants:cut_spec:cut-cs-directory-stale-write-gate.r1`; reports h1, h2; Soul s1, s2 hold. Caching 1471 passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
UniqueIndexTests: pin the delete's Forgot and the foreign record's version in the moved-store gate
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 30m11s
4c7354be79
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
eureka merged commit 5a4308a2ac into main 2026-11-28 00:49:19 +00:00
eureka deleted branch hands/cs-directory-stale-write-gate 2026-11-28 00:49:19 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/CultLib!188
No description provided.