Skip to content

fix(release): target merge commits for aio tags#44

Closed
JSONbored wants to merge 1 commit intomainfrom
codex/fix-release-merge-tagging
Closed

fix(release): target merge commits for aio tags#44
JSONbored wants to merge 1 commit intomainfrom
codex/fix-release-merge-tagging

Conversation

@JSONbored
Copy link
Copy Markdown
Owner

Summary

  • Resolve release targets to the main merge commit when release PRs are merged with merge commits.
  • Use the resolved release target for GitHub Release CI checks, tags, and release targets.
  • Let manual CI runs on main republish the latest changelog release image tag without arbitrary workflow inputs.

What changed

  • Added a release helper for finding the release target commit.
  • Updated image tag computation to publish aio tags for merge-commit release PRs.
  • Updated Publish Release to verify and tag the release target commit.
  • Documented the repair flow for latest release image tags.

Why

  • The v2.0.0-aio.3 release PR merged as a merge commit, so the image publish step emitted v2.0.0 but missed v2.0.0-aio.3.
  • Publish Release checked the inner release commit while CI ran on the main merge commit.

Validation

  • python3 scripts/release.py latest-changelog-version
  • python3 scripts/release.py find-release-commit v2.0.0-aio.3
  • python3 scripts/release.py find-release-target-commit v2.0.0-aio.3
  • python3 scripts/validate-template.py
  • .venv-local/bin/pytest tests/unit tests/template -q
  • trunk check --ci

Notes

  • After this merges, manually run CI / Mem0-AIO from main to repair the latest changelog image tag, then rerun Publish Release / Mem0-AIO.

@JSONbored JSONbored self-assigned this Apr 24, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46727cf07d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/release.py
Comment on lines +182 to +185
"rev-list", "--first-parent", "--reverse", f"{release_commit}..HEAD"
).splitlines()
if first_parent_path:
return first_parent_path[0]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Select merge commit as release target

When main has additional commits after the release branch was cut, rev-list --first-parent --reverse "${release_commit}..HEAD" yields all intervening first-parent commits and this code picks the first one, which is typically an older main commit rather than the merge commit that actually brought the release in. In that case Publish Release will validate CI and create the release tag/GitHub release against the wrong SHA (which may not contain the release changes).

Useful? React with 👍 / 👎.

case "${changelog_version}" in
"${upstream_version}"-aio.*)
release_target="$(python3 scripts/release.py find-release-target-commit "${changelog_version}" 2>/dev/null || true)"
if [[ "${release_target}" == "${GITHUB_SHA}" || "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep manual publish runs pinned to the release target SHA

This condition makes every workflow_dispatch run on main assign release_package_tag even when GITHUB_SHA is not the resolved release target commit. If someone manually reruns CI after newer commits land, the existing *-aio.N tag can be republished from non-release code, breaking release tag immutability and reproducibility for users pulling that version tag.

Useful? React with 👍 / 👎.

@JSONbored
Copy link
Copy Markdown
Owner Author

Superseded by #45, which fixes both release-target selection and manual-dispatch tag immutability with unit coverage.

@JSONbored JSONbored closed this Apr 24, 2026
@JSONbored JSONbored deleted the codex/fix-release-merge-tagging branch April 25, 2026 06:48
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.

1 participant