Skip to content

Commit bf9b899

Browse files
hyperpolymathclaude
andcommitted
fix(ci): remove invalid job-level hashFiles guard from cargo-audit
The job carried `if: hashFiles('Cargo.lock') != ''`. That is wrong twice over. `hashFiles` resolves against GITHUB_WORKSPACE, which does not exist at job-evaluation time — before any checkout — so at job level it can never see a file that is in the repository. And the run did not SKIP, it FAILED: zero jobs, no annotation, the startup_failure shape. The expression was rejected outright rather than evaluating false. Measured failing on main as well as on this branch, since at least 2026-07-03, so this is pre-existing and not introduced here. The guard is unnecessary in this repository anyway: vcl-ut has a committed root Cargo.lock. A repository that genuinely needs it should put it on the steps after checkout, where hashFiles can see the tree — recorded in a comment, since this file is template-shared across the estate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 37b7ab6 commit bf9b899

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/cargo-audit.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,19 @@ jobs:
2222
name: Dependency audit
2323
runs-on: ubuntu-latest
2424
timeout-minutes: 15
25-
if: hashFiles('Cargo.lock') != ''
25+
26+
# NOTE: this job previously carried `if: hashFiles('Cargo.lock') != ''`.
27+
# That guard was wrong in two ways. `hashFiles` resolves against
28+
# GITHUB_WORKSPACE, which does not exist at job-evaluation time — before
29+
# any checkout — so at job level it could never report a file that is in
30+
# the repository. And the run did not skip, it FAILED, with zero jobs and
31+
# no annotation: the expression was rejected outright rather than
32+
# evaluating false. Measured on main as well as on this branch, failing
33+
# since at least 2026-07-03.
34+
#
35+
# The guard is also unnecessary here: vcl-ut has a committed root
36+
# Cargo.lock. A repository that genuinely needs the guard should place it
37+
# on the steps AFTER checkout, where hashFiles can actually see the tree.
2638

2739
steps:
2840
- name: Checkout repository

0 commit comments

Comments
 (0)