Skip to content

fix: the test suite installed a LaunchAgent on the tester's own Mac - #2

Merged
jackiectl2 merged 2 commits into
mainfrom
v8-test-side-effects
Aug 20, 2026
Merged

jackiectl2 merged 2 commits into
mainfrom
v8-test-side-effects

Conversation

@jackiectl2

Copy link
Copy Markdown
Owner

Found while diagnosing why notifications on the workstation showed alerts nobody could account for — oneliner · 完成, proj-v0 · 完成, project names matching no real project.

What happened

packaging/get-tailbell.sh branches on uname, and on Darwin it runs mac/install.sh, which writes a LaunchAgent and launchctl loads it. The one-liner test ran that unguarded with HOME pointed at a throwaway directory. The directory was cleaned up at the end of the run; the loaded job was not. It kept running out of /var/folders/…/T/tmp.*/onelinerhome/, tailing a deleted fixture, drawing test data onto a real screen — and reading, to the person watching, like tailbell itself was broken.

The suite also called the real osascript and afplay on macOS, so a plain test run popped overlays and made noise at whoever ran it.

Neither was visible on the cluster this was written on, where every macOS path is dead code. Same blindness docs/MIGRATION.md exists to end.

Fixes

Both are the rule this repo already had, not a new one:

  • uname is faked to Linux for that one call. What the case tests is the agent side the one-liner installs; the workstation installer has its own coverage and must never be executed by the suite.
  • osascript, afplay and say go through a new tests/fake-desktop recorder for the whole run — the same seam TAILBELL_CURL has always had for the network.

Tests

128 → 130. Two new cases: no LaunchAgent is written during the one-liner install, and the three desktop seams are still pointed at the recorder (losing that is silent on Linux, which is how it shipped).

jackiectl2 and others added 2 commits August 20, 2026 03:03
This was the one capability the chat panel cannot have at all, so it was worth
confirming rather than assuming. It works.

Records why the first two attempts looked like a failure: Claude Code
auto-approves low-risk commands without raising a permission event, so 'uptime'
and 'touch /tmp/x' test nothing. The next person to check this would have drawn
the same wrong conclusion twice, as I did.

Co-Authored-By: Claude <noreply@anthropic.com>
The one-liner branches on uname, and on Darwin it runs mac/install.sh, which
writes a LaunchAgent and launchctl-loads it. The suite ran that unguarded, with
HOME pointed at a throwaway directory. The directory was cleaned up; the loaded
job was not. It went on tailing a deleted fixture and drawing 'oneliner · 完成'
onto a real screen for days, and looked exactly like tailbell misbehaving.

Written on a cluster, every macOS path in the suite is dead code, so nothing was
visible there -- the same blindness docs/MIGRATION.md is about. Two fixes, both
of them the rule this project already had rather than a new one:

- uname is faked to Linux for that one call. The workstation installer has its
  own coverage and must never be executed by the suite.
- osascript, afplay and say now go through tests/fake-desktop for the whole run,
  the same seam TAILBELL_CURL has always had for the network. A case asserts the
  three are still pointed at it, because losing that is silent on Linux.

Co-Authored-By: Claude <noreply@anthropic.com>
@jackiectl2
jackiectl2 merged commit 74c195c into main Aug 20, 2026
4 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