[PR #1052] [MERGED] shader_link_check: share the report collision guard #1088

Closed
opened 2026-11-26 20:20:03 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1052
Author: @TheGeogeo
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @QemmHD

Base: main ← Head: fix/shader-link-report-path


📝 Commits (1)

  • 7323d81 shader_link_check: share the report collision guard

📊 Changes

2 files changed (+9 additions, -14 deletions)

View changed files

📝 tests/test_shader_link_check.py (+7 -0)
📝 tools/shader_link_check.py (+2 -14)

📄 Description

Claimed in the coordination issue as: SHADER-LINK-REPORT-PATH — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138533375

What and why

shader_link_check.py compared the report path with its inputs through a private check. When neither file exists yet, that check only compared the resolved paths, so on a volume that folds letter case a report could take the path of a missing input under another spelling. The synthetic reproduction is in the claim. Use report_paths.same_report_path, as CONTRIBUTING.md asks of report writers, so this tool gets the same answer as the others. Existing same-file and hard-link refusals are unchanged.

Tested

On Windows 11, Python 3.12.4. After a rebase on main 58be9cdf (7323d81f, same patch as 564cd928): tests/test_shader_link_check.py 51 OK, tests/test_report_paths.py 22 OK, tests/test_report_path_case.py 4 run, OK (1 skipped); test_tool_stdout_encoding.py, test_docs_cli_flags.py and test_text_write_line_endings.py OK. First run, based on main at 32950551:

  • python -I -B tests/test_shader_link_check.py — 51 passed. With the previous tools/shader_link_check.py, the new case-folding test fails with ValueError not raised; it simulates the folding volume by patching the probe.
  • python -I -B tests/test_report_paths.py — 22 passed. tests/test_report_path_case.py — 3 passed, 1 skipped. tests/test_text_write_line_endings.py — 3 passed.
  • Temporary merges with the neighboring report-cleanup changes were clean: 53 passed with #715 (940b0ae2) and 52 passed with #807 (0f53b3ee).
  • The guard over 4,000 synthetic inputs takes about 1.7 s, from 0.2 to 0.8 s before, because each input is now resolved.
  • python -m compileall -q make_game.py tools tests, git diff --check and the no-game-data check passed.

GPUs tested: n/a (CPU-only synthetic tests).

AI-assisted: yes (Codex and Claude Code).

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.

🔄 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/1052 **Author:** [@TheGeogeo](https://github.com/TheGeogeo) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `fix/shader-link-report-path` --- ### 📝 Commits (1) - [`7323d81`](https://github.com/ubiquitarianism/leonida/commit/7323d81f0622aaf6b2e9c2c3d7297a73740d7985) shader_link_check: share the report collision guard ### 📊 Changes **2 files changed** (+9 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_shader_link_check.py` (+7 -0) 📝 `tools/shader_link_check.py` (+2 -14) </details> ### 📄 Description Claimed in the coordination issue as: SHADER-LINK-REPORT-PATH — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7138533375 ### What and why `shader_link_check.py` compared the report path with its inputs through a private check. When neither file exists yet, that check only compared the resolved paths, so on a volume that folds letter case a report could take the path of a missing input under another spelling. The synthetic reproduction is in the claim. Use `report_paths.same_report_path`, as CONTRIBUTING.md asks of report writers, so this tool gets the same answer as the others. Existing same-file and hard-link refusals are unchanged. ### Tested On Windows 11, Python 3.12.4. After a rebase on `main` `58be9cdf` (`7323d81f`, same patch as `564cd928`): `tests/test_shader_link_check.py` 51 OK, `tests/test_report_paths.py` 22 OK, `tests/test_report_path_case.py` 4 run, OK (1 skipped); `test_tool_stdout_encoding.py`, `test_docs_cli_flags.py` and `test_text_write_line_endings.py` OK. First run, based on `main` at `32950551`: - `python -I -B tests/test_shader_link_check.py` — 51 passed. With the previous `tools/shader_link_check.py`, the new case-folding test fails with `ValueError not raised`; it simulates the folding volume by patching the probe. - `python -I -B tests/test_report_paths.py` — 22 passed. `tests/test_report_path_case.py` — 3 passed, 1 skipped. `tests/test_text_write_line_endings.py` — 3 passed. - Temporary merges with the neighboring report-cleanup changes were clean: 53 passed with #715 (`940b0ae2`) and 52 passed with #807 (`0f53b3ee`). - The guard over 4,000 synthetic inputs takes about 1.7 s, from 0.2 to 0.8 s before, because each input is now resolved. - `python -m compileall -q make_game.py tools tests`, `git diff --check` and the no-game-data check passed. GPUs tested: n/a (CPU-only synthetic tests). AI-assisted: yes (Codex and Claude Code). ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:20:03 +01:00
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#1088
No description provided.