Skip to content

Test: Require one shared metadata action pin - #201

Merged
ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-200
Nov 24, 2026
Merged

ModeSevenIndustrialSolutions merged 1 commit into
lfreleng-actions:mainfrom
lfreleng-bot-forks:code-monkey/issue-200

Conversation

@lf-releng-code-monkey-bot

@lf-releng-code-monkey-bot lf-releng-code-monkey-bot Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #200

Authored by an AI agent; human review required
Command Exit
git rebase 7d14141530f01a8c212601dadc636ae6e0575f91 1
GIT_EDITOR=true git rebase --continue 0
bash tests/test-python-metadata.sh 0
bash <scratch>/tests/test-grype-gate-inputs.sh # build-test.yaml re-pinned to ff822d06 (v0.5.4) 1
prek run --hook-stage commit-msg --commit-msg-filename /tmp/msg.txt # before re-sign 1
git commit --amend -s -F /tmp/msg2.txt # commit-msg hooks incl. gitlint 0
bash tests/test-grype-gate-inputs.sh 0
AISLOP_NO_TELEMETRY=1 aislop ci --changes --base 7d14141530f01a8c212601dadc636ae6e0575f91 0
prek run --files tests/test-grype-gate-inputs.sh 0

The github-code-monkey-bot workflow 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 (hook grype-gate-inputs) no longer compares every lfreleng-actions/repository-metadata-action call with a hardcoded commit. Instead:

  • each call must pin a full 40-character lowercase commit SHA (FULL_SHA), so a tag or a short SHA fails;
  • all four workflows in VERIFY + RELEASE must pin the same SHA. When they differ, every workflow is reported with its pin and the number of distinct pins;
  • 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 failure summary counts the workflows that have problems, not the number checked;
  • pin diagnostics render the ref with repr, so a malformed ref cannot split the ::error line.

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's METADATA_PIN = "f4417bda…" # v0.5.5 line. I resolved it in favour of this change: FULL_SHA and the shared-pin rule stay, and the file has no METADATA_PIN, ff822d06 or f4417bda. The file is byte-identical to the previous head. tests/test-python-metadata.sh is untouched. The commit's sign-off was re-applied with git 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 workflow
  • bash tests/test-python-metadata.sh: passes
  • Scratch copy with build-test.yaml moved back to ff822d06… # v0.5.4: fails, names all four call sites, and reports 2 different refs
  • prek run --files tests/test-grype-gate-inputs.sh: passes; gitlint passes at the commit-msg stage
  • aislop ci --changes --base 7d14141: exits 0 with no diagnostics. Note that aislop scans no shell files, so this check covers nothing here

For the reviewer

Please confirm that the conflict resolution matches the maintainer's request.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread tests/test-grype-gate-inputs.sh Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Malformed refs are printed verbatim in two diagnostics, allowing embedded newlines to inject CI runner commands; both messages need escaped representations.

1 open issue

Review effort: Balanced

Comment thread tests/test-grype-gate-inputs.sh Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the shared metadata-action pin validation change.

No open issues 🎉

Review effort: Balanced

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the shared metadata-action pin validation update.

No open issues 🎉

Review effort: Balanced

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit 0e9ab8d into lfreleng-actions:main Nov 24, 2026
102 of 140 checks passed
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions deleted the code-monkey/issue-200 branch November 24, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality Updates to code-quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test: Require one shared metadata action pin

2 participants