Skip to content

fix(release): stop RUSTFAVA_VERSION breaking the sidecar smoke test - #303

Merged
robcohen merged 1 commit into
mainfrom
fix/sidecar-smoke-envvar-collision
Aug 22, 2026
Merged

robcohen merged 1 commit into
mainfrom
fix/sidecar-smoke-envvar-collision

Conversation

@robcohen

Copy link
Copy Markdown
Member

The v1.32.0 desktop release failed on every platform:

Error: Invalid value for '--version': '1.32.0' is not a valid boolean.
##[error]frozen sidecar failed to start or serve (the #233 failure class)

Not a packaging problem

desktop-release.yml writes RUSTFAVA_VERSION=<tag> into $GITHUB_ENV so the PyInstaller spec can bake the version into rustfava/_version.py (#191). $GITHUB_ENV leaks into every later step of the job — including the one that actually runs the frozen binary.

The CLI is declared @click.command(context_settings={"auto_envvar_prefix": "RUSTFAVA"}) (cli.py:51), so click reads RUSTFAVA_VERSION as --version, which is a boolean flag. The sidecar exited on a usage error before serving anything, and the smoke test correctly reported it dead.

Only tag builds set the variable, so this could not appear on a PR or on main. v1.32.0 is the first tagged release since the smoke test was added in #239 — a check that only runs in the one situation nobody could test.

Fix

Renamed to FROZEN_APP_VERSION at both sites, deliberately outside the RUSTFAVA_ prefix so no future internal variable can be re-read as a CLI option.

Verified both directions locally:

RUSTFAVA_VERSION=1.32.0   rustfava --port … ledger  -> usage error, exit 120
FROZEN_APP_VERSION=1.32.0 rustfava --port … ledger  -> serves normally

Also: RELEASING.md was wrong twice

Found while working the release:

  • It names build-publish.yml, which doesn't exist — the workflow is publish.yml.
  • It states PyPI "publishes automatically … no manual approval is configured". The pypi environment has 2 protection rules, so the publish job sits in waiting until a reviewer approves. Observed on this release: build, docker and smoke-wheel all completed unattended and only PyPI stopped.

The v1.32.0 desktop release failed on every platform:

    Error: Invalid value for '--version': '1.32.0' is not a valid boolean.
    ##[error]frozen sidecar failed to start or serve (the #233 failure class)

Not a packaging problem. `desktop-release.yml` writes
RUSTFAVA_VERSION=<tag> into $GITHUB_ENV so the PyInstaller spec can bake
the version into rustfava/_version.py (#191). $GITHUB_ENV leaks into
every later step of the job, including the one that actually runs the
frozen binary — and the CLI is declared with
`auto_envvar_prefix: "RUSTFAVA"` (cli.py:51), so click reads
RUSTFAVA_VERSION as `--version`, a boolean flag. The sidecar exited on a
usage error before serving anything, and the smoke test correctly
reported it as dead.

Only tag builds set the variable, so this could not appear on a PR or on
main. v1.32.0 was the first tagged release since the smoke test was
added in #239, which is exactly when it fired: a check that only runs in
the situation nobody could test.

Renamed to FROZEN_APP_VERSION at both sites, deliberately outside the
RUSTFAVA_ prefix so no future internal variable can be re-read as a CLI
option. Verified both directions:

    RUSTFAVA_VERSION=1.32.0  rustfava --port … ledger  -> usage error, exit 120
    FROZEN_APP_VERSION=1.32.0 rustfava --port … ledger  -> serves normally

Also corrects RELEASING.md, which named a workflow that does not exist
(`build-publish.yml`, actually `publish.yml`) and stated that PyPI needs
no manual approval. The `pypi` environment has protection rules, so the
`publish` job sits in `waiting` until a reviewer approves — observed on
this very release, where build/docker/smoke-wheel completed unattended
and only PyPI stopped.
@robcohen
robcohen merged commit 1656792 into main Aug 22, 2026
32 checks passed
@robcohen
robcohen deleted the fix/sidecar-smoke-envvar-collision branch August 22, 2026 19:14
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