From 910efaad553b99016ec370cb6206e93b103b3a8a Mon Sep 17 00:00:00 2001 From: ruvnet Date: Sun, 3 May 2026 23:04:49 -0400 Subject: [PATCH] ci(hailo): point cache keys at the workspace-root Cargo.lock (iter 227) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iter-219 (workspace re-inclusion, ADR-178 Gap E) removed the per-crate `crates/ruvector-hailo-cluster/Cargo.lock` — but the hailo-backend-audit workflow's two `actions/cache@v4` keys still hashed that now-missing path: key: ${{ runner.os }}-cargo-${{ hashFiles('crates/ruvector-hailo-cluster/Cargo.lock') }} `hashFiles()` returns an empty string when the pattern matches nothing. So both cache keys would have collapsed to the constant prefix `${{ runner.os }}-cargo-` (and `-cargo-test-`) on every run — every PR, every branch, every commit would have shared the same cache slot, defeating the cache invalidation iter-178 set up. Either falsely-stale build artifacts on a dep change, or chronic cache misses depending on how the runners' eviction policy shook out. Fix: point both keys at the workspace-root `Cargo.lock`, which is canonical post-iter-219. Same parallel as iter-224's cargo-audit fix that handled the matching deny-vs-audit drift. Validated: - yaml parses (`python3 -c 'import yaml; yaml.safe_load(...)'`) - root Cargo.lock exists at the new path - Pattern matches GitHub Actions' relative-to-GITHUB_WORKSPACE semantic for `hashFiles()` — Cargo.lock at repo root is correctly resolved without a path prefix. Pure CI hygiene; no code change. Catches the third post-iter-219 side effect (after iter-224's cargo-audit ignores and iter-226's real-hardware verification). Co-Authored-By: claude-flow --- .github/workflows/hailo-backend-audit.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hailo-backend-audit.yml b/.github/workflows/hailo-backend-audit.yml index 1301a52b6..d3081a556 100644 --- a/.github/workflows/hailo-backend-audit.yml +++ b/.github/workflows/hailo-backend-audit.yml @@ -97,7 +97,13 @@ jobs: ~/.cargo/registry ~/.cargo/git crates/ruvector-hailo-cluster/target - key: ${{ runner.os }}-cargo-${{ hashFiles('crates/ruvector-hailo-cluster/Cargo.lock') }} + # Iter 227 — cache key now points at the workspace-root + # Cargo.lock since iter-219 removed the per-crate + # `crates/ruvector-hailo-cluster/Cargo.lock`. Keeping the + # stale reference would have resolved to an empty hash via + # `hashFiles()` of a missing path, collapsing every branch's + # cache to the same key → false hits on unrelated trees. + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} - name: Run clippy working-directory: crates/ruvector-hailo-cluster run: cargo clippy --all-targets -- -D warnings @@ -116,7 +122,8 @@ jobs: ~/.cargo/registry ~/.cargo/git crates/ruvector-hailo-cluster/target - key: ${{ runner.os }}-cargo-test-${{ hashFiles('crates/ruvector-hailo-cluster/Cargo.lock') }} + # Iter 227 — workspace-root Cargo.lock (see clippy job). + key: ${{ runner.os }}-cargo-test-${{ hashFiles('Cargo.lock') }} - name: Run all suites working-directory: crates/ruvector-hailo-cluster run: cargo test