Skip to content

tooling: replay revision 28 compute request archives - #3731

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
lambirou:codex/compute-rev28-replay
Dec 2, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
lambirou:codex/compute-rev28-replay

Conversation

@lambirou

@lambirou lambirou commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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 R0Y00#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.

@Leyukaka Leyukaka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@R0Y00
R0Y00 merged commit 607de39 into R0Y00:main Dec 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants