tooling: replay revision 28 compute request archives #3733

Manually merged
github merged 1 commit from github-bot/gh-3731 into main 2026-12-02 02:20:26 +00:00 AGit
Owner

@⁠lambirou on GitHub · 2026-12-01 12:39 UTC · original
lambirou:codex/compute-rev28-replay → main · +52 −13 · 2 files · 1 commits · merged 2026-12-02 02:13 UTC

The offline compute translator refuses revision-28 archives with
compute request files do not match the key in their name, while
read_compute_request still accepts the revision-28 hash after the current
one. A census of the 1 December cache found that all 600 compute key-mismatch
lines are valid revision-28 requests, so the refusal hides replayable
archives.

compute_key now takes an explicit revision (the current revision by
default), and load_compute_request tries x2w-startup-shader-29cs and
x2w-startup-shader-28cs before refusing, matching the runtime reader. The
graphics path and all other revisions are unchanged. The regression builds a
source-built revision-28 request, translates it in manifest-only mode, and
checks that an altered revision-28 request is still refused with the same
reason.

Validation:

  • python -B tests/startup_compute_translate_check.py (pass)
  • python -B tests/startup_shader_cache_revision_check.py (pass)
  • python -B tests/startup_shader_cache_rekey_check.py (pass)
  • python -B tests/startup_shader_cache_rekey_cli_check.py (4 tests, pass)
  • python -B tests/startup_compute_request_offline_check.py (pass)
  • python -B tests/startup_tools_lint_check.py tools/startup (pass)

Refs #2182

**@⁠lambirou** on GitHub · 2026-12-01 12:39 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3731) `lambirou:codex/compute-rev28-replay` → `main` · +52 −13 · 2 files · 1 commits · merged 2026-12-02 02:13 UTC The offline compute translator refuses revision-28 archives with `compute request files do not match the key in their name`, while `read_compute_request` still accepts the revision-28 hash after the current one. A census of the 1 December cache found that all 600 compute key-mismatch lines are valid revision-28 requests, so the refusal hides replayable archives. `compute_key` now takes an explicit `revision` (the current revision by default), and `load_compute_request` tries `x2w-startup-shader-29cs` and `x2w-startup-shader-28cs` before refusing, matching the runtime reader. The graphics path and all other revisions are unchanged. The regression builds a source-built revision-28 request, translates it in manifest-only mode, and checks that an altered revision-28 request is still refused with the same reason. Validation: - `python -B tests/startup_compute_translate_check.py` (pass) - `python -B tests/startup_shader_cache_revision_check.py` (pass) - `python -B tests/startup_shader_cache_rekey_check.py` (pass) - `python -B tests/startup_shader_cache_rekey_cli_check.py` (4 tests, pass) - `python -B tests/startup_compute_request_offline_check.py` (pass) - `python -B tests/startup_tools_lint_check.py tools/startup` (pass) Refs #2182
Refs #2182

gfx2hlsl.compute_key now takes an explicit revision. load_compute_request
checks the current 29cs key and then the archived 28cs key, like
read_compute_request in src/shader_compute_request.cpp, and keeps the same
"compute request files do not match the key in their name" refusal when both
miss. The graphics path and the other revisions are unchanged.

The regression builds Case A with a revision-28 key, checks the key against
the runtime length-framed chain, translates it manifest-only, and checks that a
revision-28 request altered after naming is refused.

Commands and results:
- python -B tests/startup_compute_translate_check.py
  exit 0: revision-28 replay and altered revision-28 refusal; 5 malformed
  requests refused; renamed/incomplete requests refused; done tests pass.
- python -B tests/startup_shader_cache_revision_check.py
  exit 0: PASS.
- python -B tests/startup_shader_cache_rekey_check.py
  exit 0: all checks passed.
- python -B tests/startup_shader_cache_rekey_cli_check.py
  exit 0: 4 tests OK.
- python -B tests/startup_compute_request_offline_check.py
  exit 0: key vector, pending/refusals checks pass.
- python -B tests/startup_tools_lint_check.py tools/startup
  exit 0: PASS, 26 files parse.
- ctest --preset dev --no-tests=error -R '^startup_compute_translate_requests$'
  not run: the new worktree has no out/build/dev; no full build was started.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 12:45:06 +00:00
github manually merged commit 607de3973e into main 2026-12-02 02:20:26 +00:00
Author
Owner

@⁠Leyukaka on GitHub · 2026-12-01 21:57 UTC · original · reviewed

Reviewed d0e8f9285 by reading the diff. The fallback in tools/startup/gfx2hlsl.py:13210 matches the C++ request reader. The synthetic fixture at tests/startup_compute_translate_check.py:65 checks that revision 28 produces HLSL and a compute manifest, and that changing a companion's bytes without changing its size is still refused. I found nothing to change. I have not run the tests myself, so this relies on the required checks.

One possible follow-up, not for this PR: tools/startup/shader_cache_revision.py:91 could distinguish a live cache revision mismatch from replay support. A cache stamped with compute revision 28 still produces the blanket key-mismatch warning even though the translator can replay its compute requests.

**@⁠Leyukaka** on GitHub · 2026-12-01 21:57 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3731#pullrequestreview-6140881436) · **reviewed** Reviewed `d0e8f9285` by reading the diff. The fallback in `tools/startup/gfx2hlsl.py:13210` matches the C++ request reader. The synthetic fixture at `tests/startup_compute_translate_check.py:65` checks that revision 28 produces HLSL and a compute manifest, and that changing a companion's bytes without changing its size is still refused. I found nothing to change. I have not run the tests myself, so this relies on the required checks. One possible follow-up, not for this PR: `tools/startup/shader_cache_revision.py:91` could distinguish a live cache revision mismatch from replay support. A cache stamped with compute revision 28 still produces the blanket key-mismatch warning even though the translator can replay its compute requests.
This discussion has been locked. Commenting is limited to contributors.
No description provided.