The defect
When a workflow uses: ref is absent from actions.lock, the gate emits:
[validate-actions-lock] ERROR: not in actions.lock: github/codeql-action/upload-sarif@1c5b675...
Regenerate with the LOCKFILE ONLY, and verify the *.yml diff is empty:
gh actions-lock <workflow paths> --no-migrate-local-actions --no-narrow
A lock/workflow drift has two possible stale sides, and this message picks one blindly. It always assumes the workflow is right and the lock is behind.
Hit live today (#977 → #978). The lock correctly carried codeql-action@b96794f (v4.38.0); three workflows had been reverted to 1c5b675 (v4.38.1) — a version under an explicit estate hold because it startup-kills workflows (nexia-list#100). Following the prescribed cure verbatim would have written 1c5b675 back into the lockfile, re-legitimising the exact version the #973 incident fix was escaping, and converted a loud gate failure into a silent estate-wide outage.
The correct cure there was the opposite: update the workflows to the SHA the lock already held, and leave actions.lock untouched.
Why it matters beyond this instance
Acceptance criteria
- On a missing-ref error, the gate reports which side is stale rather than assuming — e.g. when the lockfile already holds a different SHA for the same
owner/repo, say so explicitly and name both SHAs.
- In that case the message must not recommend regeneration as the first cure; it should recommend reconciling the workflow ref to the locked SHA, or state that a deliberate upgrade requires changing both.
- A regression test covering the two-sided case: lock holds SHA-A for
owner/repo, workflow references SHA-B → the gate's output names both SHAs and does not prescribe bare regeneration. Mutating the message back to the current text must fail that test.
- No change to the single-sided case (genuinely new action added, lock simply behind), which keeps the existing guidance.
Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01WPSJ7fBhVAMcpSffCBWUDo
The defect
When a workflow
uses:ref is absent fromactions.lock, the gate emits:A lock/workflow drift has two possible stale sides, and this message picks one blindly. It always assumes the workflow is right and the lock is behind.
Hit live today (#977 → #978). The lock correctly carried
codeql-action@b96794f(v4.38.0); three workflows had been reverted to1c5b675(v4.38.1) — a version under an explicit estate hold because it startup-kills workflows (nexia-list#100). Following the prescribed cure verbatim would have written1c5b675back into the lockfile, re-legitimising the exact version the #973 incident fix was escaping, and converted a loud gate failure into a silent estate-wide outage.The correct cure there was the opposite: update the workflows to the SHA the lock already held, and leave
actions.lockuntouched.Why it matters beyond this instance
uses:without regenerating the lock).Acceptance criteria
owner/repo, say so explicitly and name both SHAs.owner/repo, workflow references SHA-B → the gate's output names both SHAs and does not prescribe bare regeneration. Mutating the message back to the current text must fail that test.Related
uses:without regenerating the lock🤖 Generated with Claude Code
https://claude.ai/code/session_01WPSJ7fBhVAMcpSffCBWUDo