shader_link_check: share the report collision guard #1052

Merged
TheGeogeo merged 1 commit from upstream-pr/1052 into main 2026-11-24 23:21:29 +00:00
TheGeogeo commented 2026-11-24 17:21:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T17:21:33Z.


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5477003136 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1052). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-24T17:21:33Z. --- 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.
KernelSmoker commented 2026-11-24 17:28:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T17:28:55Z.

Review: APPROVED


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6044193436 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1052#pullrequestreview-6044193436). Originally posted by [KernelSmoker](https://github.com/KernelSmoker) on 2026-11-24T17:28:55Z. **Review:** APPROVED --- 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.
TheGeogeo commented 2026-11-24 21:22:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-24T21:22:36Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7144847830 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1052#issuecomment-7144847830). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-24T21:22:36Z. --- 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).
QemmHD commented 2026-11-24 23:21:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T23:21:27Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7147307658 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1052#issuecomment-7147307658). Originally posted by [QemmHD](https://github.com/QemmHD) on 2026-11-24T23:21:27Z. --- 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).
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1052
No description provided.