Skip to content

CI: a digest-only refresh is one whose diff changes nothing but digests - #42

Merged
cbetta merged 4 commits into
masterfrom
digest-refresh-by-diff
Oct 23, 2026
Merged

cbetta merged 4 commits into
masterfrom
digest-refresh-by-diff

Conversation

@cbetta

@cbetta cbetta commented Oct 23, 2026

Copy link
Copy Markdown
Member
Reviewer check This PR
Auth / permissions No
Data access widened No
New secret, env var or key No
CI, deploy or infra Yes: the CI merge job's rule for Dependabot image updates
Dependencies No

A follow-up to the merge job's digest-refresh fix. Copilot showed previous-version can't be trusted for this: it covers only the first image of a grouped update, a date tag like 20261023 looks like a digest, and a single-image refresh leaves it empty. The rule now reads the PR's diff and merges only when every changed line differs in nothing but its @sha256 digest:

old="$({ grep '^-[^-]' <<< "$diff" || true; } | sed -E 's/^-//; s/@sha256:[0-9a-f]{64}//g' | sort)"
new="$({ grep '^+[^+]' <<< "$diff" || true; } | sed -E 's/^\+//; s/@sha256:[0-9a-f]{64}//g' | sort)"
if [ -n "$old" ] && [ "$old" = "$new" ]; then merge=true; ...

Checked: a digest-only refresh merges; a tag change, a grouped update with a tag change, a date-tag change and an empty diff all wait. actionlint (shellcheck) passes.

🤖 Generated with Claude Code

…sha256 digests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

🟡 Changes recommended

The comparison can approve digest-pin removal and non-digest changes that cancel across files or positions.

2 open issues
What changed in this PR

This PR changes the CI auto-merge gate to identify Dependabot image digest refreshes from the PR diff rather than unreliable version metadata.

Changes:

  • Removes the previous-version input from the merge decision.
  • Compares digest-normalized changed lines, including grouped image updates.
  • Updates the explanation for changes that require manual review.
File Description
.github/​workflows/​ci.yml Replaces metadata-based digest detection with a diff-based auto-merge check.

Review effort: Balanced

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
…arker, so pins can't be dropped and nothing can move

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

🟡 Changes recommended

The merge gate can authorize updates after content-fetch failures and still overlooks non-digest changes.

3 open issues
2 resolved since last review

Review effort: Balanced

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
…ges and trailing newlines

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

🟡 Changes recommended

Successful API responses that omit large-file contents can still authorize non-digest changes.

1 open issue
3 resolved since last review

Review effort: Balanced

Comment thread .github/workflows/ci.yml Outdated
…r 1 MB can't compare as empty

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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

The revised gate addresses the prior issues, and the supplied verification supports rejecting non-digest changes and lookup failures.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@cbetta
cbetta marked this pull request as ready for review October 23, 2026 16:47
@cbetta
cbetta merged commit ba71d47 into master Oct 23, 2026
9 checks passed
@cbetta
cbetta deleted the digest-refresh-by-diff branch October 23, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants