Repository navigation
fix(ci): validate and publish releases from the same commit - #2315
Merged
Merged
Conversation
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Signed-off-by: Conor Svensson <conor10@gmail.com>
Contributor
Author
gtebrean
approved these changes
Oct 15, 2026
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.
What does this PR do?
Validates, stages and publishes from the same triggering commit, repairs release-version and artifact handoff, and adds a release rehearsal that runs before merging. PR runs validate GitHub’s merge commit; snapshots use the successful main-push Build’s SHA.
Release checks the version/tag and calls the reusable Build workflow before staging. Staging bypasses Gradle’s task-output cache. A separate native Gradle
verifyReleaseArtifactstask requires the binary, sources and Javadoc JARs, POM and module metadata for every release module in the evaluated project/publication model. Currently that is 65 files across 13 modules; settings define the module set, and the count is descriptive.Verification pins group, artifact ID, release version and staging directory; rejects publication on excluded root/integration-test projects; rechecks existing files on every invocation; and writes its inventory only after all modules pass. It adds no producer dependency, but runs after staging when both are requested in one invocation. It explicitly opts out of configuration caching.
Before checksums are recorded, every inventory entry must belong to the staged file set. SHA-256 checksums and source metadata accompany the uploaded artifact. A downstream job downloads the exact artifact ID and rechecks completeness and bytes, including an unterminated final inventory line. The Central command excludes Gradle’s re-staging dependency and checks recorded hashes immediately before and after deployment.
After upload, each rehearsal withholds one staged metadata file and requires verification to fail without regenerating the file or retaining an inventory. It restores the file, verifies again, and requires an identical inventory and payload checksums. Actual module/file counts and the self-test result appear in the run summary. Neither verification step receives publishing secrets.
PRs matching the build/release path filter and all manual runs are rehearsals, using unique test versions and downloadable packages/Javadocs. Central deployment, GitHub release/tag creation and Javadoc publication keep their exact release-branch-push guards, step-scoped secrets, read-only default permissions,
pull_requesttrigger and non-persisted checkout credentials. Newer rehearsals may cancel older runs; live publication runs are never cancelled by this policy.Tag lookup uses the tag namespace and dereferences annotated tags. Hyphenated versions become prereleases and are not marked latest. Snapshot jobs are serialized and check their completed Build SHA against remote main before setup and immediately before publication; stale runs skip cleanly.
Build runs
check, including Spotless, using tracked formatter/license inputs. Push-triggered validation disables the task-output cache; PR/manual validation retains it.Where should the reviewer start?
.github/workflows/release.yml: validation, artifact handoff, rehearsal self-test and publication gates.gradle/release-validation.gradleand its application inbuild.gradle: native publication-model verification..github/workflows/build.ymland.github/workflows/publish-snapshot.yml: reusable validation and exact-commit snapshot checks..github/RELEASE.md: current behavior, local non-SNAPSHOT staging/verification, coverage limits and recovery..github/RELEASE-DESIGN.md: proposed publication redesign, Javadoc authentication and release environment; these are not active configuration.Why is it needed?
The previous workflow dispatched Build without binding validation to the publishing checkout, referenced missing outputs and used an unrelated asset pattern. Exact-commit snapshots also need freshness checks to avoid publishing an older successful build. Rehearsals exercise packaging, verifier failure and artifact transfer before merging.
Validation — refreshed 13 October 2026
Merged current
main(f138120decb3ab88f3badc7943630d0f79b9ecce) into this branch. Current head:0317517dc49b80be34a920dd6de625d6c57d814b. The effective PR diff is eight CI/release files; the formatting baseline is already on main.Build, CodeQL and Release rehearsal succeeded. All 12 checks on this head and all six Release jobs passed. The tested merge commit is
99d8b7f6e42ba1578af5cfc58def6785df9f9916, with parents current main and the head above. Its tree matches the locally tested checkout. Main remained unchanged at the final check.Test rejection of incomplete release artifactspassed: missing metadata was rejected, then restored inventory and package checksums matched.Deploy to Maven Central (Portal),Publish JavadocsandCreate GitHub release at the validated commitwere each skipped.git diff --check main...HEADpassed. The refresh commit is DCO signed off, and both hosted DCO checks passed.Prior targeted verification on 22 September remains historical evidence; it was not rerun as part of this refresh. The verifier, release workflow and harness inputs are unchanged. That work included the retained mutation suite (32 distinct applicable historical mutants killed, one benign survivor; all seven additional safeguard mutants killed), real 13-module retained-artifact checks, excluded-project and artifact-ID rejection, configuration-cache handling, and serial/parallel task ordering. Earlier staging and git-publish preparation smoke checks did not publish. Spotless does not cover
gradle/release-validation.gradle.Remaining live-release limitations
Central precedes downstream verification and Javadocs, with separate deployments per module. Publication across services is not transactional. The runbook distinguishes recovery after a successful Central job from unsafe retries of a partial Central deployment.
Still unverified because rehearsals do not publish:
jreleaserDeploy -x publishMavenPublicationToLocalStagingRepositorysigning and uploading..ascinto staging during deployment.:jreleaserDeploytask.Javadoc authentication/identity needs the proposed follow-up. Publishing environment/reviewer/tag policies require an administrator decision. Mutable shared build fragments and action references remain; builds are not claimed reproducible. Path-filtered Release checks must not be globally required for unrelated PRs, and release branches cut from old tags execute their old workflow definitions.
This refresh merged main into the PR branch and pushed that branch, triggering automatic CI. It did not merge the PR into main, publish a release or documentation, create a tag, dispatch/rerun a workflow, or change repository settings.
Checklist
AI assistance
Implementation and automated validation assisted by OpenAI Codex. Additional review assisted by Claude Code.