fix: harden release validation and publishing#208
Merged
Conversation
Contributor
posthog-php Compliance ReportDate: 2026-07-23 07:26:02 UTC ✅ All Tests Passed!46/46 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
|
Reviews (1): Last reviewed commit: "fix: harden release validation and publi..." | Re-trigger Greptile |
ioannisj
approved these changes
Jul 23, 2026
marandaneto
enabled auto-merge (squash)
July 23, 2026 07:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
The 4.12.1 release completed successfully but exposed gaps in the release safeguards: the automated version bump left
composer.lockstale while validation suppressed the mismatch, and a no-op release commit could allow the publish job to finish without creating a GitHub Release. The release also requested the GitHub App's default installation permissions and performed an unnecessary full checkout to build the Slack comparison URL.This makes the release path fail closed and keeps the committed Composer lock consistent with each released
composer.json. This PR intentionally does not include a change intent; the updated path can be exercised by a later release.💚 How did you test it?
composer validate --no-check-version --strictcomposer install --dry-run --no-interactiongo run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github/workflows/release.yml .github/workflows/php.ymlcomposer update --lockchanged only the lock content hashcomposer api:check./vendor/bin/phpunit --bootstrap vendor/autoload.php --configuration phpunit.xml --no-coverage(441 tests, 3,762 assertions; existing warnings/deprecations remain)📝 Checklist
If releasing new changes
pnpm changeto generate a change intent file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented with the Pi coding agent using GitHub CLI, Composer, actionlint, and a read-only reviewer subagent. The chosen approach refreshes only Composer's lock content hash during version bumps, explicitly fails when no release commit is returned, narrows the App token to
contents: write, and uses the pinned reusable workflow's checkout-free version-tag lookup. A temporary synthetic change intent was used to validate the candidate-generation path, but no release intent is committed in this PR.