Unify local and GitHub release preflight validation - #34
Merged
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
JovaniPink
marked this pull request as ready for review
July 30, 2026 01:00
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
Summary
Make
scripts/release_preflight.pythe single implementation for release validation in both local development and GitHub Actions.The GitHub Release workflow now delegates its complete validation phase to the existing script, and a new manual workflow provides a safe
v0.7.0dry run againstmaster. Repository contract tests ensure the workflows continue to invoke the script instead of reintroducing copied gate commands.Why
The release workflow previously duplicated the script's tag/version checks, target-commit verification, test commands, static analysis, package build, and installed-wheel validation. That created two independently maintained release paths: local preflight could pass while GitHub ran a stale or different command set.
This change makes the Python script authoritative. GitHub Actions owns only environment setup, credential checks, delegation to the script, and, only in the published-release workflow, the final upload.
Scope
.github/workflows/release.yamlwith one call toscripts/release_preflight.py.origin/master..github/workflows/release_preflight.yamlwithworkflow_dispatch:masterwith full history and recursive submodules;v0.7.0;HEADandorigin/master;Non-scope
scripts/release_preflight.pygate selection or ordering.PYPI_TOKENguard orpoetry publishcommand in the actual release workflow.Behavior and release boundary
The manual workflow is validation-only. It always checks out
master, verifies the supplied expected tag againstpyproject.toml, confirmsHEADmatchesorigin/master, runs the complete preflight, builds artifacts, and validates the wheel without publishing.The existing GitHub Release workflow remains the only publishing path. It still requires a non-draft, non-prerelease published GitHub Release and a configured
PYPI_TOKEN; only after the shared preflight succeeds does it executepoetry publish.Merging this PR changes repository workflows, contract tests, and supporting documentation only. It does not create a tag, publish
0.7.0, or mutate PyPI.Validation evidence
Executed locally on branch head
8930bb5dda23:Using
HEADfor both refs is intentional for pre-merge branch validation: it exercises every shared gate against the proposed commit without pretending the branch is alreadyorigin/master. The merged manual and publish workflows retain the realorigin/mastercomparison.Additional focused evidence:
GitHub Actions Run tests and code quality run #53 also passed on the exact head commit.
Consistency guarantee
tests/test_release_workflows.pyparticipates in the primary suite that the preflight script itself runs. It checks that:scripts/release_preflight.pyexactly once;v0.7.0, checks outmaster, and validatesHEADagainstorigin/master;poetry publish.Risks and mitigations
v0.7.0is intentional for this release. A future version bump must update the workflow default and corresponding contract expectation explicitly.fetch-depth: 0because the script must resolve and compare release/master refs; recursive submodules remain required for the SCXML suite.Rollback
Revert commit
8930bb5. That restores the prior inline release validation, removes the manual preflight workflow and contract tests, and removes the accompanying documentation. No package or data rollback is required because this PR has no runtime or publishing side effects by itself.Review focus
origin/masterexactly as the script expects.master.PYPI_TOKENcheck and publish boundary remain unchanged.Diff-size justification
The net change is 114 insertions and 50 deletions across five files. Most additions are the explicit manual workflow and focused contract tests; the release workflow itself becomes substantially smaller by deleting duplicated Python and shell commands. Keeping workflow, test, and documentation changes together makes the ownership boundary reviewable in one PR.
Unresolved decisions
None for
v0.7.0. The next release should intentionally update the manual workflow's default expected tag and its contract test.