Eleven tools treated a nonexistent input folder as a failed run (1). They now print one ERROR line and return 2, while real read failures keep exit 1. image_query_probe imports the hardware oracle only for a GPU run, so --help stays prompt. A table-driven subprocess test covers all eleven; existing expectations are updated.
- docs: one row per topic again in design.md (59 topics merged sentence by sentence, keeping every
number) and README.md (the current models/character rows); one Other languages line.
- docs/i18n: the two Spanish quickstarts had been concatenated; keep #1912's, drop #2277's row.
- make_game: the shader fingerprint covers spirv_asm.py and its tables; LF settings write.
- tools: pe_shader_containers, gamedata_maps and anim_rigs use report_paths.same_report_path (BUILD-589);
stdout guard on five tools; LF text writes in three; user_sgpr_census tolerates an unreachable --json.
- tests: fspx stage fakes write real carve/unpack indexes (c7408a1f); typed f16 stores round toward zero
(SHADER-358); test_ci_registration's helper is no longer collected as a test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both tools joined a following stream only after an exactly 65,536-byte one, the rule #2129 fixed in
text_tables. A resource's first stream can be 128 or 192 KiB (docs/page_directory.md).
- gamedata_index: only the headed `other` branch (0DRP pages and the MAGIC kinds) now continues after
any nonzero multiple of 64 KiB. Binary, text and XML runs keep the exact rule, since nothing proves a
continuation there; applying the multiple rule to them too folded 26,284 payloads into 25,000.
- gamedata_maps: the join is already bounded by the header's declared size, so any whole number of
64 KiB blocks may continue.
Real data (counts only), data.rpf: 0DRP pages keep 15,768 payloads and gain the 50 continuation streams
(15,877 -> 15,927). Those 50 streams stop being separate payloads (43 `binary`, 7 `text`), so the
payloads go 26,284 -> 26,234; psin/rbf0 unchanged. gamedata_maps on two carves without heightmaps:
identical output.
Tests: test_a_resource_continues_after_any_whole_number_of_64k_blocks (a 128 KiB 0DRP page joins its
continuation, a 128 KiB binary run does not) and test_groups_a_continuation_after_a_128k_first_stream
(main: all fail).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Validate --json before scanning <carve_dir> (and again against index.json rows): refuse existing directories and paths colliding with <carve_dir>, <carve_dir>/index.json, or any carved .bin stream (including symlinks, hard links, Windows verbatim prefixes, and macOS APFS/NFD case-only variants). Create missing parent folders before writing JSON with LF line endings. Adds unit tests in tests/test_gamedata_maps.py. No game files.
open(path, "w") without newline= turns each \n into \r\n on Windows, so the same JSON report, manifest or assembly
listing was CRLF there and LF elsewhere. 91 text-mode writes (open, os.fdopen, Path.write_text) under tools/, scripts/,
make_game.py and runtime/test/shaders/ now pass newline="\n". tests/test_text_write_line_endings.py reads the source
with ast and fails for a writer that forgets it; CONTRIBUTING.md names the convention.
AI-assisted (Claude), on behalf of dev-ewann.
On Windows a redirected stdout uses the console's ANSI code page, and python -I ignores PYTHONUTF8 and
PYTHONIOENCODING, so a caller path with a character outside that code page ended a run with
UnicodeEncodeError as soon as a tool printed it. #1406 fixed make_game.py; every CLI tool in tools/ now starts
its __main__ block the same way (stdout errors="replace").
tests/test_tool_stdout_encoding.py checks every tool's __main__ block and reruns two measured crashes
(analyze_4240_full.py, meshlet_page.py) with a private-use-named input. Found by @abilliontokens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
read_payloads() raises TypeError when the carve index's "files" is a
string or null, and main()'s except tuple caught only OSError, ValueError,
KeyError and struct.error. Add TypeError so those shapes print the tool's
one-line error and exit 1 instead of a traceback.
New tests/test_gamedata_maps_bad_index.py covers five malformed index
shapes plus a valid empty carve; main's tool fails the two TypeError
cases as the negative control.
Byte 0x28 is a u8 default height: 23 in both MHIU payloads, the value the
empty rows hold, and the value the encoder crops each row by (0 of 6,902
span ends are 23 although 23 is 82% of cells). The decoder now reads the
default from the header, reports the three following bytes as pad_29 and
counts span ends on the default. A scan of all 12 archives finds 2 MHIU
payloads, both in common.rpf.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both common.rpf payloads are heightmaps, not square/u16 grids. MHIU is a 2048x2048 single-layer map: u16 width@0x06, height@0x08, then height 8-byte row headers {u16 start, u16 count, i32 offset} and packed u8 heights with a measured default of 23. The two measured payloads fill 1,724/1,727 rows and their spans cover the packed bytes with 0 gaps and 0 overlaps; the old zero prefix is the empty rows' headers. PAMH is the GTA HMAP layout stored little-endian (version 1.2): a row table, width*height max u8 rows and width*height min u8 rows. The old u16 reading interleaved the two arrays. Both scale as min.z + value/255 * (max.z - min.z). Cross-check: MHIU vs PAMH max correlates at r=0.861 and r=0.870 in the natural orientation, with land-mask IoU 0.61. The MHIU 0x28 word is still unidentified and is not called a checksum. Tests are synthetic and cover the row table, the default fill, negative offsets, the max/min split and the 64 KiB stream join.
Add a stdlib reader for the two MHIU headers and square byte grids and the PAMH row table plus u16 grid, with synthetic tests and measured header notes. The checksum and the MHIU prefix remain unknown.