Skip to content

fix(update): apply quiesce stops services with the current uffs, not a stale sibling#440

Merged
githubrobbi merged 1 commit into
mainfrom
fix/quiesce-stop-uses-current-uffs
Jun 17, 2026
Merged

fix(update): apply quiesce stops services with the current uffs, not a stale sibling#440
githubrobbi merged 1 commit into
mainfrom
fix/quiesce-stop-uses-current-uffs

Conversation

@githubrobbi

@githubrobbi githubrobbi commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

uffs --update apply failed at quiesce with "daemon did not stop within 20s (PID file lingered)" whenever the running daemon was launched from a different/older location than the install being updated (e.g. a dev daemon from target/release/uffsd next to a ~/bin install).

Root cause (caught live): a manual ~/bin/uffs --daemon stop worked, but the same stop inside apply failed — because quiesce drove it with uffs_sibling(daemon) = the uffs next to the daemon's image (target/release/uffs, a stale build whose pre-fix Unix gate refuses the stop). Stopping is socket-based, so the binary's location shouldn't matter — but its version did.

Fix: resolve the stop driver as the uffs next to the running uffs-update helper (the install under update — guaranteed current management logic), then the component image dir, then bare uffs on PATH. Pure pick_uffs(helper_dir, image_dir) helper + unit test pinning the helper→image→PATH priority (replaces the old image-only test, which asserted the buggy behaviour).

This is the last blocker for uffs --update apply end-to-end on Unix (with the v0.6.5 privilege-aware gate).

Host + Windows-MSVC clippy clean; uffs-update tests pass; full pre-push gate green.

…a stale sibling

`uffs --update apply` failed at quiesce with "daemon did not stop within 20s
(PID file lingered)" whenever the running daemon was launched from a different
/ older location than the install being updated (e.g. a dev daemon from
`target/release/uffsd` alongside a `~/bin` install).

Root cause: quiesce ran `uffs --daemon stop` using `uffs_sibling(running)` —
the `uffs` next to the *component's image* (`target/release/uffs`). That stale
binary's pre-fix Unix gate refuses the stop, so the daemon never stops, even
though a manual `~/bin/uffs --daemon stop` works fine (it uses the current
CLI). Stopping goes through the daemon socket, so the binary's *location*
shouldn't matter — but its *version* did.

Fix: resolve the stop driver as the `uffs` next to the running `uffs-update`
helper (the install under update — guaranteed current management logic), then
the component image dir, then bare `uffs` on PATH. Split into a pure
`pick_uffs(helper_dir, image_dir)` with a unit test pinning the
helper->image->PATH priority (replaces the old image-only test, which asserted
the buggy behaviour).

Host + Windows-MSVC clippy clean; uffs-update tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@githubrobbi githubrobbi enabled auto-merge (squash) June 16, 2026 23:48
@githubrobbi githubrobbi merged commit 921dae8 into main Jun 17, 2026
21 checks passed
@githubrobbi githubrobbi deleted the fix/quiesce-stop-uses-current-uffs branch June 17, 2026 00:01
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