Skip to content

th-9c3f4e: unregister nested bundles, not just the outer .app - #606

Merged
brentrager merged 1 commit into
mainfrom
th-9c3f4e-nested-bundles
Sep 17, 2026
Merged

brentrager merged 1 commit into
mainfrom
th-9c3f4e-nested-bundles

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

Follow-up to #603, from a real miss the session-closeout lane hit while cleaning up by hand.

The gap

A SmoothFlow debug build registers three LaunchServices entries, not one:

…/Debug/SmoothFlow.app
…/Debug/SmoothFlow.app/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app
…/Debug/SmoothFlowUITests-Runner.app

lsregister -u on the outer bundle does not take the other two with it, and the rows outlive the files — so deleting the build directory leaves a machine that looks clean and isn't. install-release.sh as shipped in #603 matched only */SmoothFlow.app and would have missed both nested entries while reporting success.

That matters beyond tidiness: a stale row is exactly what lets open -a SmoothFlow resolve to something that is not the release, which would make a screenshot-based verification meaningless.

The fix

The matcher now covers any SmoothFlow*.app path. The exclusion for the official install is deliberately a prefix rather than an exact match, because /Applications/SmoothFlow.app has its own nested Updater.app — unregistering that would break Sparkle on a machine that was perfectly healthy. Too wide is the worse failure here, so the test pins both directions:

case expected
stray Debug/SmoothFlow.app unregistered
its nested Sparkle Updater.app unregistered
SmoothFlowUITests-Runner.app unregistered
/Applications/SmoothFlow.app kept
its nested Updater.app kept
/Applications/Safari.app kept

install-release.test.sh also guards against its own copy of the regex drifting from the shipped one — without that, the test would keep passing while the real matcher misbehaved. Verified the guard trips by running the suite against a deliberately broken copy.

Confirmed on this machine: lsregister -dump now returns exactly one SmoothFlow row, /Applications/SmoothFlow.app, and the new matcher correctly reports nothing stale without flagging that install's nested Updater.

🤖 Generated with Claude Code

The session-closeout lane hit this cleaning up by hand: a debug build
registers its Sparkle Updater.app and SmoothFlowUITests-Runner.app as their
own LaunchServices entries, and `lsregister -u` on the outer SmoothFlow.app
leaves both behind. Because the rows outlive the files, deleting the build
directory produces a machine that looks clean and is not — which matters
beyond tidiness, since `open -a SmoothFlow` can resolve to a stale row and a
release "verified" by launching it would prove nothing.

The matcher now covers any SmoothFlow*.app path. The exclusion for the
official install became a PREFIX rather than an exact match on purpose: the
real /Applications/SmoothFlow.app has its own nested Updater.app, and
unregistering that would break Sparkle on a machine that was fine. Too wide
is a worse failure than too narrow here, so the test pins both directions —
plus a guard against its copy of the regex drifting from the shipped one,
which would otherwise let this pass while the real matcher misbehaved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f8f1472

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager
brentrager enabled auto-merge (squash) September 17, 2026 19:05
@brentrager
brentrager merged commit 5e5eea2 into main Sep 17, 2026
5 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