Skip to content

release-tools: run the tools determinism check on every host (part of #14231) - #14269

Draft
TrapsterDK wants to merge 1 commit into
mainfrom
rt-determinism-14231
Draft

TrapsterDK wants to merge 1 commit into
mainfrom
rt-determinism-14231

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Part of #14231.

  • release-tools.yml: the tools job's //tools/testing:determinism_check moves out of its linux-*) arm and runs on all four hosts; on Windows --bazel gets cygpath -w "$(command -v bazel)" via bazel_bin.
  • evidence.yml: same bazel_bin conversion so relocate=true task=build works on Windows.
  • tools/ci/release_tools_workflow_test.rs: TOOLS_DETERMINISM uses $bazel_bin; new tools_check_runs_on_every_host.
  • .github/workflows/README.md: wording updated.

Evidence (macos_arm64, windows_x86_64, the four Rust tools): pending, run 44824310234.
Timeout (release-tools.yml:27): pending the measured first:/second: times from that run; stays 90 unless 3×N + 15 min exceeds it.

Remaining for #14231: haskell and hackage macOS/Windows legs (#14268); a release.yml dry run with green macOS/Windows tools legs.

Local: bazel test //tools/ci:workflow_files_test //tools/testing:determinism_check_test passed. No nested-Bazel or consumer tests run locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 20, 2026
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Evidence run 44824310234 (macos_arm64 and windows_x86_64): both legs ran the determinism check twice. Neither is green.

Timings: macOS first 197s / second 155s; Windows first 256s / second 198s. N = 256s, so 3N+15 min ≈ 28 min. That is under 90, so the timeout-minutes: 90 stays.

windows_x86_64: 82 actions differ. These are Rustc .exe/.pdb/.dll/.rlib outputs for build scripts and proc macros in dx_quality_crates, plus the CargoBuildScriptRun outputs for tree-sitter, tree-sitter-ocaml (out_dir) and winapi (flags). Root causes found in the code:

  1. Rust links on Windows go through msvc_link only when msvc_opt is set, and only for the dx Rust macros (rust/private/defs.bzl:44-48,117-123). msvc_link copies rustc temp files (rustcXXXX) to a fixed path and rewrites the execroot. Without it, links in fastbuild, in the exec config and in crate_universe crates write PDBs that hold the random rustc temp dir and the absolute output base. Since the GUID comes from the PDB, the exe/dll differ as well. The fix has to reach every Windows Rust link: either rules_rust rust_toolchain.linker / linker_preference on the dx_rust_toolchains and rust_toolchains Windows toolchains, which rust_register_toolchains does not expose today (so a rules_rust patch), or a global linker wrapper.
  2. rust/private/build_script_cc_env.bzl:151 sets DX_BS_CFLAGS to "" on msvc, so cc-rs objects (tree-sitter) keep absolute paths. They need /clang:-ffile-prefix-map=${pwd}=. when the cc toolchain is clang-cl. The cl.exe toolchain in cc/private/toolchain/msvc must not receive that flag.

macos_arm64: 1 action differs. //rust/private/tools/topiary:dx_topiary_upstream Rustc. The cause is not found yet. It is the only tool among the four that links cc-rs C objects (tree-sitter grammars), so the suspects are __FILE__ or absolute paths in those objects, or the debug map. The next round needs the two exec logs and outputs uploaded (determinism_check diff) to confirm it.

Both fixes change the Rust toolchain or linker for every Windows Rust build. That needs a design decision, so this PR stays a draft until they land.

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Merged main (c46ebcd). Conflicts in release-tools.yml, release_tools_workflow_test.rs and .github/workflows/README.md: the moved tools determinism_check uses main's ${flags[@]+"${flags[@]}"} expansion with $bazel_bin; the README keeps main's release-cells timeout sentence and this PR's "every leg of its tools job". Local: bazel test //tools/ci:workflow_files_test //tools/testing:determinism_check_test passed.

Still blocked: run 44824310234 found 82 differing Rust actions on windows_x86_64 (PDB paths outside msvc_link, cc-rs objects without a prefix map) and one on macos_arm64 (dx_topiary_upstream). Those need a Windows Rust linker change before this check can run on every host.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hw4aq9a55MtjjUhEzN

…14231)

The tools job's determinism_check runs on all four hosts; on Windows
--bazel gets the native path through cygpath. evidence.yml does the same
for relocate=true task=build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hxcqqAoDeuSr83mscS
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Rebased onto main (5bf6454) as one commit; README conflict resolved keeping main's go job text. bazel test //tools/ci:workflow_files_test //tools/ci:actionlint_test //tools/testing:determinism_check_test passed.

Stays draft: Windows Rust determinism (82 actions in run 44824310234) needs #14574 (clang-cl build-script prefix map) and a Windows Rust PDB/link fix; macOS dx_topiary_upstream still differs. It also needs the owner's release.yml dry run.

🤖 Generated with Claude Code

TrapsterDK added a commit that referenced this pull request Nov 23, 2026
…art of #14268)

Same change as #14269 so macOS and Windows determinism evidence can run for haskell and hackage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant