compose() built its Counter by iterating a set of harvested strings and then took most_common(N),
so words with equal counts were chosen in hash iteration order: twenty words counted once and
--compose 6 picked a different six per run, and a key only that vocabulary could compose resolved
in some runs and not others. Rank by (count, word) instead, and cover the order-independence, the
tie rule and five repeated CLI runs.
`collect nope.jsav`, `resolve nope.jsav --dict d.txt` and `resolve save.json --dict nope.txt` ended in a
FileNotFoundError traceback. Both commands now print `error: <path>: <reason>` and return 1, as `resolve`
already does for an --out it cannot write.
Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
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>
`resolve --out names.txt --dict names.txt` replaced the user's local
dictionary with the JSON report (exit 0, no warning); a save, a file found
in an input folder, or a hard link to either was replaced the same way.
An --out in a missing folder ended in a FileNotFoundError traceback after
the whole resolve (and --compose) had run.
resolve now checks --out before reading anything: it refuses a path that
is the same file (os.path.samefile) as any input file or --dict path, and
a missing folder, each as one error line with exit 1. A write that still
fails is reported the same way. input_files() lists the files iter_inputs
reads, so the check and the reader agree on folder inputs.
Tests: tests/test_save_keys.py 19/19 (2 new, synthetic names and saves);
the new cases fail on main (5 subtest failures). No game files, no GPU.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IDENT had its length bound inside the pattern ({1,80}), so a longer run of identifier characters was cut after 81
and the search went on in what was left: one 89-character name became an 81-character prefix and a tail that
nobody wrote, and the real name was never hashed against the save keys. The pattern now takes the whole run, and
a run past 255 characters (an encoded blob, not a name) is left out whole. hashdict.py already reads names this
way.
tests/test_save_keys.py: four tests, all fail on the old code. Synthetic inputs only.
iter_inputs only took .json, .bin and extensionless files from a folder, so collect and resolve silently skipped
the JSAV/ASAV saves they document as their input. Extensions now match case-insensitively.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The $0x... keys in JSAV blocks and ASAV settings are the case-sensitive joaat
(seed 0, no lower-casing) of engine/script names, the same rule as the member
hashes in docs/world_names.md. Found from structure: the group keys hash names
derived from the clear-text JSON wrappers.
tools/save_keys.py collects the distinct keys from saves or extract folders and
resolves them against strings harvested from any local files (raw bytes and
zlib streams), reporting per hash family how many keys resolve and how many
are expected by chance; --compose N adds one/two-word names. On the sample set
278 of 1,059 keys resolve with joaat over the game's own data archives; every
other family stays at chance level. Only counts are documented; names stay local.
Synthetic tests only (tests/test_save_keys.py).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>