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>
_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.
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>
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>