feat: Telegram fleet alerts, forge sigil scramble, UI polish, agent ops
- Calibrate: per-event Telegram/SMTP toggles, test notification, chat ID help - Notify on agent connect/reconnect, offline/hashrate/rejection, forge complete - Sigil scramble post-forge uniquification and Dispense Reveal ceremony - Full system check, desktop push, BITS/host-binary persistence, Path Tracer - Dashboard/Crucible visual polish, haptics, sacred geometry, mobile nav - README documents alerts, sigil scramble, and pack-usb workflow - USB bundle repacked via pack-usb.bat (AetherForge.exe + synced agent source)
This commit is contained in:
25
server/internal/alerts/notifier_test.go
Normal file
25
server/internal/alerts/notifier_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package alerts
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestNotifierRespectsToggles(t *testing.T) {
|
||||
n := NewNotifier(func() Settings {
|
||||
return NewSettings(
|
||||
NotifyConfig{TelegramBotToken: "t", TelegramChatID: "1"},
|
||||
EventToggles{AgentConnect: false, AgentReconnect: true},
|
||||
)
|
||||
})
|
||||
// disabled — no panic
|
||||
n.Emit(EventAgentConnect, "title", "body")
|
||||
n.Emit(EventAgentReconnect, "title", "body")
|
||||
}
|
||||
|
||||
func TestSettingsEnabledForAlertType(t *testing.T) {
|
||||
s := NewSettings(NotifyConfig{}, EventToggles{AgentOffline: false, HashrateDrop: true})
|
||||
if s.EnabledForAlertType("offline") {
|
||||
t.Fatal("expected offline disabled")
|
||||
}
|
||||
if !s.EnabledForAlertType("hashrate_drop") {
|
||||
t.Fatal("expected hashrate enabled")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user