Skip to content

Strict SemVer checks; keep polling Packagist through transient errors - #70

Merged
tomasr78 merged 1 commit into
mainfrom
ci/strict-semver-and-poll-retry
Oct 20, 2026
Merged

tomasr78 merged 1 commit into
mainfrom
ci/strict-semver-and-poll-retry

Conversation

@tomasr78

@tomasr78 tomasr78 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #69, addressing the three Copilot review points that landed after it was merged:

  • release.yml Packagist poll: Actions runs steps with bash -e, so a failed curl or jq in the REF=$(…) assignment ended the step on the first attempt instead of retrying. It now falls back to REF='' and the loop tries again. (The v3.0.1 release run was not affected: Packagist answered on the first attempt.)
  • Strict SemVer in build.yml, release.yml and ConfigurationTest: no leading zeros in numeric pre-release identifiers (3.0.1-beta.01), no empty identifiers, and no leading zeros in the core numbers in the test (03.0.1).
  • build.yml: rejects a ConvertApi::VERSION that is a pre-release of the latest release (e.g. 3.0.1-beta.1 after v3.0.1), which SemVer sorts below it.

Checked locally: the regex accepts 3.0.1, 3.1.0-beta.1, 3.1.0-rc.0 and 3.1.0-x-1.2a, and rejects 03.0.1, 3.0.1-beta.01, 3.0.1-beta..1 and 3.0.1-. The offline tests pass.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 20, 2026 07:55

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 focused validation and retry changes have no identified blocking issues.

No open issues 🎉

What changed in this PR

Tightens version validation across tests and CI, and makes release verification tolerate transient Packagist failures.

Changes:

  • Rejects leading zeros in numeric SemVer prerelease identifiers.
  • Rejects prereleases of the latest stable release.
  • Continues Packagist polling after request or parsing failures.
File Description
tests/​ConvertApi/​ConfigurationTest.php Tightens the version-format assertion.
.github/​workflows/​release.yml Strengthens tag validation and retries failed Packagist checks.
.github/​workflows/​build.yml Strengthens version validation and prevents prerelease regressions.

Review effort: Balanced

Addresses the Copilot review of #69: the Packagist poll in release.yml
aborted on the first failed request under bash -e; SemVer validators
accepted leading-zero pre-release identifiers; build.yml let VERSION be a
pre-release of the latest release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tomasr78
tomasr78 force-pushed the ci/strict-semver-and-poll-retry branch from 415e957 to 5d3ffa6 Compare October 20, 2026 07:56
@tomasr78
tomasr78 merged commit 82a7b58 into main Oct 20, 2026
15 of 16 checks passed
@tomasr78
tomasr78 deleted the ci/strict-semver-and-poll-retry branch October 20, 2026 07:59
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