test_gen_gdk_runtime_classes imported the POSIX-only resource module at the top, so the whole file failed to import on Windows. Import it guarded and skip the two failed-write tests that need RLIMIT_FSIZE.
test_make_game_plain_logs compared the child's getcwd() with the temp folder as strings; on the Windows runner the temp folder is an 8.3 short name (RUNNER~1) and getcwd() returns the long one. Compare with os.path.samefile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Write the generated JSON to a temporary file in the destination directory, then atomically replace the output. Remove the temporary file on write errors and preserve output permissions.
Before: with 128 synthetic classes and an existing 14-byte output, `bash -c 'trap "" XFSZ; ulimit -f 1; python3 -I tools/gen_gdk_runtime_classes.py /home/hampa/.hermes/profiles/mikuling/cache/scratch/gdk-atomic-repro/docs --out /home/hampa/.hermes/profiles/mikuling/cache/scratch/gdk-atomic-repro/out.json'` returned 1 (Errno 27, File too large); output grew to 1024 bytes (partial JSON).
After: the same command returned 1, left the 14-byte sentinel unchanged, and left no temporary file. Tests against upstream/main: 1 failed, 2 passed; against the fix: 3 passed.