world_build: share locks across case and Unicode variants (WORLD-BUILD-CASE-LOCK) #1633

Open
github-bot wants to merge 1 commit from github-bot/gh-1633 into main AGit
Owner

@⁠KoLolX3 on GitHub · 2026-11-25 06:34 UTC · original
KoLolX3:fix/world-build-case-lock → main · +21 −3 · 2 files · 1 commits · open

Claimed in the coordination issue as: WORLD-BUILD-CASE-LOCK (#1608)

What and why

On case-insensitive filesystems, two spellings of the same output can hash to different locks and allow concurrent publication. Normalize and case-fold the resolved output path before hashing it. This conservatively shares locks even for case or Unicode variants that are distinct on a case-sensitive volume, avoiding concurrent writes at the cost of possible unnecessary contention. A two-process test checks contention, release, and an unrelated output.

Tested

  • python -I tests/test_world_build_output_lock.py (5 tests, 1 Windows-only skip)
  • python -I tests/test_world_build.py (65 tests, 1 skip)
  • python -I scripts/run_semantic_tests.py tests/semantic (487 files, 6,279 tests, 0 files failed)
  • python -m compileall -q make_game.py tools tests, python -I make_game.py --help, python -I scripts/check_no_game_data.py tools/world_build.py tests/test_world_build_output_lock.py, and git diff --check
  • Linux; native APFS was not available.

GPUs tested: n/a

AI-assisted: yes (OpenAI Codex)

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable.)
**@⁠KoLolX3** on GitHub · 2026-11-25 06:34 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1633) `KoLolX3:fix/world-build-case-lock` → `main` · +21 −3 · 2 files · 1 commits · open Claimed in the coordination issue as: WORLD-BUILD-CASE-LOCK (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why On case-insensitive filesystems, two spellings of the same output can hash to different locks and allow concurrent publication. Normalize and case-fold the resolved output path before hashing it. This conservatively shares locks even for case or Unicode variants that are distinct on a case-sensitive volume, avoiding concurrent writes at the cost of possible unnecessary contention. A two-process test checks contention, release, and an unrelated output. ### Tested - `python -I tests/test_world_build_output_lock.py` (5 tests, 1 Windows-only skip) - `python -I tests/test_world_build.py` (65 tests, 1 skip) - `python -I scripts/run_semantic_tests.py tests/semantic` (487 files, 6,279 tests, 0 files failed) - `python -m compileall -q make_game.py tools tests`, `python -I make_game.py --help`, `python -I scripts/check_no_game_data.py tools/world_build.py tests/test_world_build_output_lock.py`, and `git diff --check` - Linux; native APFS was not available. GPUs tested: n/a AI-assisted: yes (OpenAI Codex) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (Not applicable.)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:58:53 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-25 10:17 UTC · original

Independent verification (Windows, Python 3.11.9): _exclusive_output NFD-normalizes + casefolds the resolved path before the SHA-256 lock key — conservative direction (distinct folders that fold alike may contend but cannot publish concurrently). test_world_build_output_lock.py 5 OK incl. new case/unicode-variant test; test_world_build.py 65 OK; neighbors world_json_atomic/world_place/world_instancing all OK; merges cleanly; compileall + check_no_game_data clean. AI-assisted verification.

**@⁠whoalin1** on GitHub · 2026-11-25 10:17 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1633#issuecomment-7159501395) Independent verification (Windows, Python 3.11.9): `_exclusive_output` NFD-normalizes + casefolds the resolved path before the SHA-256 lock key — conservative direction (distinct folders that fold alike may contend but cannot publish concurrently). `test_world_build_output_lock.py` 5 OK incl. new case/unicode-variant test; `test_world_build.py` 65 OK; neighbors world_json_atomic/world_place/world_instancing all OK; merges cleanly; compileall + check_no_game_data clean. AI-assisted verification.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1633/head:github-bot/gh-1633'
git switch 'github-bot/gh-1633'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1633'
git switch 'github-bot/gh-1633'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1633'
git switch 'github-bot/gh-1633'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1633'
git switch 'main'
git merge --squash 'github-bot/gh-1633'
git switch 'main'
git merge --ff-only 'github-bot/gh-1633'
git switch 'main'
git merge 'github-bot/gh-1633'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.