Commit Graph

5 Commits

Author SHA1 Message Date
43d470316e Tests: follow #866's file_mode helper and #835's run_cmd(gpu=)
test_glb_atomic still drove glb_writer._output_mode through a fake umask; #866 moved the mode to
file_mode.published_mode, which uses a probe file and never sets the umask, so the test now checks exactly that.
test_run_gpu_wavemask's fake run_cmd takes the gpu= keyword.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:43:52 -05:00
808c947ccf glb_writer: read the umask under a lock
_output_mode reads the umask by setting it to 0 and back, and the umask is
process-wide. Two threads publishing new GLBs could interleave so that the
process stayed at umask 0 and one file got mode 0666. A module lock makes the
set-and-restore atomic for every writer here.
2026-11-22 09:30:14 +05:30
18c8092cc8 glb_writer: a published GLB keeps the replaced file's permission bits
The staging file comes from NamedTemporaryFile, which creates it 0600, so
every GLB written since #425 has been owner-only on Linux. The staging file
now gets the replaced file's mode, or 0666 minus the umask for a new one,
before the replace. Same issue @VictorJulianiR found in rtti_scan (#750).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:55:46 +00:00
7410f5d37f glb_writer: retry a replace hit by a sharing violation; test ab_control_flow's metadata filters
Follow-ups to review points on two merged PRs.

#425 (@SourNuht): write_glb said overlapping writers all publish complete
files, but on Windows os.replace onto the same destination raises
PermissionError while another writer is replacing it. 8 threads x 40 writes
to one path failed 43-152 of 320 calls. A replace that hits PermissionError is
now retried with a short backoff (about 1.3 s in total), Windows only; a lasting
hold still raises and leaves the old file. Other errors are not retried.

#441 (@ToxicmaggotRP): the stage, binding and feature filters were never
reached by the tests (the rejected entries had no files, so they dropped out
earlier), and only dispatch-side instability was tested. Tests only; each of
those filters now fails a test when removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:22:37 +00:00
c671d74fa8 tests: protect GLB staging ownership and overlapping exports
Five synthetic tests cover sibling preservation, failed replacement, deterministic overlapping writes, partial-write cleanup, and missing parent creation. No game data. Windows Python 3.12.14: 73 stdlib scripts, 440 semantic tests, 19 viewer tests pass. AI-assisted (Codex).
2026-11-21 15:42:22 -08:00