Skip to content

fix(release): restore v1.0.0 tag reachability + stop monorepo-builder from creating release commits - #38

Merged
abbaseya merged 4 commits into
mainfrom
fix/release-pipeline-restore-tag-reachability
May 21, 2026
Merged

fix(release): restore v1.0.0 tag reachability + stop monorepo-builder from creating release commits#38
abbaseya merged 4 commits into
mainfrom
fix/release-pipeline-restore-tag-reachability

Conversation

@abbaseya

Copy link
Copy Markdown
Contributor

Summary

The release pipeline has been broken since the 2026-04-27 first-release run. The PR #37 merge yesterday surfaced it (Release workflow failed with Provided version "1.0.0" must be greater than the last one: "1.0.0"). This PR fixes both the immediate breakage and the underlying architectural defect that caused it.

Root cause

Two release tools were racing:

  • @semantic-release/git (intended owner of commit + tag + push) computes the next version from v* tags reachable from main.
  • symplify/monorepo-builder release "<version>" (chained into release.config.mjs:37 as part of the prepare step) also creates its own commit + tag + push, and its ReleaseGuard checks against all tags in the repo (git tag -l), regardless of reachability.

On 2026-04-27, monorepo-builder won the race: it pushed the 1.0.0 tag pointing at a "prepare release" commit (bf6f62a) that was never merged into main. @semantic-release/git then added the matching v1.0.0 tag pointing at the same orphan commit. Result: v1.0.0 exists on origin but is invisible to semantic-release because it is not in main's ancestry. Every subsequent release run defaults to first-release 1.0.0 and is rejected by monorepo-builder's guard.

What this PR does

Change 1 — release.config.mjs: drop the chained monorepo-builder release "<version>" call. Keep only bump-interdependency. @semantic-release/git becomes the sole owner of commit + tag + push, and (unlike monorepo-builder) it pushes the commit to main, not just the tag — so future release commits stay reachable.

Change 2 — merge v1.0.0 into the branch: brings the orphan bf6f62a into main's ancestry via a real merge commit. The v1.0.0 tag is not moved, not deleted — it keeps pointing at bf6f62a. After this PR lands, git merge-base --is-ancestor v1.0.0 main succeeds.

Expected behavior after merge

The Release workflow fires once on this PR's merge to main. semantic-release sees v1.0.0 reachable, computes next version off the fix: commits since then (PR #37's fix(context): + this PR's fix(release):), and @semantic-release/git publishes v1.0.1 on a commit that lives on main. Packagist gets notified, and release #3 onward will follow the same clean path.

⚠️ MERGE STRATEGY

Must be merged with "Create a merge commit" (not Squash, not Rebase). Squash or rebase would replay the commits as new ones and the orphan bf6f62a would never land in main's ancestry — v1.0.0 would stay invisible and the same bug would persist.

Test plan

  • Confirm Quality Checks pass on this PR
  • Merge via "Create a merge commit"
  • Verify git fetch origin && git merge-base --is-ancestor v1.0.0 origin/main exits 0
  • Watch the triggered Release workflow run; expect tag v1.0.1 created on a commit that is an ancestor of main
  • Verify Packagist publishes convertcom/php-sdk 1.0.1

🤖 Generated with Claude Code

semantic-release-bot and others added 3 commits April 27, 2026 14:37
The chained `monorepo-builder release "<version>"` call races
@semantic-release/git and pushes its own tag at a commit that never
reaches main, orphaning every release commit and making v* tags
unreachable from main's history. Drop that call; keep only
bump-interdependency so @semantic-release/git owns commit + tag + push.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The bf6f62a 'prepare release' commit (target of v1.0.0) was produced by
monorepo-builder's release worker on the 2026-04-27 first-release run
and was never pushed to main — only the v1.0.0 and 1.0.0 tags were
pushed, holding the commit alive as an orphan. semantic-release's
'last release' lookup is reachability-based, so it could not see
v1.0.0 from main and defaulted to first-release 1.0.0 on every
subsequent run, which monorepo-builder's ReleaseGuard then rejected
(same-version error).

Merging the orphan commit back into main puts v1.0.0 inside main's
ancestry without moving or deleting the tag, so the next release run
will correctly compute next-version = 1.0.1 off the PR #37 fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@abbaseya abbaseya self-assigned this May 21, 2026
@abbaseya
abbaseya requested a review from DmytroConvert May 21, 2026 16:09
DmytroConvert
DmytroConvert previously approved these changes May 21, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request migrates the release process to semantic-release and adjusts the monorepo-builder configuration to prevent race conditions during the prepare phase. It also updates inter-package dependency constraints to caret ranges and reformats several composer.json files. The reviewer identified a critical architectural issue where relative paths are used in the autoload section of the Data and Experience packages, which would break functionality when these packages are installed as standalone dependencies. Additionally, the reviewer recommended removing the redundant version field from all composer.json files to prevent metadata staleness now that the automated bumping tool has been removed from the release process.

Comment thread packages/Data/composer.json
Comment thread packages/Experience/composer.json
Comment thread packages/Data/composer.json
Comment thread packages/Enums/composer.json
Comment thread packages/Experience/composer.json
Comment thread packages/Logger/composer.json
Comment thread packages/Php-sdk/composer.json
Comment thread packages/Utils/composer.json
The orphan v1.0.0 commit was created by CI (Yarn Classic 1.22) and
ships a Classic v1 lockfile; merging it overwrote main's Berry-format
lockfile. Restore main's yarn.lock — unrelated to the release-pipeline
fix and would have caused noisy reformat diffs for local Berry users.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@abbaseya
abbaseya merged commit 8355f30 into main May 21, 2026
10 checks passed
@abbaseya
abbaseya deleted the fix/release-pipeline-restore-tag-reachability branch May 21, 2026 17:02
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.

3 participants