Repository navigation
Description
Summary
The Grype gate wiring check, tests/test-grype-gate-inputs.sh (hook grype-gate-inputs), compares every lfreleng-actions/repository-metadata-action call with a commit hardcoded in the test. Replace that with a consistency rule: every call pins a full commit SHA, and all four workflows pin the same one. Also fix the failure summary, which miscounts. Line numbers are from 742a4b1 on main; if main has moved, find the same text.
Why
main is failing the hook right now. Dependabot moved all four workflows to f4417bda9e73aa169709682d07d6083453275c58 # v0.5.5, but it cannot update the test, which still expects ff822d06a64404a54feb79f8e27b687cc76d1c83 (v0.5.4):
::error file=/code/.github/workflows/build-test.yaml::jobs.repository-metadata does not pin lfreleng-actions/repository-metadata-action@ff822d06a64404a54feb79f8e27b687cc76d1c83
(and the same for build-test-multiarch.yaml, build-test-release.yaml, build-test-release-multiarch.yaml)
4 problem(s) across 4 workflow(s) ❌
Every Dependabot bump of this action breaks the hook the same way, so the fix is to stop hardcoding the version, not to bump it again. The value of the check is that all call sites move together; that survives as a consistency rule. The same change is being made in workflows-template, go-workflows and docker-workflows.
Changes
All in tests/test-grype-gate-inputs.sh:
- Drop
METADATA_PIN(line 70). - Per workflow (
check_metadata, ~line 267,does not pin {METADATA}@{METADATA_PIN}): require the ref after@to be a full 40-character lowercase hex commit SHA. A tag (@v0.5.5) or a short SHA fails. - Across workflows: after checking every workflow in
VERIFY + RELEASE, fail if their metadata calls pin more than one SHA. Report each workflow with the pin it has and a note saying how many different pins there are, so the lagging one is obvious. - Self-test: a lone workflow can no longer fail by pinning a different valid SHA, so the
"repository-metadata-action on v0.3.3"mutant (~lines 485–486) must become a check of two workflows: the clean one, and a copy re-pinned to2206d754f65f1a90f57b49be546712c5f594def2, expecting the cross-workflow rule to fail. Add per-workflow mutants for a tag pin and a short-SHA pin. Every mutant must still be caught. - Summary line (~line 643):
{failures} problem(s) across {len(VERIFY + RELEASE)} workflow(s)prints the number of workflows checked, not the number with problems. Count the distinct workflows that have problems instead. - Header comment: where it describes the metadata pin ("pin the same metadata action"), say that every workflow pins it to one shared commit SHA.
Out of scope
- No workflow changes. Do not edit anything under
.github/workflows/; the v0.5.5 pins there are correct. - Leave the
grype-scan-actionpin, its"grype-scan-action pinned elsewhere"mutant, and every other check exactly as they are. tests/test-python-metadata.shalso has aMETADATA_PIN, but forbuild-metadata-action; it is unrelated, so leave it alone.- Do not edit
.pre-commit-config.yaml,AGENTS.md,LICENSE*,REUSE.tomlor.gitlint.
Acceptance criteria
- A single commit with the subject
Test: Require one shared metadata action pin, which is also the PR title -
git grep -nE 'METADATA_PIN|ff822d06' tests/test-grype-gate-inputs.shprints nothing -
bash tests/test-grype-gate-inputs.shpasses against the current workflows and reports every mutant caught - Against a scratch copy of
.github/workflows/where one workflow's metadata call is moved back toff822d06a64404a54feb79f8e27b687cc76d1c83 # v0.5.4, the script fails, names every metadata call site, and the summary counts the workflows that have problems -
prek run --all-filespasses, andaislop ci --changesadds no findings
Activity
lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 An AI agent has proposed a change for this issue: pull request #201 (head 3860c97). The Copilot review of it has findings (1 unresolved review thread; assessment: changes recommended). Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.
lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 Round 1: an AI agent revised pull request #201 (head 5e9cc35). Round 1: one Copilot finding, fixed. - Fixed: the shared-pin self-test re-pinned a copy to the v0.3.3 SHA unconditionally. If all workflows pinned that SHA, the copy matched the clean workflow and the self-test exited 1 on valid workflows. I confirmed this with a scratch copy: the previous head failed (84/85). The copy now falls back to another full SHA when the clean pin already equals v0.3.3. The fix passes that scratch case and the real workflows (85/85 each). - No rebase: the branch stays on
742a4b1, which is stillmain's head, and the PR is mergeable. - Checks: no failing checks reported. I ran the test script, prek on the changed file, gitlint through the commit hooks, and aislop, and all passed. Remaining: Copilot's review of the new head.. The Copilot review of it has findings (1 unresolved review thread; assessment: changes recommended). Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.lf-releng-code-monkey-bot commentedon Nov 23, 2026
🐒 Round 2: an AI agent revised pull request #201 (head bd2b16f). Round 2: one Copilot finding, fixed. - Fixed: the two metadata-pin diagnostics printed a malformed ref verbatim, so a YAML ref holding
\n::warning::forgedsplit the::errorline and forged a runner command. I reproduced it on a scratch copy. Both messages intests/test-grype-gate-inputs.shnow use{pin!r}, and the scratch case stays on one line. - No rebase: the branch stays on742a4b1, which is stillmain's head, and the PR is mergeable. - Checks: none failing. The test script passes on the real workflows (85/85 mutants per verify workflow). The v0.5.4 scratch case fails as the issue requires.prekon the changed file, gitlint andaislop ciall pass. - Remaining: Copilot's review of the new head.. The Copilot review of it is clean. An antagonistic review was requested from the review bot.ModeSevenIndustrialSolutions commentedon Nov 24, 2026
#204 has merged, and #201 now conflicts with
main. Rebase #201 ontomain(7d14141) and resolve the conflict.It is one hunk in
tests/test-grype-gate-inputs.sh. To keep the old check passing, #204 moved theMETADATA_PINline to the v0.5.5 commit (f4417bda…); this issue removes that constant. Resolve it in favour of this change:FULL_SHApattern and the shared-pin rule;METADATA_PIN,ff822d06orf4417bdaintests/test-grype-gate-inputs.sh.Nothing else in #201 needs to change.
tests/test-python-metadata.shgained checks in #204 and keeps its ownMETADATA_PIN, forbuild-metadata-action; that file stays out of scope here.Keep the single commit and its subject. After the rebase,
bash tests/test-grype-gate-inputs.shandbash tests/test-python-metadata.shshould both pass against the workflows onmain.lf-releng-code-monkey-bot commentedon Nov 24, 2026
🐒 Round 3: an AI agent revised pull request #201 (head f8ecba6). Round 3: rebased as the maintainer asked. There were no review findings or failing checks. - Rebased onto
main7d14141because #204 merged and the PR conflicted. The one hunk was #204'sMETADATA_PIN = "f4417bda…"line. I resolved it for this change:FULL_SHAand the shared-pin rule stay, with noMETADATA_PIN/ff822d06/f4417bdaleft intests/test-grype-gate-inputs.sh. The file is byte-identical to the previous head. The branch is still one commit with the same subject. - Re-signed the commit with-s. The carried-over bot sign-off went over gitlint's body length locally, and the workflow replaces the trailer anyway. - Ran:bash tests/test-grype-gate-inputs.sh(85/85 mutants) andbash tests/test-python-metadata.sh, both passing againstmain's workflows. The v0.5.4 scratch case fails as required.prekon the changed file and gitlint pass.aislopexits 0 but scans no shell files. - Remaining: Copilot's review of the new head.. The Copilot review of it is clean. An antagonistic review was requested from the review bot.