Files
loki/scripts/ci
GandClaude Opus 5 3dcfe4bf18 fix(ci): the audit never looked at steps written as - uses: (#429)
* fix(ci): the audit never looked at steps written as `- uses:`

`^\s*uses:` matches a `uses:` that is the first key on its line. A step in the
compact list form — `- uses: actions/checkout@v5` — has a dash in front and was
never matched, so the audit skipped it while printing a ref count that made it
look like it had checked everything.

Measured across the fleet before the fix: 59 of 155 workflow files contained at
least one reference the audit never looked at.

Nothing was broken by it, and the reason is worth recording. A job-level
`uses:` — the reusable-workflow call, the thing all three outages came through
— is a mapping key and never a list item, so it was always matched. Only
step-level action references were invisible, and today those are five
third-party refs (actions/checkout, actions/labeler, pnpm/action-setup) which
all resolve. No bitbaum-owned reference is currently written as a step.

So this is a latent hole, not a live outage: the moment a fleet-owned action is
referenced as a step — the natural way to write one — it would be invisible to
precisely the check built to catch it.

Found by auditing the audit for its own class: a reference that resolves for
every tool you would check it with, but not for the consumer that uses it. Here
the consumer was the gate itself.

Mutation-proven: reverting the dash fails the compact-form test, restoring it
passes. Coverage widened from 24 to 26 distinct refs against the real fleet,
still green, no false positives. Suite is 26 assertions.

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

* fix(ci): push the actual regex fix, not the mutation of it

The previous commit on this branch shipped the MUTATED lib. A verification
script copied the deliberately-broken variant back over the file being pushed
(the restore put back only the copy under ci/, not the one at the top level),
so the branch carried the dash-less regex while the test asserting the dash
went with it.

CI caught it immediately, which is the point: the test written alongside the
fix is what proved the fix was absent. A gate that only ever sees the intended
input would not have.

Rebuilt from main plus the single intended edit, and the artifact is checked
for the dash before the push rather than after.

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

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 20:09:20 +02:00
..