Repository navigation
Test: Require one shared metadata action pin - #201
ModeSevenIndustrialSolutions merged 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The shared-pin self-test can fail on valid workflows because its mutant SHA may match the clean SHA; the mutant must always use a different SHA.
1 open issue
What changed in this PR
Replaces the hardcoded metadata-action revision check with a shared-pin rule across all four workflows, addressing #200 so coordinated action updates no longer require changing the test.
Changes:
- Requires full 40-character lowercase hexadecimal SHAs and reports inconsistent pins across workflows.
- Adds tag and short-SHA mutants and converts the historical-pin mutant into a two-workflow consistency check.
- Corrects the failure summary to count workflows with problems and updates the header comments.
| File | Description |
|---|---|
tests/test-grype-gate-inputs.sh |
Updates metadata pin validation, mutation self-tests, failure counts, and explanatory comments. |
Review effort: Balanced
3860c97 to
5e9cc35
Compare
5e9cc35 to
bd2b16f
Compare
There was a problem hiding this comment.
🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.
No actionable defects found. The change enforces full-length, shared metadata pins across all four workflows, preserves the existing wiring checks, and adapts the mutation checks to accept coordinated pin updates.
Antagonistic round 1 of 3.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
The Grype gate wiring check compared every repository-metadata-action call with a commit hardcoded in the test, so each Dependabot bump of the action broke the grype-gate-inputs hook, as v0.5.5 does on main now. What matters is that every call site moves together, so replace the hardcoded pin with a consistency rule: each call pins a full 40-character commit SHA, and the four workflows pin the same one. When they disagree, every workflow is reported with its pin and the number of distinct pins, so the lagging one stands out. A lone workflow can no longer fail by pinning another valid SHA, so the self-test checks the clean workflow beside a re-pinned copy, and adds mutants for a tag pin and a short-SHA pin. The copy keeps the v0.3.3 SHA unless the workflows already pin it, and then takes another full SHA, so the pair always differs (Copilot review: a shared v0.3.3 pin made the self-test fail valid workflows). Both pin diagnostics render the ref with repr, so a malformed ref holding a newline stays on one ::error line and cannot forge another runner command (Copilot review: refs were printed verbatim). The failure summary printed the number of workflows checked; it now counts the workflows that have problems. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
f8ecba6
bd2b16f to
f8ecba6
Compare
There was a problem hiding this comment.
🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.
No actionable defects found. The change requires matching full-length metadata action pins across all four workflows, preserves the existing wiring checks, and updates mutation checks to allow coordinated pin changes.
Antagonistic round 2 of 3.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
0e9ab8d
into
lfreleng-actions:main

Closes #200
Authored by an AI agent; human review required
claude-opus-5.5via GitHub Copilot CLI7d14141530f01a8c212601dadc636ae6e0575f91git rebase 7d14141530f01a8c212601dadc636ae6e0575f91GIT_EDITOR=true git rebase --continuebash tests/test-python-metadata.shbash <scratch>/tests/test-grype-gate-inputs.sh # build-test.yaml re-pinned to ff822d06 (v0.5.4)prek run --hook-stage commit-msg --commit-msg-filename /tmp/msg.txt # before re-signgit commit --amend -s -F /tmp/msg2.txt # commit-msg hooks incl. gitlintbash tests/test-grype-gate-inputs.shAISLOP_NO_TELEMETRY=1 aislop ci --changes --base 7d14141530f01a8c212601dadc636ae6e0575f91prek run --files tests/test-grype-gate-inputs.shThe
github-code-monkey-botworkflow opened this pull request.Nobody has merged it; a maintainer must review it first.
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.
Round 3 of revision, rebased onto the default branch. It set out to resolve a conflict with the default branch.
What this does
tests/test-grype-gate-inputs.sh(hookgrype-gate-inputs) no longer compares everylfreleng-actions/repository-metadata-actioncall with a hardcoded commit. Instead:FULL_SHA), so a tag or a short SHA fails;VERIFY + RELEASEmust pin the same SHA. When they differ, every workflow is reported with its pin and the number of distinct pins;repr, so a malformed ref cannot split the::errorline.This round
A maintainer asked for a rebase after #204 merged. The branch is now a single commit on
main(7d14141). The one conflicting hunk was #204'sMETADATA_PIN = "f4417bda…" # v0.5.5line. I resolved it in favour of this change:FULL_SHAand the shared-pin rule stay, and the file has noMETADATA_PIN,ff822d06orf4417bda. The file is byte-identical to the previous head.tests/test-python-metadata.shis untouched. The commit's sign-off was re-applied withgit commit -s, because the carried-over bot sign-off line went over gitlint's 80-character body limit locally.Checks run
bash tests/test-grype-gate-inputs.sh: passes, 85/85 mutants caught per verify workflowbash tests/test-python-metadata.sh: passesbuild-test.yamlmoved back toff822d06… # v0.5.4: fails, names all four call sites, and reports2 different refsprek run --files tests/test-grype-gate-inputs.sh: passes; gitlint passes at the commit-msg stageaislop ci --changes --base 7d14141: exits 0 with no diagnostics. Note that aislop scans no shell files, so this check covers nothing hereFor the reviewer
Please confirm that the conflict resolution matches the maintainer's request.