Python: store replace on Windows tries POSIX-semantics rename first (store-windows-py) #149

Merged
libby merged 1 commit from store-replace/windows-py into main 2026-11-12 22:40:27 +00:00
Member

Cut variants:cut_spec:cut-store-windows-py.r1, ruling variants:ruling:windows-replace-posix-first. Report variants:cut_report:cut-store-windows-py.h1.

_replace_store in cultcache-py stores.py: on win32 POSIX-semantics rename (ctypes kernel32) first, then write-through MoveFileExW fallback with the ruled retry; elsewhere os.replace. Both store writes (single-file and JSON-lines) go through it. Seam tests on Linux (8) and the real-kernel test passed on starfire (real Windows, Python 3.12 embeddable scp'd).

Not verified: the full cultcache-py suite on Windows, 32-bit offsets, a contention probe against a looping reader.

🤖 Generated with Claude Code

Cut `variants:cut_spec:cut-store-windows-py.r1`, ruling `variants:ruling:windows-replace-posix-first`. Report `variants:cut_report:cut-store-windows-py.h1`. `_replace_store` in cultcache-py `stores.py`: on win32 POSIX-semantics rename (ctypes kernel32) first, then write-through MoveFileExW fallback with the ruled retry; elsewhere `os.replace`. Both store writes (single-file and JSON-lines) go through it. Seam tests on Linux (8) and the real-kernel test passed on starfire (real Windows, Python 3.12 embeddable scp'd). Not verified: the full cultcache-py suite on Windows, 32-bit offsets, a contention probe against a looping reader. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cultcache-py: replace the store POSIX-first on Windows through ctypes kernel32, MoveFileExW fallback, bounded retry
All checks were successful
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Successful in 23m22s
1a853423fb
Mirrors the TypeScript decision table (variants:ruling:windows-replace-posix-first). Both store writes route through _replace_store; os.replace stays on other OSes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
libby merged commit f1e72adf87 into main 2026-11-12 22:40:27 +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!149
No description provided.