Remove ntfy: notifications go only through the app notification stream
Server: drop ntfy publishing (stage hooks, run outbox, chat attention, chat tool notify, auto-switch and schedule notices), the chat push outbox (its table is dropped at startup), ntfy status/endpoints and PIPELINES_NTFY_*. The app_notifications stream, subscribe/clear and kinds are unchanged. Notification settings keep run_finished/chat_needs_you/chat_reply_finished; ntfy_enabled is accepted and ignored and its stored row is never read. Stage type=ntfy is rejected: "ntfy stages were removed; notifications go to the Pipelines apps — use the stage notify hook". The notify hook remains. Installer: no ntfy build, accounts, config or supervisor child; manifest gets top-level "mode" (legacy ntfy.mode still read). Reinstall retires an old ntfy (safe PID-file stop, deletes binary, config, data dir, token, log, with a note in logs/install.log); uninstall cleans leftovers. App: ntfy settings section replaced by "Notification events"; texts updated. Docs: docs/ntfy.md folded into docs/notifications.md; install, docker, cli, author skill references updated; security review M1 marked resolved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -252,6 +252,35 @@ class UninstallTests(unittest.TestCase):
|
||||
runner=processes, system="Linux").run()
|
||||
self.assertEqual(signalled, [40001, 40002, 40003])
|
||||
|
||||
def test_leftover_ntfy_is_removed_when_the_manifest_no_longer_mentions_it(self):
|
||||
self.put(self.prefix / "pipelines-install.json", json.dumps({
|
||||
"format": 1, "mode": "native", "prefix": str(self.prefix)}))
|
||||
for name in ("bin/ntfy", "ntfy.pid", "logs/ntfy.log", "data/ntfy/auth.db", "secrets/publisher-token"):
|
||||
self.put(self.prefix / name)
|
||||
original = self.recorder
|
||||
commands = [f"{self.prefix}/bin/ntfy serve --config {self.prefix}/data/ntfy/server.yml",
|
||||
"/usr/bin/ntfy serve"]
|
||||
|
||||
def processes(command, **kwargs):
|
||||
if command[0] == "ps":
|
||||
return subprocess.CompletedProcess(command, 0, stdout="\n".join(
|
||||
f"{40001 + i} {text}" for i, text in enumerate(commands)), stderr="")
|
||||
return original(command, **kwargs)
|
||||
|
||||
signalled = []
|
||||
def signal_process(pid, number):
|
||||
if number == 0:
|
||||
raise ProcessLookupError()
|
||||
signalled.append(pid)
|
||||
|
||||
with patch.object(uninstall.os, "kill", side_effect=signal_process):
|
||||
uninstall.Uninstall(home=self.home, repo=self.repo, environ={},
|
||||
runner=processes, system="Linux").run()
|
||||
self.assertEqual(signalled, [40001])
|
||||
self.assertFalse(self.prefix.exists())
|
||||
docker = [c for c in original.calls if c and c[0] == "docker"]
|
||||
self.assertTrue(any("pipelines_ntfy-data" in c and "rm" in c for c in docker))
|
||||
|
||||
def test_macos_reset_uses_only_its_launch_agent(self):
|
||||
unit = self.put(self.home / "Library/LaunchAgents/net.a-wan.pipelines.plist",
|
||||
"Managed by Pipelines native installer")
|
||||
|
||||
Reference in New Issue
Block a user