fix(ci): repair dead $/ ref and the pin detector blind to it - #931
Merged
Merged
Conversation
signed-push-smoke.yml has been dead at STARTUP on main. Line 56 read
`uses: $/.github/actions/signed-push`, which is not valid `uses:` syntax,
so the workflow never ran a job. Its last five runs on main are all
`failure` and the most recent is 2026-08-24 — a month of silence.
`validate-sha-pins.sh` should have caught it and did not. Two defects,
the second hiding the first:
1. The selector required a ref to start `[A-Za-z0-9]`. `$` is not
alphanumeric, so the line was dropped before any exemption arm saw it.
2. The cure previously attempted for (1) added a SECOND grep inside the
same brace group: `{ grep A ... ; grep B ; } < "$file"`. Both greps
share one stdin; the first reads it to EOF and the second is handed an
exhausted stream. Measured: arm 2 matches line 56 in isolation and
emits nothing in place. It was dead code that made the gate look fixed,
and its comment asserted "zero matches tree-wide today; this arm is
purely prospective" — false the whole time. That comment was mine and
this commit retracts it.
Cure: one pipeline, first selector widened to any non-blank ref, dead arm
deleted. An unknown-shaped ref is now REPORTED; the exemptions (`./`,
`../`, `docker://`, 40-hex pins) remain the only way out and each is
explicit. A `$/` hit is diagnosed as invalid syntax causing startup
death, not as an unpinned ref — the old wording sent the reader hunting a
SHA that was never the problem.
Mutant kill, both directions, denominator printed each time:
defect present -> rc=1, 78 scanned / 92 vendored excluded, 1 finding,
reported on signed-push-smoke.yml:56
defect cured -> rc=0, 78 scanned / 92 vendored excluded, 0 findings
No new findings on the other 77 files, so the widened selector adds no
false positives. `bash -n` clean; the workflow still parses as YAML.
Non-destructive: read-only verification only, no auto-fix flags, no
source or core logic touched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR
Contributor
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This was referenced Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



A workflow has been dead at startup on
mainfor a month, and the gate that should have caught it could not fireThe defect
.github/workflows/signed-push-smoke.yml:56onmainreads:$/...is not validuses:syntax. GitHub rejects the workflow at startup, so no job of it ever runs — this is not a failing step, it is a workflow that never begins. Measured:Five failures, and the most recent is 2026-08-24 — the signed-push smoke test has been silent for a month. This is the
gh actions-lockrewrite-mode corruption already on record (it also de-pinned 24 SHAs); the correct form for a local action isuses: ./.github/actions/<name>.Why
validate-sha-pins.shreported a clean tree over itTwo defects, and the second hid the first.
1 — the selector was too narrow. It required a ref to start
[A-Za-z0-9].$is not alphanumeric, so the line was dropped before any exemption arm saw it. The ref was never reported and the gate went green.2 — the cure attempted for (1) was dead code. A second grep was added inside the same brace group:
{ grep -nE '...[A-Za-z0-9]' | grep -v ... || true; grep -nE 'uses:[[:space:]]+\$/' || true; } < "$file"Both greps share one stdin. The first reads it to EOF; the second is handed an exhausted stream. Measured directly:
A second reader of one stdin is never a second chance.
Retraction
That arm's comment asserted "Zero matches tree-wide today; this arm is purely prospective." That claim was mine and it was false:
signed-push-smoke.ymlcarried a live$/ref the entire time. I am retracting it here. It was true only of the feature branch I measured on;mainwas never checked. This is also why the$/exemption proposed in66f26bfewas the wrong direction — it would have taught the detector to wave through real, live corruption on the default branch rather than catch it.The fix
One pipeline, no brace group. The first selector now matches any non-blank ref, so an unknown-shaped ref is reported rather than silently skipped. The exemptions —
./,../,docker://, and a full 40-hex pin — remain the only way out, and each is explicit. The dead second arm is deleted.A
$/hit is now diagnosed as invalid syntax causing startup death, not as an unpinned ref. The old wording sent the reader hunting a SHA that was never the problem.Mutant kill — both directions, denominator printed each time
No new findings on the other 77 files, so the widened selector introduces no false positives.
bash -nclean; the workflow still parses as YAML; zero$/refs remain tree-wide.Scope and safety
Two files, +42/−15. Read-only verification only — no auto-fix flags, no source or core logic touched, no credential inlined.
.github/workflows/signed-push-smoke.yml$/→./.githooks/validate-sha-pins.shUNPINNED_FILTERcollapsed to one pipeline, selector widened, dead arm removed, precise diagnosis addedFollow-up debt found while measuring this is being filed as separate issues, per the standing rule that a new scanner finding is an issue and not a blocker.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR