From f27139f8c32ad5e83ab5c8f9d432c5b37321f52b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 01:03:31 +0000 Subject: [PATCH 1/3] vendor: scripts/check-lock-sync.sh verbatim from hyperpolymath/rsr-template-repo@6e7762f Byte-for-byte copy (sha256 3151d3b1bd474dbfe065fc7971ceac009abfa40f17fdc731f987397856e4a8a0, mode 100755) for the de-onboard re-sync. Staging branch only; the squabbler thread builds the PR on top. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDj7XpKyxE4WbsgTsTh --- scripts/check-lock-sync.sh | 380 +++++++++++++++++++++++++++++++++---- 1 file changed, 346 insertions(+), 34 deletions(-) diff --git a/scripts/check-lock-sync.sh b/scripts/check-lock-sync.sh index 02c5e10..4c59ced 100755 --- a/scripts/check-lock-sync.sh +++ b/scripts/check-lock-sync.sh @@ -2,15 +2,36 @@ # SPDX-License-Identifier: MPL-2.0 # # check-lock-sync.sh — verify .github/workflows/actions.lock is in sync with the -# workflow YAML, in BOTH directions (including job-level reusable-workflow refs), +# workflow YAML, in BOTH directions (step actions; job-level reusable-workflow refs may stay outside the lock), # AND that the lockfile is TRANSITIVELY CLOSED. # -# Three clauses, each of which alone is insufficient: +# Validation clauses, each of which alone is insufficient: # -# 1. every `uses:` in a workflow is locked under THAT workflow's own path; +# 1. every step-action `uses:` in a workflow is locked under THAT workflow's own path +# (a ref used ONLY as a job-level reusable-workflow target is exempt: it may +# stay a SHA pin outside the lock); # 2. every lockfile entry is still referenced by its workflow (no orphans); # 3. every ref NAMED anywhere in the lockfile resolves to a top-level # `dependencies:` record — the lockfile has no dangling edges. +# 4. every workflow file has a lockfile entry, even when it uses no actions; +# 5. dependency ref metadata is a string naming a short branch/tag, never a +# SHA or placeholder, and matches its key unless that key is a full SHA. +# One measured exception: a record that is ONLY the target of job-level +# reusable-workflow calls (`uses: o/r/.github/workflows/x.yml@`), +# never a step action and never a nested `uses:` of another record, may +# carry its own SHA as ref:. Such a reusable has no tag to name, and +# GitHub runs it: hyperpolymath/secret-types main at d1d843b, Governance +# run 41678782554 (2026-11-03), every job past "Set up job" with +# metadatastician/standards@46ee183 recorded as ref: 46ee183... . The +# action case stays refused (Protoctist.jl#18; metadatastician/lintel#15); +# 6. the lockfile version is the supported v0.0.3 format; +# 7. a gate caller with a comment line containing `DE-ONBOARDED from actions.lock` +# (the marker the suite's caller templates ship) has an EMPTY entry: +# its own job-level reusable call needs no lock entry (clause 1 is +# satisfied even if another workflow uses the same owner/repo@ref as a +# step action), and an entry listing that reusable is FLAGGED. The marker +# is read from each workflow, not from a list. Unmarked workflows keep +# clauses 1-6 exactly as before. # # Clause 3 is not decoration. It is the clause that catches the failure mode that # clauses 1 and 2 are structurally blind to, and it was added only after that @@ -32,13 +53,13 @@ # * a job-level ref ABSENT from the lockfile entirely is HARMLESS; # * a ref PRESENT in the lockfile but unresolvable is FATAL. # So adding entries without closing them is strictly worse than adding nothing. -# Clause 1 demands entries be added; only clause 3 makes that demand safe. Shipping +# Clause 1 therefore does NOT demand job-level entries; where they are present, only clause 3 makes them safe. Shipping # clause 1 without clause 3 actively steers a developer into the fatal state: # Dependabot bumps a job-level ref -> clause 1 reds -> `gh actions-lock` is blind to # job-level refs and will not backfill -> the developer hand-adds the workflows: # entry to get green -> no dependencies: record -> CI dies silently, gate green. # -# Exit 0 only when all three clauses hold. Any violation exits 1. There is no +# Exit 0 only when all clauses hold. Any violation exits 1. There is no # warn-only mode: a desync means GitHub refuses to start the run, so it must fail # the job. A `::warning::` cannot fail a job and would be a vacuous gate. @@ -47,31 +68,27 @@ set -euo pipefail WF_DIR="${1:-.github/workflows}" LOCK="$WF_DIR/actions.lock" -# gawk is required: the parser uses 3-argument match(), a GNU extension. mawk -# (the Debian/Ubuntu default `awk`) does not support it, and a silent parse -# failure here would read as a clean pass - the exact failure mode this script -# exists to prevent. Probe it rather than trusting the name. +# Portable POSIX awk: avoids GNU gawk's 3-argument match() extension so the +# gate runs identically on Debian/Ubuntu minimal images (mawk) and gawk. AWK="" -for cand in gawk awk; do - if command -v "$cand" >/dev/null 2>&1 \ - && echo x | "$cand" '{ if (match($0, /(x)/, m) && m[1] == "x") exit 0; exit 1 }' 2>/dev/null; then +for cand in gawk mawk awk; do + if command -v "$cand" >/dev/null 2>&1; then AWK="$cand"; break fi done -if [[ -z "$AWK" ]]; then - echo "check-lock-sync: FATAL: no awk supporting 3-argument match() (need gawk)" >&2 - echo "check-lock-sync: install it with: sudo apt-get install -y gawk" >&2 +if [ -z "$AWK" ]; then + echo "check-lock-sync: FATAL: no awk found on PATH" >&2 exit 1 fi -if [[ ! -f "$LOCK" ]]; then +if [ ! -f "$LOCK" ]; then echo "check-lock-sync: FATAL: no lockfile at $LOCK" >&2 exit 1 fi shopt -s nullglob mapfile -t WORKFLOWS < <(printf '%s\n' "$WF_DIR"/*.yml "$WF_DIR"/*.yaml | sort -u) -if [[ "${#WORKFLOWS[@]}" -eq 0 ]]; then +if [ "${#WORKFLOWS[@]}" -eq 0 ]; then echo "check-lock-sync: FATAL: no workflow files under $WF_DIR" >&2 exit 1 fi @@ -103,40 +120,188 @@ function ck(r, at, s) { return tolower(substr(r, 1, at - 1)) substr(r, at) } +# Full commit identities supported by the upstream resolver (SHA-1/SHA-256). +# Keep the length checks separate from the regex for POSIX awk/mawk. +function fullsha(r) { + return r ~ /^[0-9a-fA-F]+$/ && (length(r) == 40 || length(r) == 64) +} + +# The v0.0.3 schema requires a string, not a YAML null, boolean, number or +# collection. Recognize plain single-line names without coercing those types +# into strings. Quoted names are handled separately, so e.g. "null" and +# "123" remain eligible literal refs. Tags/anchors/block scalars are outside +# the generated lockfile format; quote a literal name instead. +function plainstring(r, n) { + if (r == "" || r ~ /^(~|null|Null|NULL|true|True|TRUE|false|False|FALSE)$/) return 0 + if (r ~ /^[#&*!|>\[{]/ || substr(r, 1, 1) == "`" || substr(r, 1, 1) == "@") return 0 + n = r + gsub(/_/, "", n) + if (r ~ /^[-+0-9.]/ && (n ~ /^[-+]?([0-9]+(\.[0-9]*)?|\.[0-9]+)([eE][-+]?[0-9]+)?$/ || + n ~ /^[-+]?0[xX][0-9a-fA-F]+$/ || + n ~ /^[-+]?0[oO][0-7]+$/ || + n ~ /^[-+]?0[bB][01]+$/ || + n ~ /^[-+]?\.(inf|Inf|INF)$/ || n ~ /^\.(nan|NaN|NAN)$/)) return 0 + return 1 +} + +# Check short named-ref syntax without network access. Git allows one-level +# names for branches/tags, but lock metadata forbids the refs/ namespace +# prefix; see upstream lockfile.ValidEntryRef. Angle brackets +# are additionally rejected here because lock metadata must not be a template +# marker such as . Existence and commit resolution remain upstream +# checks; this gate does not claim to prove them from a name alone. +function namedref(r, count, part, j) { + if (index(r, "refs/") == 1) return 0 + if (r == "" || r == "@" || r ~ /[[:cntrl:] ]/ || r ~ /[~^:?*\\]/ || index(r, "[")) return 0 + if (index(r, "<") || index(r, ">") || index(r, "..") || index(r, "@{") || index(r, "//")) return 0 + if (r ~ /^\// || r ~ /\/$/ || r ~ /\.$/) return 0 + count = split(r, part, "/") + for (j = 1; j <= count; j++) + if (part[j] ~ /^\./ || part[j] ~ /\.lock$/) return 0 + return 1 +} + +# Same-length copy of a line with the CONTENT of every quoted scalar blanked to +# "_". `{uses: x}` inside `run: "echo '{uses: x}'"` is shell data, not a flow +# mapping, and must not be read as a step. A quote only opens at a token +# boundary, so an apostrophe inside a word (`it's`) swallows nothing. +function shape(s, out, i, c, q, p) { + out = ""; q = "" + for (i = 1; i <= length(s); i++) { + c = substr(s, i, 1) + if (q != "") { if (c == q) { q = ""; out = out c } else out = out "_" } + else if ((c == "\"" || c == "\047") && (i == 1 || substr(s, i - 1, 1) ~ /[[:space:]{\[,:]/)) { q = c; out = out c } + else out = out c + } + return out +} + +# Items of a one-line flow sequence `... [ 'a@v1', "b@v2", c@v3 ]`, joined with +# \034 (unit separator) after quotes and padding are stripped. Refs contain no commas. +function flowitems(s, n, parts, k, v, out) { + sub(/^[^[]*\[/, "", s); sub(/\].*$/, "", s) + n = split(s, parts, ",") + out = "" + for (k = 1; k <= n; k++) { + v = parts[k] + gsub(/^[[:space:]]+|[[:space:]]+$/, "", v) + gsub(/^["\047]|["\047]$/, "", v) + if (v != "") out = out (out == "" ? "" : "\034") v + } + return out +} + # ---------- pass 1: the lockfile ---------- FILENAME == lockfile { + if ($0 ~ /^version:[[:space:]]*/) { + verline = $0 + sub(/^version:[[:space:]]*/, "", verline) + sub(/[[:space:]]*$/, "", verline) + has_version = 1 + lock_version = verline + next + } if ($0 ~ /^workflows:[[:space:]]*$/) { inwf = 1; indep = 0; next } if ($0 ~ /^dependencies:[[:space:]]*$/) { inwf = 0; indep = 1; next } if ($0 ~ /^[a-z_]+:/) { inwf = 0; indep = 0; next } - # --- the dependencies: section, for clause 3 --- + # --- the dependencies: section, for clause 3 & self-SHA ref guard --- if (indep) { # " 'owner/repo@ref':" -- a top-level dependency record - if (match($0, /^ '([^']+)':/, m)) { - depkey = m[1] + if ($0 ~ /^ \047[^\047]+\047:/) { + depkey = $0 + sub(/^ \047/, "", depkey) + sub(/\047:.*$/, "", depkey) haverec[ck(depkey)] = 1; disp[ck(depkey)] = depkey + rawrec[depkey] = 1 + next + } + # " ref: '...'" -- the record needs a real branch/tag name, even + # when its dependency key and commit: are correctly pinned to a SHA. + if ($0 ~ /^ ref:/ && depkey != "") { + rval = $0 + # Preserve the separator before # until comments are stripped: a + # comment-only value is YAML null, not a branch named #missing. + sub(/[[:space:]]+#.*$/, "", rval) + sub(/^ ref:[[:space:]]*/, "", rval) + sub(/[[:space:]]*$/, "", rval) + hasref[depkey] = 1 + quote = substr(rval, 1, 1) + if (quote == "\047" || quote == "\042") { + # Match one complete scalar: inner single quotes must be doubled, + # and an unescaped double quote must end a double-quoted scalar. + if ((quote == "\047" && rval !~ /^\047([^\047]|\047\047)*\047$/) || + (quote == "\042" && rval !~ /^\042([^\042\\]|\\.)*\042$/)) { + invalidref[depkey] = rval + next + } + rval = substr(rval, 2, length(rval) - 2) + if (quote == "\047") gsub(/\047\047/, "\047", rval) + } else if (!plainstring(rval)) { + invalidscalar[depkey] = (rval == "" ? "" : rval) + next + } + keyref = substr(depkey, index(depkey, "@") + 1) + if (fullsha(rval)) { + selfsha[depkey] = rval + } else if (!namedref(rval)) { + invalidref[depkey] = (rval == "" ? "" : rval) + } else if (!fullsha(keyref) && rval != keyref) { + mismatchref[depkey] = rval + } next } # " - 'owner/repo@ref'" -- a nested uses: of that record - if (match($0, /^ - '([^']+)'/, m) && depkey != "") { - r = ck(m[1]); disp[r] = m[1] + if ($0 ~ /^ - \047[^\047]+\047/ && depkey != "") { + val = $0 + sub(/^ - \047/, "", val) + sub(/\047.*$/, "", val) + r = ck(val); disp[r] = val want[r] = 1 wantsrc[r] = wantsrc[r] " dependencies:" depkey next } + # " uses: ['a@v1', 'b@v2']" -- flow-form nested uses: of that record + if ($0 ~ /^ uses:[[:space:]]*\[/ && depkey != "") { + fl = flowitems($0) + nf = split(fl, fi, "\034") + for (q = 1; q <= nf; q++) { + if (fi[q] == "") continue + r = ck(fi[q]); disp[r] = fi[q] + want[r] = 1 + wantsrc[r] = wantsrc[r] " dependencies:" depkey + } + next + } next } if (!inwf) next - # " '.github/workflows/x.yml':" or "... : []" - if (match($0, /^ '([^']+)':/, m)) { - cur = m[1] + # " '.github/workflows/x.yml':" or "... : []" or "... : ['a@v1', 'b@v2']" + if ($0 ~ /^ \047[^\047]+\047:/) { + cur = $0 + sub(/^ \047/, "", cur) + sub(/\047:.*$/, "", cur) seen_path[cur] = 1 + if ($0 ~ /\047:[[:space:]]*\[[^]]/) { # non-empty flow list + fl = flowitems($0) + nf = split(fl, fi, "\034") + for (q = 1; q <= nf; q++) { + if (fi[q] == "") continue + lr = ck(fi[q]); disp[lr] = fi[q]; lock[cur, lr] = 1 + lockcount[cur]++ + want[lr] = 1 + wantsrc[lr] = wantsrc[lr] " " cur + } + } next } - if (match($0, /^ - '([^']+)'[[:space:]]*$/, m) && cur != "") { - lr = ck(m[1]); disp[lr] = m[1]; lock[cur, lr] = 1 + if ($0 ~ /^ - \047[^\047]+\047[[:space:]]*$/ && cur != "") { + val = $0 + sub(/^ - \047/, "", val) + sub(/\047[[:space:]]*$/, "", val) + lr = ck(val); disp[lr] = val; lock[cur, lr] = 1 lockcount[cur]++ want[lr] = 1 wantsrc[lr] = wantsrc[lr] " " cur @@ -146,17 +311,68 @@ FILENAME == lockfile { } # ---------- pass 2: the workflow YAML ---------- -FNR == 1 { wf = FILENAME } +FNR == 1 { wf = FILENAME; stepind = -1; blkind = -1 } { line = $0 + # A block scalar (`run: |`, `script: >-`) is data, not workflow structure: a + # `uses:` inside it is shell text or an example, never a reference. Skip every + # line indented deeper than the key that opened the block. + if (blkind >= 0) { + if (line !~ /[^[:space:]]/) next + match(line, /^[[:space:]]*/) + if (RLENGTH > blkind) next + blkind = -1 + } + if (line ~ /:[[:space:]]*[|>][-+0-9]*[[:space:]]*(#.*)?$/) { + match(line, /^[[:space:]]*(-[[:space:]]+)?/) + blkind = RLENGTH # column of the opening key (past any "- ") + } + # The de-onboard marker is a COMMENT that the gate-caller templates carry: + # # DE-ONBOARDED from actions.lock + # The phrase may sit anywhere inside a COMMENT line (first non-space character + # `#`), as it does in the real templates (`# ⚠ DE-ONBOARDED from actions.lock, + # deliberately, ...`). It is read from the workflow itself, never from a + # hard-coded list, and never from a data value or a block scalar (skipped above). + if (line ~ /^[[:space:]]*#.*DE-ONBOARDED from actions\.lock/) deonb[wf] = 1 sub(/[[:space:]]+#.*$/, "", line) # strip trailing comment - if (match(line, /^[[:space:]]*-?[[:space:]]*uses:[[:space:]]*(.+)$/, m)) { - raw = m[1] - gsub(/^["']|["']$/, "", raw) + # Track whether this line sits inside a job's `steps:` block, by + # indentation: a `uses:` there is a step action, whatever its path looks + # like (an action directory may be named tool.yml). Only a `uses:` outside + # every `steps:` block is a job-level reusable-workflow call. + if (line ~ /[^[:space:]]/) { + match(line, /^[[:space:]]*/); ind = RLENGTH + if (stepind >= 0 && ind <= stepind) stepind = -1 + if (line ~ /^[[:space:]]*steps:/) stepind = ind + } + # Flow-mapping step: `- {uses: o/r@v1, name: x}`. Pull the uses: scalar out. + # The match is made on the quote-blanked shape of the line, and needs an + # unquoted `{` at or before it, so `uses:` text inside a quoted scalar (or a + # bare `a, uses: b` in plain text) is data, never a reference. + isflow = 0 + shp = shape(line) + if (match(shp, /[{,][[:space:]]*uses:[[:space:]]*[^,}[:space:]]+/) && index(substr(shp, 1, RSTART), "{") > 0) { + raw = substr(line, RSTART + 1) + sub(/^[[:space:]]*uses:[[:space:]]*/, "", raw) + sub(/[,}[:space:]].*$/, "", raw) + isflow = 1 + } else if (line ~ /^[[:space:]]*-?[[:space:]]*uses:[[:space:]]*.+$/) { + raw = line + sub(/^[[:space:]]*-?[[:space:]]*uses:[[:space:]]*/, "", raw) + } else raw = "" + if (raw != "") { + gsub(/^["\047]|["\047]$/, "", raw) gsub(/[[:space:]]+$/, "", raw) if (raw ~ /^\$\//) { dollar[wf] = dollar[wf] " " raw; next } # known corruption n = norm(raw) if (n != "") { uses[wf, ck(n)] = 1; useslist[wf] = useslist[wf] " " n } + # Clause 5's exception needs to know HOW a ref is used: as the target of a + # job-level reusable-workflow call, or as an action. + if (n != "") { + # reusetgt/actiontgt are repo-wide (clause 5 needs that). jobreuse/wfaction + # are the same facts per workflow, for the de-onboarded gate callers. + if (stepind < 0 && line !~ /^[[:space:]]*-/ && raw ~ /\/\.github\/workflows\/[^\/@]+\.ya?ml@/) { reusetgt[ck(n)] = 1; jobreuse[wf, ck(n)] = 1 } + else { actiontgt[ck(n)] = 1; wfaction[wf, ck(n)] = 1 } + } } } @@ -180,6 +396,17 @@ END { for (j = 1; j <= nu; j++) { if (u[j] == "" || (u[j] in uniq)) continue uniq[u[j]] = 1 + # A ref used ONLY as a job-level reusable-workflow target stays a SHA pin + # outside the lock (see the header: absent is harmless, `gh actions-lock` + # does not backfill it, and hand-adding it is the fatal direction). It may + # be present (and is then closed by clause 3) or absent; never required. + if (ck(u[j]) in reusetgt && !(ck(u[j]) in actiontgt)) continue + # A DE-ONBOARDED gate caller carries an EMPTY entry. Its own job-level call + # is exempt even when ANOTHER workflow uses the same owner/repo@ref as a + # step action (that makes the ref an action repo-wide, which is why the + # test above would otherwise demand a lock entry here). It stays required + # if THIS workflow also uses the ref as a step action. + if (deonb[wf] && ((wf SUBSEP ck(u[j])) in jobreuse) && !((wf SUBSEP ck(u[j])) in wfaction)) continue if (!((key SUBSEP ck(u[j])) in lock)) missing = missing " " u[j] } if (missing != "") { @@ -190,6 +417,22 @@ END { bad = 1 } + # --- clause 7: a DE-ONBOARDED gate caller must not carry a leaf record: the + # reusable it calls at job level is not listed under its entry --- + leaf = "" + if (deonb[wf]) { + for (k in lock) { + split(k, kp, SUBSEP) + if (kp[1] != key) continue + if (((wf SUBSEP kp[2]) in jobreuse) && !((wf SUBSEP kp[2]) in wfaction)) + leaf = leaf " " (kp[2] in disp ? disp[kp[2]] : kp[2]) + } + } + if (leaf != "") { + printf "FAIL %s\n de-onboarded gate caller carries a leaf record (its entry must be empty: '%s': []):%s\n", key, key, leaf + bad = 1 + } + # --- clause 2: every lock entry must be referenced by this workflow --- orphan = "" for (k in lock) { @@ -257,17 +500,82 @@ END { bad = 1 } + # --- clause 5: GitHub requires string-valued short source refs, matching + # mutable keys, never 40/64-hex commit identities as ref metadata. --- + nself = 0; selflist = "" + for (s in selfsha) { + k = ck(s) + # Only the target of job-level reusable calls, never an action and never a + # nested uses: of another record (see the header, clause 5). + # The record's key must itself be pinned to that same SHA: a mutable key + # (@v1) or a key at a different SHA is not "its own SHA". + keyref = substr(s, index(s, "@") + 1) + if (fullsha(keyref) && tolower(keyref) == tolower(selfsha[s]) && + (k in reusetgt) && !(k in actiontgt) && index(wantsrc[k], " dependencies:") == 0) continue + nself++ + selflist = selflist sprintf("\n %s (ref: %s)", s, selfsha[s]) + } + if (nself > 0) { + printf "FAIL actions.lock: SELF-SHA REFS\n" + printf " %d dependencies: record(s) use a 40/64-hex SHA as ref: (rejected by GitHub runner):%s\n", nself, selflist + bad = 1 + } + + # Metadata belongs to each raw record, even when repository lookup folds + # case and another spelling of the same pin has its own valid ref. + for (d in rawrec) + if (!(d in hasref)) invalidref[d] = "" + ninvalid = 0; invalidlist = "" + for (d in invalidref) { + ninvalid++ + invalidlist = invalidlist sprintf("\n %s (ref: %s)", d, invalidref[d]) + } + if (ninvalid > 0) { + printf "FAIL actions.lock: INVALID NAMED REFS\n" + printf " %d dependencies: record(s) have missing, placeholder or malformed ref: metadata:%s\n", ninvalid, invalidlist + bad = 1 + } + + nscalar = 0; scalarlist = "" + for (d in invalidscalar) { + nscalar++ + scalarlist = scalarlist sprintf("\n %s (ref: %s)", d, invalidscalar[d]) + } + if (nscalar > 0) { + printf "FAIL actions.lock: INVALID REF SCALARS\n" + printf " %d dependencies: record(s) have non-string or unsupported YAML ref: values; quote literal names:%s\n", nscalar, scalarlist + bad = 1 + } + + nmismatch = 0; mismatchlist = "" + for (d in mismatchref) { + nmismatch++ + mismatchlist = mismatchlist sprintf("\n %s (ref: %s)", d, mismatchref[d]) + } + if (nmismatch > 0) { + printf "FAIL actions.lock: MISMATCHED REFS\n" + printf " %d dependencies: record(s) disagree with their mutable key refs:%s\n", nmismatch, mismatchlist + bad = 1 + } + + if (!has_version || lock_version != "\047v0.0.3\047") { + printf "FAIL actions.lock: INVALID VERSION (%s; expected \047v0.0.3\047)\n", (has_version ? lock_version : "missing") + bad = 1 + } + # --- a dependencies: record nothing names is dead weight, not fatal: report only --- nunref = 0 for (d in haverec) if (!(d in want)) nunref++ if (bad) { print "" - print "actions.lock is OUT OF SYNC with the workflow YAML, or is not transitively closed." + print "actions.lock is OUT OF SYNC, is not transitively closed, or has invalid pin metadata." print "GitHub refuses such a run at startup: zero jobs are created and the run" print "reports \"This run likely failed because of a workflow file issue.\"" print "" print "Fix, in this order:" + print " 0. After a Dependabot bump: `just lock-sync-fix` (scripts/lock-sync-fix.sh)" + print " resolves the new refs, rewrites the lock, and re-runs this check." print " 1. `gh actions-lock --no-migrate-local-actions`, then review the diff. It does" print " NOT handle job-level reusable-workflow refs and it can de-pin bare SHAs to" print " floating tags - both must be corrected by hand." @@ -279,16 +587,20 @@ END { print " github/codeql-action/upload-sarif@ is REJECTED by the schema; collapse it" print " to github/codeql-action@." print " 4. For any UNLISTED WORKFLOWS above, add the path as a lockfile key. A workflow" - print " with no uses: takes an empty list: \x27.github/workflows/x.yml\x27: []" + print " with no uses: takes an empty list: \047.github/workflows/x.yml\047: []" print " `gh actions-lock` has been observed to OMIT such a workflow entirely; that" print " omission is itself the defect, so re-running the tool may not add it." + print " 5. Every dependency ref: must be a string naming a short branch or tag and" + print " match the key ref unless the key is a full SHA. Preserve the immutable" + print " commit: pin; do not replace ref: with that SHA, a placeholder or a refs/ name." exit 1 } printf "actions.lock is in sync and transitively closed:\n" - printf " * every uses: is locked under its own workflow path (job-level reusable refs included)\n" + printf " * every step-action uses: is locked under its own workflow path (job-level reusable refs may stay outside the lock)\n" printf " * every lockfile entry is still referenced\n" printf " * every ref named in the lockfile resolves to a dependencies: record (0 dangling edges)\n" printf " * every workflow file has a lockfile key (zero-uses: workflows included)\n" + printf " * dependency ref: metadata uses string-valued short names, matches mutable keys, and has no placeholders or SHAs (a job-level reusable target may name its own SHA)\n" if (nunref > 0) printf " note: %d dependencies: record(s) are unreferenced - harmless, but prunable.\n", nunref } From 31fc19a20d8687a280db4c7f9fad1ea70f974a70 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 01:06:12 +0000 Subject: [PATCH 2/3] ci(lock): de-onboard creusot.yml from actions.lock Owner ruling 2026-11-30: gate callers are de-onboarded from actions.lock, as the proven-cicd templates say. creusot.yml now carries the template's "DE-ONBOARDED from actions.lock" comment, and its lock entry is the empty list. Only the leaf line was removed; no record was written by hand, and gh actions-lock was not run (unusable here). The checker re-synced in the parent commit (rsr-template-repo 6e7762f, clause 7) accepts this shape and rejects a marked caller that keeps a leaf. The now unreferenced dependencies: record for proven-cicd-and-workflows@6a35e51 is left in place; the checker reports it as harmless and prunable. The header comment that said to keep actions.lock in sync with this pin is replaced, since it contradicted the de-onboarding. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDgb6vQnxAZ8czX8SLb --- .github/workflows/actions.lock | 3 +-- .github/workflows/creusot.yml | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index e98f28d..8b72a95 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -8,8 +8,7 @@ workflows: - 'github/codeql-action@v4.39.5' '.github/workflows/container-build.yml': - 'actions/checkout@v7.0.1' - '.github/workflows/creusot.yml': - - 'hyperpolymath/proven-cicd-and-workflows@6a35e510a41037adfd422b7f449c3503c5e26a98' + '.github/workflows/creusot.yml': [] '.github/workflows/dependabot-automerge.yml': - 'dependabot/fetch-metadata@v3.1.0' '.github/workflows/dogfood-gate.yml': diff --git a/.github/workflows/creusot.yml b/.github/workflows/creusot.yml index 3bab2f9..295ec59 100644 --- a/.github/workflows/creusot.yml +++ b/.github/workflows/creusot.yml @@ -15,7 +15,9 @@ # Each later source still needs its own proof run; this is not a whole-engine proof. # # The caller's full `uses:` SHA pins both the workflow and its gate scripts. -# Keep actions.lock in sync with this pin and the workflow's nested actions. +# Full-SHA pin, DE-ONBOARDED from actions.lock, no `secrets:` — see +# rust-ci.yml in the templates/ of proven-cicd-and-workflows for why. Its lock +# entry is the empty list; advance the pin here only, and do not re-add a leaf. name: Creusot Gate on: From ada28c39325a287da18f1cbab7eae01f671873cf Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 1 Dec 2026 20:27:11 +0000 Subject: [PATCH 3/3] lock: relock standards@d55304a ref to 'main' (squabble relock output, SQ-LOCK-01) One-line repair produced by 'squabble relock' under the owner's one-time authorisation (ESTATE_AUTOFIX set for that single invocation only, not persisted). Clears the pre-existing SELF-SHA REFS failure surfaced by the 6e7762f checker. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01J4QvDgb6vQnxAZ8czX8SLb --- .github/workflows/actions.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 8b72a95..470e42b 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -245,7 +245,7 @@ dependencies: - 'swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0' - 'webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555' 'metadatastician/standards@d55304a01b5260b0511aae0d14ed8b8770b00293': - ref: 'd55304a01b5260b0511aae0d14ed8b8770b00293' + ref: 'main' commit: 'sha1-d55304a01b5260b0511aae0d14ed8b8770b00293' owner_id: 297579217 repo_id: 1116521501