Skip to content

verify-action-build: widen source-commit window + prefer exact tag match#821

Merged
potiuk merged 1 commit intoapache:mainfrom
potiuk:verify-action-build-widen-source-commit-cutoff
May 8, 2026
Merged

verify-action-build: widen source-commit window + prefer exact tag match#821
potiuk merged 1 commit intoapache:mainfrom
potiuk:verify-action-build-widen-source-commit-cutoff

Conversation

@potiuk
Copy link
Copy Markdown
Member

@potiuk potiuk commented May 7, 2026

Summary

  • resolve_source_commit's published_at + 1min cutoff missed release-please-style orphan tags where the master release vX.Y.Z commit lands seconds after the tag is published. benchmark-action/github-action-benchmark v1.22.1 (support benchmark-action/github-action-benchmark #805) hits this: tag published at 10:36:23Z, master release commit at 10:37:24Z — 1 second past the old cutoff. Resolver fell back to v1.22.0's release commit; rebuild produced v1.22.0's dist; verification reported "DIFFERENCES DETECTED" against v1.22.1's published dist.
  • Widen the search window to ±2h around the anchor and add a strong-preference match on the exact tag name in the commit message (release v1.22.1 matches tag v1.22.1; also matches release 1.22.1 without the v prefix). Falls back to the existing generic release-marker on miss.
  • 6 new tests in test_release_lookup.py covering: orphan-tag-pushed-before-master-release; multiple "release X" commits in window (exact match wins); release-please's no-v-prefix message variant; release-marker fallback; empty-commit-list and missing-release edge cases.

Test plan

  • uv run pytest utils/tests/ — 229/229.
  • prek run --all-files clean.
  • Smoke: verify-action-build benchmark-action/github-action-benchmark@52576c92… (PR support benchmark-action/github-action-benchmark #805's SHA) — was failing on origin/main; with the fix the source-detached fallback resolves to 67cf262e8c79 ("release v1.22.1") and all 16 src/*.js files are byte-identical. Exit 0.

Generated-by Claude Code.

resolve_source_commit's +1min cutoff missed release-please-style
orphan tags whose master "release vX.Y.Z" commit lands a few
seconds *after* the tag is published.  benchmark-action/
github-action-benchmark v1.22.1 hits this: orphan tag at
10:36:23, master release commit at 10:37:24 — 1 second past the
cutoff.  Resolver fell back to v1.22.0's release commit, rebuild
produced v1.22.0's dist, JS-build-verification flagged
"DIFFERENCES DETECTED" against v1.22.1's published dist.

Search ±2h around the tag's published_at and disambiguate by
exact tag-name match in the commit message ("release v1.22.1"
matches tag v1.22.1, also matches "release 1.22.1" without the
v).  Falls back to the existing generic release-marker on miss.
Copy link
Copy Markdown
Member

@dave2wave dave2wave left a comment

Choose a reason for hiding this comment

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

Looks like it can handle multiple versions released in the same 4 hour window.

@potiuk potiuk merged commit e5e3d57 into apache:main May 8, 2026
8 checks passed
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