[PR #1627] make_game: reject case aliases inside the game directory (MAKE-GAME-CASE-INSIDE-GUARD) #1641

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

📋 Pull Request Information

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

Base: main ← Head: fix/make-game-case-inside-guard


📝 Commits (1)

  • 2af23b9 Guard game directory aliases on case-insensitive volumes

📊 Changes

2 files changed (+35 additions, -1 deletions)

View changed files

📝 make_game.py (+15 -1)
📝 tests/test_make_game_paths.py (+20 -0)

📄 Description

Claimed in the coordination issue as: MAKE-GAME-CASE-INSIDE-GUARD (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154581392)

What and why

On case-insensitive volumes such as APFS, different capitalization can make the output or work directory appear outside the game directory even when it is inside it. Compare destination ancestors by filesystem identity when the lexical check misses, including when the destination does not exist yet. Synthetic tests cover both options, nested future paths, and an unrelated sibling.

Tested

  • python -I tests/test_make_game_paths.py (6 tests, 2 Windows-only skips)
  • python -I scripts/run_semantic_tests.py tests/semantic (487 files, 6,279 tests, 0 files failed)
  • python -I tests/test_text_write_line_endings.py
  • python -m compileall -q make_game.py tools tests, python -I make_game.py --help, python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_paths.py, and git diff --check
  • Linux; case-insensitive filesystem behavior simulated in the focused test. 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/1627 **Author:** [@KoLolX3](https://github.com/KoLolX3) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/make-game-case-inside-guard` --- ### 📝 Commits (1) - [`2af23b9`](https://github.com/ubiquitarianism/leonida/commit/2af23b9ac334254819d59045d426789adc596d12) Guard game directory aliases on case-insensitive volumes ### 📊 Changes **2 files changed** (+35 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `make_game.py` (+15 -1) 📝 `tests/test_make_game_paths.py` (+20 -0) </details> ### 📄 Description Claimed in the coordination issue as: MAKE-GAME-CASE-INSIDE-GUARD (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154581392) ### What and why On case-insensitive volumes such as APFS, different capitalization can make the output or work directory appear outside the game directory even when it is inside it. Compare destination ancestors by filesystem identity when the lexical check misses, including when the destination does not exist yet. Synthetic tests cover both options, nested future paths, and an unrelated sibling. ### Tested - `python -I tests/test_make_game_paths.py` (6 tests, 2 Windows-only skips) - `python -I scripts/run_semantic_tests.py tests/semantic` (487 files, 6,279 tests, 0 files failed) - `python -I tests/test_text_write_line_endings.py` - `python -m compileall -q make_game.py tools tests`, `python -I make_game.py --help`, `python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_paths.py`, and `git diff --check` - Linux; case-insensitive filesystem behavior simulated in the focused test. 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#1641
No description provided.