Skip to content

docs: README says deleted disassembly listings are disassembled again - #4159

Merged
ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
Pierre-Kookis:docs-readme-disasm-rerun
Nov 23, 2026
Merged

ItsNotRexed merged 2 commits into
ItsNotRexed:mainfrom
Pierre-Kookis:docs-readme-disasm-rerun

Conversation

@Pierre-Kookis

Copy link
Copy Markdown
Contributor

Claim: #4084 (comment) (new BUILD item, no ID assigned yet)

What changed and why

The low-disk note in README.md said that deleting the .s listings in work/shaders/dxbc/disasm "along with the translated work/shaders/spirv/index.json, can leave the shaders stage looking finished with zero shaders". That stopped being true with BUILD-667 (bf6c371): disassembly_status() (make_game.py ~859-885) requires a listing for every shader that disasm.done records, so shaders() disassembles the missing ones again and translates again, or stops with "Shader disassembly did not restore all expected listings" (~965).

  • README.md: the sentence now says what the next run does (checks the listings against disasm.done, disassembles the missing ones, translates again). The symlink sentence is unchanged.
  • tests/test_shader_stage_resume.py: test_deleting_every_listing_and_the_translation_disassembles_again runs the mocked stage, deletes every .s and spirv/index.json, and checks that the folder is not reusable, that the next run is shader_disasm.py, translate, that the listing is back, and that a third run does nothing.

The new test passes on main too: it pins current behaviour so the README can't drift again; the fix itself is the doc line. docs/i18n/pt-BR/quickstart.md line 58 has the same old sentence; I left it alone because #3166 and #3769 are syncing that file.

Tests

Windows 11, Python 3.13.14, no GPU, no game files.

  • python -I tests/test_shader_stage_resume.py: 45 tests, OK.
  • python -I tests/test_docs_table_rows.py, test_docs_links.py, test_docs_design_rows.py: OK.
  • python -m compileall -q make_game.py tools tests: OK.
  • Every standalone test (python -I tests/test_*.py, the files with a __main__ block and no pytest) on main aa2988cc: 297 of 301 pass. The 4 that fail are in files this PR doesn't touch and are local to this machine: test_hw_oracle and test_progress_dashboard pass from a checkout whose path has no space (mine has one), and test_build_llvm_mc_batch (the unicode-path .cmd case, French-locale Windows) and test_check_no_game_data (PermissionError on a temp file) fail with or without the space.

AI-assisted (Claude Code).

The low-disk note in README.md said that deleting the .s listings in
work/shaders/dxbc/disasm together with work/shaders/spirv/index.json "can
leave the shaders stage looking finished with zero shaders". Since BUILD-667
(bf6c371), disassembly_status() requires a listing for every shader that
disasm.done records, so shaders() disassembles the missing ones again and
translates again (or fails with "Shader disassembly did not restore all
expected listings").

Say what happens instead, and pin that exact case in
tests/test_shader_stage_resume.py.

AI-assisted (Claude Code).
@iurysf

iurysf commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Code read of e458356c. The new README sentence matches disassembly_status (make_game.py:859-886): the next run checks the listings against the list in disasm.done, repairs the missing ones, and translates again (or stops with "Shader disassembly did not restore all expected listings", :965). Ran on Windows 11, Python 3.14: tests/test_shader_stage_resume.py 45 OK; test_docs_links.py and test_docs_repo_paths.py OK; compileall and git diff --check clean. As the description says, the new test also passes on main, so I used a mutation as the control: making the JSON-marker branch ignore missing listings (listings == expected dropped) fails 3 tests including the new one, so it does pin the "every listing deleted" case.
Two small notes: an older disasm.done that only records LLVM takes the other branch (listings == active), which regenerates everything rather than "the missing ones", and replacing that check with True is not caught by any test in the file; and docs/i18n/pt-BR/quickstart.md:58 still has the old sentence (left on purpose, per the description).
AI-assisted code read (Claude).

Review follow-up: a disasm.done that records only the llvm-mc signature
takes the `listings == active` branch of disassembly_status(), so a missing
listing reruns the whole disassembly rather than resuming. Say so in the
README and pin it with a test (it fails if that check is replaced by True).

AI-assisted (Claude Code).
@Pierre-Kookis

Copy link
Copy Markdown
Contributor Author

@iurysf thanks, both notes were right. d6563598: the README now says a disasm.done from before the listings were recorded disassembles all of them again, and test_legacy_completion_marker_with_a_missing_listing_disassembles_everything_again pins that branch (legacy marker, listing missing: no --skip-existing, then nothing on the next run). With listings == active replaced by True it fails; restored, tests/test_shader_stage_resume.py is 46 OK (Windows 11, Python 3.13.14). pt-BR stays as is because of #3166/#3769.

@sds-228 sds-228 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review of d656359: no issues found. The README now describes automatic re-disassembly, and tests cover deleting every listing plus the legacy marker case. Targeted suite: 46 tests OK.

AI-assisted (OpenCode).

@kapitche

Copy link
Copy Markdown
Contributor

Tested d656359 merged with main 98fa503 on Linux (WSL2), Python 3.12.16: pass

  • tests/test_shader_stage_resume.py: 46/46 OK (the two new tests included). tests/test_docs_*.py: 10/10 OK.
  • Negative control: the PR changes only README.md and the test, not code, so the two new tests also pass on main; they pin existing behaviour rather than a fix. The README wording matches what they check (missing listings against disasm.done, legacy marker with a missing listing redoes all).

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.

5 participants