tooling: preserve form reference output permissions #2744
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2752"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T05:59:31Z.
AI-assisted backport patch from x2w-microlift.
Atomic report replacement introduced by #2675 changes ordinary POSIX TSV permissions to the temporary file mode (0600). Preserve the destination mode on replacement and the normal umask-derived mode on creation. Windows behavior is unchanged; sibling replacement and cleanup remain intact.
Verification:
bc8e05f8fdon macOS arm64,python3 -B tests/form_reference_cli_check.py: 10 passed in 0.500s, including real child-process umask 0027, new 0640 files, existing 0600/0664/0644 replacements and matching generated contents. Windows-specific runtime and GPU suites were not run; this is a portable tooling-only change.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T06:01:57Z.
Review: COMMENTED
Review of head
bc8e05f8(comment only).Checked:
tools/form_reference.py_write_atomic: the temp file now gets the existing destination mode, or0666 & ~umaskwhen the file is new (POSIX only). Windows path is untouched. Cleanup on error is unchanged.tests/form_reference_cli_check.pytest_child_umask_modes_preserved_by_cli_rewrite: real child process with umask 0027, new files 0640, replaced files keep 0600/0664/0644, contents identical. It guards the behavior.Commands run locally (Linux, worktree at this head):
python3 -B tests/form_reference_cli_check.py: 10 tests OK (needsiced_x86).os.chmodcall makes the new test fail.0o600for new files makes the new test fail.python3 tests/docs_links_check.py: OK.python3 tests/bidi_controls_check.py: OK.git diff --check origin/main...HEAD: clean.Windows runtime was not exercised by this review; the PR only changes tooling.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T06:02:28Z.
Win2025 receipt for head
f1a17be3after updating with main (PR change identical to reviewedbc8e05f8).Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
f1a17be393c351d74fb5e97a32adca5330876c78:tests/form_reference_cli_check.pyok (1.6s)6.9sNote: PYCHECK name=tests/form_reference_cli_check.py rc=0; the new permission test is POSIX-only and skips on Windows (covered on Linux above).
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T06:02:52Z.
Thank you for the independent Linux and mutation checks. Confirmed that the main reconciliation at
f1a17be3preserves the exact two verified patch files. No further changes from me.