Skip to content

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
mainfrom
catrina/2026-06-13/w1-retro-writer-desktop-exec-rewrite
Open

DO-NOT-MERGE · bug: install.sh ships a desktop launcher hardcoded to /home/ishtar — broken for every other user#5
Antawari wants to merge 1 commit into
mainfrom
catrina/2026-06-13/w1-retro-writer-desktop-exec-rewrite

Conversation

@Antawari

Copy link
Copy Markdown
Contributor

DO NOT MERGE — fleet quality burn unit

The reported claim

desktop/retro-writer.desktop pins Exec=/home/ishtar/.local/bin/blog and bin/install.sh copies it with a plain cp (no path rewrite), so on any machine whose home is not /home/ishtar the installed ~/.local/share/applications/retro-writer.desktop Exec points at a nonexistent path and clicking 'Retro Writer' silently fails. Fix = rewrite the Exec line on copy.

Finding: the bug is already FIXED on main

The reported state matches a stale pre-fix checkout. On the current trunk the portability fix already shipped:

Running install.sh with HOME != /home/ishtar produces Exec=$HOME/.local/bin/blog — the claim's oracle no longer reproduces. No src/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 — runs install.sh under a throwaway HOME, then asserts the installed entry's Exec resolves to a real, clickable file (the blog symlink 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 the sed rewrite for a plain cp) turns it RED; against fixed main it 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-theme coverage 100%. No test weakened/skipped/deleted; no budget inflated; no tracker IDs in shipped src.

🤖 Generated with Claude Code

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>
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.

2 participants