test(install): assert the installed launcher Exec target actually exists#6
Merged
Merged
Conversation
The hardcoded-home portability fix already shipped (Exec is path-free in the source and install.sh rewrites the installed copy to $HOME/.local/bin/blog), and test_desktop_entry.py pins the Exec string. But nothing verified the launcher TARGET exists -- the precise reason clicking 'Retro Writer' would silently fail on a machine whose home is not the author's. Add one regression test: run install.sh under a throwaway HOME, then assert the installed entry's Exec resolves to a real, clickable file (the blog symlink install.sh just created) and never leaks another user's home. Reintroducing the original bug turns it RED; against current main it is GREEN. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
CONTRACT
After
install.sh, clicking 'Retro Writer' in the app menu launches the app for this user.WORLD
The hardcoded-home portability fix already shipped: the source
.desktopExec is path-free andinstall.shrewrites the installed copy to$HOME/.local/bin/blog.test_desktop_entry.pypins the Exec string.FAILURE (the remaining gap)
Nothing verified the launcher target exists — the precise reason clicking 'Retro Writer' would silently fail on a machine whose home is not the author's.
FIX
One regression test: run
install.shunder a throwaway HOME, then assert the installed entry's Exec resolves to a real, clickable file (theblogsymlink install.sh just created) and never leaks another user's home. Reintroducing the original bug (hardcode the source Exec + drop thesedrewrite) turns it RED; against current main it is GREEN.Local: install suite 3 passed (the new guard + the two existing install tests). CI (
run-tests.sh: shellcheck + coverage) is the gate.Supersedes the DO-NOT-MERGE finding PR #5. Close #5 as superseded on merge.
🤖 Generated with Claude Code