shader_link_check: share the report collision guard #1052

Manually merged
github merged 1 commit from gh-pr/1052/head into gh-pr/1052/base 2026-11-26 09:35:24 +00:00
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 17:21 UTC · original
TheGeogeo:fix/shader-link-report-path → main · +9 −14 · 2 files · 1 commits · merged 2026-11-24 23:21 UTC

Claimed in the coordination issue as: SHADER-LINK-REPORT-PATH — #14

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.
**@⁠TheGeogeo** on GitHub · 2026-11-24 17:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1052) `TheGeogeo:fix/shader-link-report-path` → `main` · +9 −14 · 2 files · 1 commits · merged 2026-11-24 23:21 UTC Claimed in the coordination issue as: SHADER-LINK-REPORT-PATH — https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 ### 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.
Use report_paths.same_report_path for the report and its inputs, so a missing input whose name differs only by spelling on a case-folding volume is refused before the report is written.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:35:22 +00:00
github manually merged commit 7323d81f06 into gh-pr/1052/base 2026-11-26 09:35:24 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 17:28 UTC · original · approved these changes

Verified on exact head 564cd9288a210d6d05d3335ff365fe0cd0bf89bb. Linux suites pass: shader-link 51/51, report paths 22/22, report-path case 3 passed / 1 expected APFS/HFS+ normalization skip, and line endings 3/3. No-game-data and diff checks pass; merge-tree onto current main is clean. The new synthetic case proves shader_link_check now delegates the report/input collision decision to the shared guard. I did not independently test on a case-folding mount or Windows; the PR-reported Windows run is author-provided. No game data/GPU.

**@⁠KernelSmoker** on GitHub · 2026-11-24 17:28 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1052#pullrequestreview-6044193436) · **approved these changes** Verified on exact head 564cd9288a210d6d05d3335ff365fe0cd0bf89bb. Linux suites pass: shader-link 51/51, report paths 22/22, report-path case 3 passed / 1 expected APFS/HFS+ normalization skip, and line endings 3/3. No-game-data and diff checks pass; merge-tree onto current main is clean. The new synthetic case proves `shader_link_check` now delegates the report/input collision decision to the shared guard. I did not independently test on a case-folding mount or Windows; the PR-reported Windows run is author-provided. No game data/GPU.
Author
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 21:22 UTC · original

Rebased on main 58be9cdf: 564cd928 -> 7323d81f, same patch (git range-diff). The CI run of 564cd928 never started (action_required), so this push was made to start it.

  • Windows 11, Python 3.12.4, after the rebase: 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.
  • The approval here was made before the rebase, on 564cd928.

No code change in this rebase. CI on the new head is still queued.

AI-assisted: yes (Claude Code).

**@⁠TheGeogeo** on GitHub · 2026-11-24 21:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1052#issuecomment-7144847830) Rebased on `main` `58be9cdf`: `564cd928` -> `7323d81f`, same patch (`git range-diff`). The CI run of `564cd928` never started (action_required), so this push was made to start it. - Windows 11, Python 3.12.4, after the rebase: `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. - The approval here was made before the rebase, on `564cd928`. No code change in this rebase. CI on the new head is still queued. AI-assisted: yes (Claude Code).
Author
Owner

@⁠QemmHD on GitHub · 2026-11-24 23:21 UTC · original

Merging.

Why merged: SHADER-LINK-REPORT-PATH: shader_link_check uses the shared report_paths.same_report_path guard instead of its own resolve/samestat code, so it covers the cases the shared guard does (hard links, case aliases). KernelSmoker approved it (Linux).

Why it's good: shader_link_check, report_paths and report_path_case: 75 passed, 2 skipped (symlink privilege).

Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 0f98d193c. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠QemmHD** on GitHub · 2026-11-24 23:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1052#issuecomment-7147307658) Merging. **Why merged:** SHADER-LINK-REPORT-PATH: shader_link_check uses the shared report_paths.same_report_path guard instead of its own resolve/samestat code, so it covers the cases the shared guard does (hard links, case aliases). KernelSmoker approved it (Linux). **Why it's good:** shader_link_check, report_paths and report_path_case: 75 passed, 2 skipped (symlink privilege). Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main 0f98d193c. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.