Add an opt-in assets-stage switch to skip audio extraction and conversion, preserve existing audio outputs, and account for the lower disk requirement. AI-assisted implementation; focused tests passed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* scripts, tools: build llvm-mc 23.1.5 by default, so the pipeline library translates
LLVM 21.1.8's gfx1013 decoder cannot decode 840 of the 2,684 compute
programs in the pipeline library of 1.0.2.1: their listings carry 79,490
undecodable words and 8,310 exp invalid_target_N lines, the translator
refuses all of them as "fall-through into undecodable words", and the
shaders stage keeps 1,844 of 2,684. LLVM 21 does translate all 26,503
shaders of shaders.rpf; the library is what it loses.
The same bytes under llvm-mc 23.1.5 have no rejected word in those 840,
and 839 of them translate and pass spirv-val (the last wants s_sethalt,
which the translator does not implement, under either version). The 1,844
that already translated were re-disassembled too: 1,674 listings change
and all 1,674 still translate, the other 170 are byte-identical, so the
stage goes from 1,844/2,684 to 2,683/2,684.
The build helper now builds 23.1.5 by default. The docs that name the
minimum version (README, docs/design.md, docs/testing.md, docs/linux.md)
and the three user-facing messages that still said 21+ (make_game.py's
preflight, shader_disasm.py's probe error, mc_command.py's install hint)
now say 23+, with the tests that assert those texts updated.
AI-assisted (DeepSeek Harness).
Written with an AI assistant.
* docs: LLVM 23 is what the shaders stage needs, and a test pins the script's default
The real-Windows check only asserted that known_folders() returned at most
three paths, so an empty or shortened result passed. Without
KF_FLAG_DONT_VERIFY the shell reports a known folder only where it exists,
so the expected result is the unverified paths (KF_FLAG_DONT_VERIFY) that
are directories, in KNOWN_FOLDERS order. A machine with a missing folder
still passes, and a known_folders() that drops an existing folder fails.
A truncated or malformed shaders/spirv/index.json could let the shaders stage report success and then leave the pipeline stage asking for another full translation. Treat a readable but malformed index as recoverable from completed shards, keep accepting a UTF-8 BOM index, and still reject a real empty merge. Also account for shaders/assets overlap in preflight free-space checks when both stages run.
Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
33ab48d3ea/README.md (recovering-a-damaged-shader-index)
AI-assisted.
A complete copy of another build has every file, with only the probe files at other sizes. That folder
cleared the half threshold and was told to finish a download that is complete. A download that stopped
early leaves files missing, while a probe there with another size (MicrosoftGame.Config above all) means
another package. So partial_version_message() now gives way to the "doesn't look like a supported version"
message, which lists the probe sizes, whenever a probe file is present with another size, even if other
files are missing too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manifest_presence() counted every OSError from os.stat() as a missing file, so a probe that raised
PermissionError could be listed as missing with "Finish the download". As in probe_mismatches(), only
FileNotFoundError and NotADirectoryError now count as missing; any other OSError is listed apart as
"cannot read <name> (<reason>)", with advice to make the file readable. "Incomplete copy" and "Finish the
download" appear only when a file is missing or has another size.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
load_version() only looks at the three probe files, so a copy whose download stopped before one of them
was reported as "This doesn't look like a supported version of the game", the same as another game. When
no version matches its probes, the folder is now compared with each manifest by name and size; if it holds
at least half of one version's files with matching sizes, the error names that version, how many files
match, and lists the missing files (with their total size) and the ones with another size. A folder below
half keeps the old message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ensure_submodule() told a user with a ZIP download to
git clone https://github.com/ItsNotRexed/Leonida, which is private since
23 November 2026, and progress_dashboard.py --github read that repository by
default, so its pull-request, CI and coordination panels came back empty.
Both now name ubiquitarianism/leonida, as the README's clone command does.
Two tests tie the hint and DEFAULT_REPO to that README line, so a later move
fails a test instead of a user.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit a837d9a616)
On a case-sensitive file system a package copied with its names changed
in case (microsoftgame.config) was reported as "Missing
MicrosoftGame.Config", with no hint why. The probe now names the
variant it found and says the build opens the package's files by their
exact names. It renames and case-folds nothing; on a case-insensitive
file system the exact name opens and the branch is never reached.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macOS mounts drives and mount_smbfs shares under /Volumes, and Fedora and openSUSE put removable media in
/run/media, so a package on an external disk or on another machine's share never showed up in discovery and had
to be passed to --game. Both roots are now searched, the list moves into discovery_roots() so each platform's
answer is testable, and the --game help says that a share path goes there because it can't be listed.
AI-assisted.
A git checkout without third_party/rpf9-explorer/Core computes the same no-pin digest a source zip legitimately
holds, so records written from that digest matched in preflight; ensure_submodule() then fetches Core, the digest
changes, and assets() deletes those folders. submodule_ready() is now the predicate ensure_submodule() itself uses (a
non-empty Core), and assets_bytes_on_disk() credits no model or texture folder, and hashes nothing, while it is
false. A source zip with a non-empty Core is ready and unaffected (it has no git pin either way).
Tests: matching records with Core missing credit nothing and never hash; submodule_ready needs a non-empty Core;
the cache test now uses a cached stand-in that would match the records, so it fails when the credit calls the cached
decoder_digest(). Each test fails with its guard removed.
Tested: python -I tests/test_make_game_*.py (preflight 87 tests) on CPython 3.12.13, Windows. AI-assisted.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
preflight credits the exports before ensure_submodule() fetches third_party/rpf9-explorer, and decoder_digest() is
cached: a digest made from a missing checkout (no git pin yet) would be the one assets() compares afterwards, so
every folder would look stale and be exported again. The digest is now computed by compute_decoder_digest();
decoder_digest() is its cached wrapper that assets() uses, and assets_bytes_on_disk() calls the uncached one, only
when a folder has a decoder.sha256 (so the free-space fast path and a work folder without exports hash nothing). A
digest that cannot be computed (OSError) credits nothing; an unreadable or mismatching record already credits none.
Tests: the cache stays empty after the credit; an unhashable decoder credits nothing and preflight still answers; no
hashing with room to spare or without exports. The mixed 179/180 tests are unchanged.
Tested: python -I tests/test_make_game_*.py (preflight 85 tests) on CPython 3.12.13, Windows. AI-assisted.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review of #4320: dropping the whole-tree walk removed the credit for a stopped model/texture step that rpf9dump
resumes. assets() keeps a folder only when its decoder.sha256 matches the current decoder (else it deletes the folder
and exports again), and rpf9dump skips every output that already exists; Util.WriteAtomic leaves only complete files
under their final names and deletes a leftover *.partial. assets_bytes_on_disk now credits a model or texture folder,
finished or not, exactly when its fingerprint matches, once, without *.partial files. A folder with another or no
fingerprint is credited nothing, which also stops crediting a finished step that assets() would delete. Pools, audio
and the other steps are unchanged: only finished output counts, the conservative choice.
Mixed resume (96 GiB finished models + 54 GiB unfinished textures): 180 GiB is accepted, 179 refused (234 before).
Tests: the mixed 179/180 case, a mismatching fingerprint on the unfinished and on the finished step, and --wav;
sizes come from a faked os.scandir, nothing large is written.
Tested: python -I tests/test_make_game_*.py on CPython 3.12.13, Windows. AI-assisted.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#4279 added a whole-tree credit (tree_bytes) next to the finished-step credit from d49b8e78 (assets_bytes_on_disk),
so output of finished steps lowered the estimate twice: 150 GB finished with 60 GB free passed although 180 GB is
needed. The finished-step credit already covers a stopped export and deliberately leaves out steps without a
manifest or marker, which the rerun writes again, and it only walks the folder when space is short. Drop tree_bytes
and its branch; the complete-assets (xma.done), shaders-reuse and --wav paths are unchanged.
Tests: the two #4279 tests that mocked or exercised tree_bytes are replaced by one that fails before this change.
Tested: python -I tests/test_make_game_preflight.py (78 tests) on CPython 3.12.13, Windows. AI-assisted.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The preflight asked for all 300 GB of the assets stage free unless xma.done said the exports were finished, so a
build stopped part-way through the assets (279 GB written, 280 GB free) refused to resume. tree_bytes() sums what
is already under <work>/assets and the preflight subtracts it. Two tests: the subtraction and tree_bytes itself.
Tested: python3 -I tests/test_make_game_preflight.py (67 tests); a real resume on Fedora 43 that had been refused.
AI-assisted.
- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewers on #3371 (paratustra, Maraco91) pointed out that with Git
installed the old text still said "Install Git", and that a failed
'git submodule update' in a real clone (offline, proxy) was reported as
a ZIP download. Each case now gets its own message, with tests.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A "Download ZIP" from GitHub leaves out the submodule, and the error
said "git clone --recursive <this repository's URL>" with a literal
placeholder, which left non-developers stuck (#3276).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #2790: the discount counted every regular file under <work>/assets,
so unrelated files or a step that stopped before its marker could let a short
drive through, and an NTFS junction (is_dir(follow_symlinks=False) is true for
one) was walked and counted.
assets_bytes_on_disk() now counts only the output of steps assets() skips on a
rerun: an archive's models/textures folder with its manifest.json, a texture
pool whose manifest ttpf_manifest() accepts, the audio banks once
audio_manifest.json exists, and audio/ogg or audio/xma once their .done marker
is there. Symbolic links and junctions are skipped, including <work>/assets
itself.
On a real stopped export the credit drops from 319.0 to 294.6 GiB; the
difference is the audio bank step that stopped before its manifest.
#2857's paragraph claimed deleting the .s files alone leaves the stage with
zero shaders, but the translated spirv/index.json is what makes the stage
reusable first; only deleting both (or an empty folder matching vacuously)
gets there. The symlinked-disasm refusal happens when the stage clears the
folder, not on every run, and --overlay belongs to gta6rt, not make_game.py.
Add the missing preflight test: with --wav, exported assets are still counted
because the decode writes again, so 250 GB free fails with the run-only hint;
without --wav the same work folder passes.
Found by @tupacfan04.
#905 leaves the assets stage's 300 GB out of the space check only when the
export finished (xma.done). A run stopped after the models, textures and most
texture pools still asked for the full 330 GB, so a drive that already held
270 GB of that export and had 205 GB free refused to resume, although the
stage skips every finished step.
When the free space is short and the assets stage is selected, preflight now
subtracts the whole GB already under <work>/assets (capped at the 300 GB
estimate) and logs it. assets_bytes_on_disk() is one os.scandir walk that
does not follow links; it runs only in that short-on-space case. A fresh
folder still needs the full amount, and --wav still counts the whole
estimate, as in #905.