Release v0.5.2: smoke-windows fix#161
Merged
Merged
Conversation
…160) Smoke-test was reading expected version from package.json on disk. Worked in build-* jobs because their `Inject version` step bumps package.json in the same runner before smoke runs. Broke in smoke-windows: that job is on a separate Windows runner (the .exe is cross-built on Linux and can't execute there), does a fresh actions/checkout at the tag ref, and has no `Inject version` step — so package.json on its disk still holds whatever value was committed at the tagged commit. When the tag's commit didn't pre-bump package.json (no chore(release): vX.Y.Z), the binary reported the injected version while smoke-windows compared against the stale committed string and failed. Fix: have smoke-test prefer `STRUCPP_EXPECTED_VERSION` env var over the package.json fallback, and have every smoke step in release.yml export `${{ needs.prepare.outputs.version }}` into that env. The prepare job derives the version from `github.ref_name` (stripping the leading `v`), so it's the same source of truth all build jobs feed into `npm version`. smoke-windows now also lists `prepare` in its `needs:` array to access that output. Side benefit: the assertion now actually tests what it claims to test ("the binary reports the version we asked the pipeline to build"), not "the binary version matches whatever npm version happened to mutate package.json to" (which was a tautology in every build-job smoke step). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Roll the
STRUCPP_EXPECTED_VERSIONenv-based smoke-test fix (#160) from development into main so v0.5.2 can be tagged here.What lands
scripts/smoke-test.mjsreads expected version from env first, falls back topackage.json.release.ymlexportsSTRUCPP_EXPECTED_VERSION: ${{ needs.prepare.outputs.version }}in every smoke step.smoke-windowslistspreparein itsneeds:array.Validation: deliberate test of the fix
After this merges, v0.5.2 will be tagged WITHOUT a preceding
chore(release): v0.5.2bump. Withpackage.jsonstill saying0.5.1at the tag commit:0.5.2vianpm version, bake it into the binary.smoke-windowschecks out fresh source (package.json says0.5.1), but receivesSTRUCPP_EXPECTED_VERSION=0.5.2via env, so it compares correctly.If smoke-windows passes, the asymmetry is fixed. If it doesn't, we iterate.
Test plan
🤖 Generated with Claude Code