Skip to content

Release v0.5.2: smoke-windows fix#161

Merged
thiagoralves merged 1 commit into
mainfrom
development
Jun 2, 2026
Merged

Release v0.5.2: smoke-windows fix#161
thiagoralves merged 1 commit into
mainfrom
development

Conversation

@thiagoralves
Copy link
Copy Markdown
Contributor

Summary

Roll the STRUCPP_EXPECTED_VERSION env-based smoke-test fix (#160) from development into main so v0.5.2 can be tagged here.

What lands

  • scripts/smoke-test.mjs reads expected version from env first, falls back to package.json.
  • release.yml exports STRUCPP_EXPECTED_VERSION: ${{ needs.prepare.outputs.version }} in every smoke step. smoke-windows lists prepare in its needs: array.

Validation: deliberate test of the fix

After this merges, v0.5.2 will be tagged WITHOUT a preceding chore(release): v0.5.2 bump. With package.json still saying 0.5.1 at the tag commit:

  • Build jobs inject 0.5.2 via npm version, bake it into the binary.
  • smoke-windows checks out fresh source (package.json says 0.5.1), but receives STRUCPP_EXPECTED_VERSION=0.5.2 via env, so it compares correctly.

If smoke-windows passes, the asymmetry is fixed. If it doesn't, we iterate.

Test plan

  • CI on this PR green (lint, typecheck, test matrix, extension build, build, smoke).

🤖 Generated with Claude Code

…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>
@thiagoralves thiagoralves merged commit 1e26318 into main Jun 2, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant