Repository navigation
fix(desktop): install real project deps; smoke test the frozen sidecar - #239
Merged
Merged
Conversation
Fixes #233. The sidecar build pip-installed a hand-maintained package list that drifted from pyproject.toml twice: simplejson (core since #215, imported at charts.py:16 in the startup chain) and wasmtime (core since the component engine became the only backend; the list's comment still called it an optional extra). Result: the v1.31.0 desktop sidecar crashed on startup on every platform, and nothing in the pipeline ever executed the binary to notice. - Install `pyinstaller .` so the frozen build gets exactly pyproject's dependencies; the drift class is gone. - Add a functional smoke step to the matrix: run the frozen sidecar against a mini ledger and require an HTTP response. Catches the #233 failure class (missing bundled module, startup crash) on all four platforms before release, including the Rosetta x64 binary.
All four runners reproduced the pip BackendUnavailable against the custom build backend (same as local). uv drives the backend fine, so: uv builds the pure-Python wheel natively (arch-independent), then the arch-pinned pip installs the wheel, keeping dependency resolution under the target arch for the Rosetta x64 build.
Round 2's smoke caught the next layer on all four platforms: the sidecar started but every engine call 500'd because PyInstaller never bundled wasmtime's _libwasmtime native library (leading-underscore name in a platform subdir defeats collect_dynamic_libs' default lib*.so pattern; explicit patterns fix it — verified present in the local build TOC). The smoke step now also requires an engine-backed API endpoint, so a Flask shell that starts without a working engine can never pass again.
Round 3 proved the dynlib fix (sidecar starts and serves everywhere); the engine probe 404'd only because the hardcoded slug guess was wrong. Derive the API URL from the / redirect instead, and log it.
This was referenced Aug 22, 2026
robcohen
added a commit
that referenced
this pull request
Aug 22, 2026
…303) 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.
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 #233 — the v1.31.0 desktop app cannot open any ledger on any platform.
Root cause
The sidecar build pip-installed a hand-maintained dependency list that drifted from
pyproject.tomltwice:simplejson— core dep since feat(json): emit Decimals as exact number literals (frontend-decimal epic, step A) #215, imported unconditionally atcharts.py:16in the startup chain → the reporter's crashwasmtime— core dep since the component engine became the only backend; the list's stale comment still called it "an optional dependency (thecomponentextra)" → a second crash waiting behind the firstNothing in the pipeline ever executed the frozen binary, so it shipped.
Fix
pip install pyinstaller .— the frozen build now gets exactlypyproject's dependencies; the drift class is structurally gonebuild-sidecarchecks are the live validation — on unfixed main this step would fail exactly as Unable to open a file due to missing simplejson module #233 does.Follow-up after merge: cut v1.32.0 so desktop users get a working app; interim workaround for v1.31.0 desktop users is
pipx install rustfava(the PyPI wheel's dependencies are correct).🤖 Generated with Claude Code