Repository navigation
fix(updater): remove unused factory Spoolman install leftovers - #423
Merged
Merged
Conversation
RobeMartins
approved these changes
Nov 19, 2026
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.
Description
Factory images leave about 210 MB of unused Spoolman install leftovers in
~/Spoolman, and git reports them as untracked. Once the new install is confirmed healthy, the Spoolman hook now removes them.Changes
updater/hooks/Spoolman.sh: after the health check passes, remove~/Spoolman/Spoolman/(a v0.26.0 release zip with its own.venv, about 167 MB) and~/Spoolman/uv/(the "temporary uv" from upstreamscripts/install.sh, about 46 MB). Each path is removed only when all of these hold:Spoolman.service's WorkingDirectory;release_info.jsonwith"project_name": "Spoolman"for the zip, onlyuv/uvxfor the uv dir;*.db*file (database or backups) and no.envsettingSPOOLMAN_DIR_DATA/SPOOLMAN_DIR_BACKUPS.finderror (for example a corrupt index or "dubious ownership") keeps the folder.tests/updater/test_hooks_unit.py:TestSpoolmanHookruns the real hook with stubbed uv/curl/systemctl/sudo/sleep. It covers:.envsetting;Motivation
Upstream
scripts/install.sh(lines 31-50) installs uv into$(pwd)/uvviaUV_UNMANAGED_INSTALL. The factory image ran it twice: once in~/Spoolmanand once in a release zip unpacked inside it. The service runs~/Spoolman/scripts/start.shfrom~/Spoolman/.venv, so nothing uses either leftover. The updater never deletes untracked files, and on a reclone_carry_untrackedmoves them into the fresh tree, so without this they stay forever.The hook runs whenever Spoolman is updated or provisioned. Field boxes therefore clean up on their next Spoolman update, for example the move onto the
ff8efd51pin. Boxes already on the pin clean up at the next pin bump.Tests
make check: format-check, lint and security pass, and docstrcov is 84.6%. The localtest-fastfailures are only the sandbox's blockedgit commitin git-fixture tests: the same 35 tests fail on untouched dev. The new tests stage withgit addonly, so they also run locally.pytest tests/updater/test_hooks_unit.py -k Spoolman: 10 passed. shellcheck is clean.