Keep shader cache keys stable across Git checkout line endings #38

Manually merged
github merged 1 commit from gh-pr/38/head into gh-pr/38/base 2026-12-05 17:22:56 +00:00
Owner

@⁠Sans0001010 on GitHub · 2026-12-05 16:09 UTC · original
Sans0001010:codex/stable-shader-cache-line-endings → main · +4 −0 · 1 files · 1 commits · merged 2026-12-05 16:16 UTC

Problem

The translated shader cache fingerprints the byte length and contents of the source files it embeds. The v4 and v1.0.7 tags have identical Git blobs for these inputs, but four of the 37 inputs changed from LF in the published v4 binary to CRLF in the published v1.0.7 binary. This changes the translation cache key even when the translator sources are unchanged.

Fix

Pin LF for the Rust sources that feed the fingerprint. Fresh Windows and LF checkouts then use the original LF inputs. This leaves the cache format and the translator's invalidation logic intact. A clean release checkout applies the attributes to all affected files.

Validation

  • Reproduced the mismatch with fresh Git checkout output using core.autocrlf=true and core.autocrlf=false.
  • After applying the attributes, all 37 length-prefixed inputs match the pre-change LF checkout byte for byte in both modes.
  • Ran git diff --check.
**@⁠Sans0001010** on GitHub · 2026-12-05 16:09 UTC · [original](https://github.com/gamingwithhomie/larp/pull/38) `Sans0001010:codex/stable-shader-cache-line-endings` → `main` · +4 −0 · 1 files · 1 commits · merged 2026-12-05 16:16 UTC ## Problem The translated shader cache fingerprints the byte length and contents of the source files it embeds. The v4 and v1.0.7 tags have identical Git blobs for these inputs, but four of the 37 inputs changed from LF in the published v4 binary to CRLF in the published v1.0.7 binary. This changes the translation cache key even when the translator sources are unchanged. ## Fix Pin LF for the Rust sources that feed the fingerprint. Fresh Windows and LF checkouts then use the original LF inputs. This leaves the cache format and the translator's invalidation logic intact. A clean release checkout applies the attributes to all affected files. ## Validation - Reproduced the mismatch with fresh Git checkout output using core.autocrlf=true and core.autocrlf=false. - After applying the attributes, all 37 length-prefixed inputs match the pre-change LF checkout byte for byte in both modes. - Ran git diff --check.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 17:22:48 +00:00
github manually merged commit 7abf534afc into gh-pr/38/base 2026-12-05 17:22:56 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.