Caching: CultCache.Update, update-with-retry as the golden-path write (golden-path-write-api) #168

Merged
libby merged 5 commits from golden-write/update-with-retry into main 2026-11-13 15:40:35 +00:00
Member

CultCache.Update(key, apply, maxAttempts = 5): read the held record's content version, apply a function to a private codec copy, conditional commit, re-run on a lost race; a lost race is a returned CultUpdateResult, blind writes stay the opt-out. C# reference only; ports and items (2)-(4) are follow-ups.

Spec variants:cut_spec:cut-cut-update-with-retry.r1, report variants:cut_report:cut-cut-update-with-retry.h1, follow-up variants:follow_up:golden-path-write-api. Includes UpdateTests, a tested docs/start section and the Caching README Happy Path.

🤖 Generated with Claude Code

CultCache.Update<T>(key, apply, maxAttempts = 5): read the held record's content version, apply a function to a private codec copy, conditional commit, re-run on a lost race; a lost race is a returned CultUpdateResult, blind writes stay the opt-out. C# reference only; ports and items (2)-(4) are follow-ups. Spec `variants:cut_spec:cut-cut-update-with-retry.r1`, report `variants:cut_report:cut-cut-update-with-retry.h1`, follow-up `variants:follow_up:golden-path-write-api`. Includes UpdateTests, a tested docs/start section and the Caching README Happy Path. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Reads the held content version, applies the caller's function to a codec
copy, commits with Expected under the store lock, and re-runs on a lost
race. CultCodec.Clone is the one copy, shared with CultInspectorModel.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The result's Document is what the cache holds, so a final lost attempt
refreshes the home too. Tests pin lost updates, re-run on fresh value,
bounded attempts, private copy, decline, create race, refusals, variant
store conflict, in-memory race.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Caching README: Update leads Happy Path; cut four nonexistent surfaces
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 29m7s
0e84434a94
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit 3d333e8466 into main 2026-11-13 15:40:35 +00:00
libby deleted branch golden-write/update-with-retry 2026-11-13 15:40:36 +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!168
No description provided.