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:
@@ -4,13 +4,10 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -219,16 +216,8 @@ func TestReferenceWorkflowsLive(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer func() { cancel(); runner.wg.Wait() }()
|
||||
var alerts atomic.Int32
|
||||
endpoint := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
alerts.Add(1)
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
fmt.Fprint(w, `{"id":"reference-local-receipt","event":"message"}`)
|
||||
}))
|
||||
defer endpoint.Close()
|
||||
t.Setenv("PIPELINES_NTFY_URL", endpoint.URL+"/reference")
|
||||
t.Setenv("PIPELINES_NTFY_TOKEN", "")
|
||||
t.Setenv("PIPELINES_NTFY_TOKEN_FILE", "")
|
||||
notes, recorder := newNoteCapture(t, store)
|
||||
runner.notes = notes
|
||||
type result struct {
|
||||
Name string `json:"name"`
|
||||
Verified bool `json:"verified"`
|
||||
@@ -292,7 +281,7 @@ func TestReferenceWorkflowsLive(t *testing.T) {
|
||||
pid = p.ID
|
||||
}
|
||||
}
|
||||
priorAlerts := alerts.Load()
|
||||
priorAlerts := len(recorder.recorded())
|
||||
run, err := runner.start(protocol.Message{PipelineID: pid, Version: 1, RequestKey: c.name, Workspace: workspace, Input: map[string]any{"prompt": c.prompt}})
|
||||
if err != nil {
|
||||
row.Diagnostic = err.Error()
|
||||
@@ -327,11 +316,11 @@ func TestReferenceWorkflowsLive(t *testing.T) {
|
||||
t.Fatal("workspace capture absent")
|
||||
}
|
||||
}
|
||||
wantAlerts := int32(0)
|
||||
wantAlerts := 0
|
||||
if c.name == "incident-handoff" || c.name == "missing-input-failure" {
|
||||
wantAlerts = 1
|
||||
}
|
||||
if alerts.Load()-priorAlerts != wantAlerts {
|
||||
if len(recorder.recorded())-priorAlerts != wantAlerts {
|
||||
t.Fatal("unexpected notification count")
|
||||
}
|
||||
t.Logf("Verified %s: run #%d status=%s visits=%d", c.name, run.ID, run.Status, len(run.Steps))
|
||||
|
||||
Reference in New Issue
Block a user