From 18dbf4b4a69e6c37fc08d3d2978e2a497914af07 Mon Sep 17 00:00:00 2001 From: milyord <872264+milyord@users.noreply.github.com> Date: Thu, 19 Mar 2026 13:51:03 -0700 Subject: [PATCH] fix(ci): add concurrency control to prevent race in hash updates Multiple concurrent workflow runs on the same branch can race to commit hashes.json. When an older commit's run finishes after a newer commit's run, stale hashes overwrite correct ones. Add concurrency group per-branch with cancel-in-progress to ensure only the latest commit's hashes are computed and committed. --- .github/workflows/nix-hashes.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nix-hashes.yml b/.github/workflows/nix-hashes.yml index 2529c14c208..bfb86cf301a 100644 --- a/.github/workflows/nix-hashes.yml +++ b/.github/workflows/nix-hashes.yml @@ -17,6 +17,10 @@ on: - "patches/**" - ".github/workflows/nix-hashes.yml" +concurrency: + group: nix-hashes-${{ github.ref }} + cancel-in-progress: true + jobs: # Native runners required: bun install cross-compilation flags (--os/--cpu) # do not produce byte-identical node_modules as native installs.