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

Open
opened 2026-11-26 20:21:58 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1633
Author: @KoLolX3
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: fix/world-build-case-lock


📝 Commits (1)

  • d1d01cb Share world output locks across spelling variants

📊 Changes

2 files changed (+21 additions, -3 deletions)

View changed files

📝 tests/test_world_build_output_lock.py (+14 -0)
📝 tools/world_build.py (+7 -3)

📄 Description

Claimed in the coordination issue as: WORLD-BUILD-CASE-LOCK (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154885515)

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.)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1633 **Author:** [@KoLolX3](https://github.com/KoLolX3) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/world-build-case-lock` --- ### 📝 Commits (1) - [`d1d01cb`](https://github.com/ubiquitarianism/leonida/commit/d1d01cb300153697859265d90619faf27555cafb) Share world output locks across spelling variants ### 📊 Changes **2 files changed** (+21 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_world_build_output_lock.py` (+14 -0) 📝 `tools/world_build.py` (+7 -3) </details> ### 📄 Description Claimed in the coordination issue as: WORLD-BUILD-CASE-LOCK (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154885515) ### 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.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
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
starred/leonida#1645
No description provided.