Repository navigation
ci: make the smoke test check the version it was triggered for - #79
Merged
Merged
Conversation
On a tag push the workflow_dispatch input is empty, so the job ran a bare
`pip install modelfuzz` -- PyPI's current latest. There is no publish
workflow, so the tag lands before the upload and the job smoke-tested the
previous release and reported green. The only version assertion compared
two values from the same install.
The expected version now comes from the dispatch input or the tag name,
the install retries while PyPI indexes the release, and the installed
version is asserted equal to it. The sdist check is pinned the same way.
The dispatch input also reached bash through ${{ }} interpolation, so a
value like 0.3.8$(id -un) was executed. It now travels through env and is
validated against a version pattern first.
Also: declare permissions: contents: read on both workflows, and pin the
three third-party actions to commit SHAs.
Fixes #76
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
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.
Fixes #76.
The problem
On
push: tags: v*the dispatch input is empty, so the job ran a barepip install modelfuzzβ PyPI's current latest. There is no publish workflow in this repo, so the tag lands before the upload and the job smoke-tested the previous release and went green. The one version assertion compared two values from the same install, so it could never fail.This matters now: it's the check that would have been vouching for the 0.4.0 release.
Changes
v0.4.0β0.4.0), else none (then it tests latest, as before).${{ github.event.inputs.version }}was interpolated intorun:bash, and command substitution fires even inside a quoted test (0.3.8$(id -un)βmodelfuzz==0.3.8gagandeep, confirmed). The value now travels viaenv:and is validated against a version pattern before use. Needs repo write access to trigger, so low-privilege β but free to fix.permissions: contents: readon both workflows (they ran with the repo-default token).checkout,setup-python,setup-uv), with the tag in a trailing comment.Verified
I can't run Actions locally, so I tested the shell logic directly:
v0.4.00.4.00.3.8,0.4.0rc10.3.8$(id -un)0.3.8; curl evil.comv0.4.0-evilBoth YAML files parse. The retry loop and real PyPI install can only be exercised on the next tag or a manual dispatch β worth a
workflow_dispatchrun with the current0.3.9after merge as a sanity check.π€ Generated with Claude Code