Skip to content

Split script: reconstruct dropped tags, retry Packagist#221

Merged
adamziel merged 1 commit intotrunkfrom
adamziel/fix-split-tags
Apr 2, 2026
Merged

Split script: reconstruct dropped tags, retry Packagist#221
adamziel merged 1 commit intotrunkfrom
adamziel/fix-split-tags

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

@adamziel adamziel commented Apr 2, 2026

Summary

The v0.5.0 release failed to propagate to all Packagist packages because the release commit only touched the root VERSION file, not any component directory. When git filter-repo filters a component's history, it drops commits (and their tags) that don't touch that component's path. This left split repos without the version tag, so Packagist never saw the new release.

Two fixes:

Tag reconstruction — before filter-repo runs, save all version tag timestamps. After filtering, recreate any tags that got dropped by mapping them to the latest surviving commit at or before the original tag's timestamp. This handles the case where release commits don't touch every component directory.

Packagist retry — the update_packagist() call was silently swallowing failures (including HTTP 500s). Now retries 3 times with backoff before giving up with a visible warning.

After merging, a v0.5.1 patch release will re-split all components with the fixed script, which will also push the reconstructed v0.5.0 tags to every split repo.

Test plan

  • Merge and run patch release via publish workflow
  • Verify all split repos have v0.5.0 and v0.5.1 tags
  • Verify Packagist shows v0.5.0 and v0.5.1 for wp-php-toolkit/filesystem

When a monorepo release commit only touches root-level files (like
VERSION) and not component directories, git filter-repo drops the
commit and its tag from the filtered history. This means split repos
can miss version tags entirely, preventing Packagist from publishing
those versions.

Fix this by saving all version tag timestamps before filter-repo runs
and recreating any that get dropped, mapping them to the latest
surviving commit at or before the original tag timestamp.

Also add retry logic (3 attempts with backoff) for Packagist update
notifications, which were silently swallowing transient HTTP 500
errors.
@adamziel adamziel merged commit b93127f into trunk Apr 2, 2026
21 of 22 checks passed
@sirreal sirreal deleted the adamziel/fix-split-tags branch April 8, 2026 08:29
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