DO-NOT-MERGE · bug: install.sh ships a desktop launcher hardcoded to /home/ishtar — broken for every other user#5
Open
Antawari wants to merge 1 commit into
Conversation
The hardcoded-home portability fix (source Exec is path-free `Exec=blog`; install.sh rewrites the installed copy's Exec to $HOME/.local/bin/blog) was shipped and its Exec *string* is pinned in tests/test_desktop_entry.py. The other half of the symptom went unguarded: nothing verified the launcher target actually EXISTS for the installing user — the precise reason clicking 'Retro Writer' would silently fail on any machine whose home is not the author's. This adds a regression test that runs install.sh under a throwaway HOME and asserts the installed entry's Exec resolves to a real, clickable file (the `blog` symlink just laid down) and never leaks the author's /home. Verified falsifiable: reintroducing the plain-cp bug turns it RED. 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.
DO NOT MERGE — fleet quality burn unit
The reported claim
Finding: the bug is already FIXED on
mainThe reported state matches a stale pre-fix checkout. On the current trunk the portability fix already shipped:
b5212e8— fix(desktop): make launcher Exec portable, drop hardcoded home path (DO-NOT-MERGE · Fix the broken, internal-path Exec= in the .desktop launcher (public-repo leak + broken for every other user) #2): the sourcedesktop/retro-writer.desktopis now path-free (Exec=blog), andbin/install.sh:33rewrites the installed copy withsed -i "s|^Exec=.*|Exec=$LOCAL_BIN/blog|"so the menu entry points at the running user's own~/.local/bin/blog.tests/test_desktop_entry.pyalready pins the Exec string: source carries no/home/, and the installed Exec equals$HOME/.local/bin/blogunder a throwaway HOME.Running
install.shwithHOME != /home/ishtarproducesExec=$HOME/.local/bin/blog— the claim's oracle no longer reproduces. Nosrc/script change is warranted.What this PR adds (the remaining gap, honestly scoped)
The Exec string was pinned, but nothing verified the launcher target actually exists — the precise reason clicking 'Retro Writer' would silently fail. This adds one regression test to
tests/test_install.py:test_installed_desktop_exec_target_is_a_real_clickable_file— runsinstall.shunder a throwaway HOME, then asserts the installed entry's Exec resolves to a real, clickable file (theblogsymlink install.sh just created), and never leaks/home/ishtar.Falsifiable, not vacuous
Verified the test is a genuine guard: reintroducing the original bug (hardcode the source Exec back to
/home/ishtar/...+ drop thesedrewrite for a plaincp) turns it RED; against fixedmainit is GREEN.Gate
Full repo gate (
./run-tests.sh: shellcheck + pytest-under-coverage + 95% coverage gate) green in an isolated venv: 105 passed, shellcheck clean,bin/crt-themecoverage 100%. No test weakened/skipped/deleted; no budget inflated; no tracker IDs in shipped src.🤖 Generated with Claude Code