@@ -162,24 +162,7 @@ func run(ctx context.Context, cancel context.CancelFunc, cfg *config.ServerConfi
162162 slackManager := slack .NewManager (cfg .SlackSigningSecret )
163163
164164 // Initialize state store (in-memory + Datastore or JSON for persistence).
165- //nolint:interfacebloat // Interface mirrors state.Store for local type safety
166- var stateStore interface {
167- Thread (owner , repo string , number int , channelID string ) (state.ThreadInfo , bool )
168- SaveThread (owner , repo string , number int , channelID string , info state.ThreadInfo ) error
169- LastDM (userID , prURL string ) (time.Time , bool )
170- RecordDM (userID , prURL string , sentAt time.Time ) error
171- DMMessage (userID , prURL string ) (state.DMInfo , bool )
172- SaveDMMessage (userID , prURL string , info state.DMInfo ) error
173- ListDMUsers (prURL string ) []string
174- LastDigest (userID , date string ) (time.Time , bool )
175- RecordDigest (userID , date string , sentAt time.Time ) error
176- WasProcessed (eventKey string ) bool
177- MarkProcessed (eventKey string , ttl time.Duration ) error
178- LastNotification (prURL string ) time.Time
179- RecordNotification (prURL string , notifiedAt time.Time ) error
180- Cleanup () error
181- Close () error
182- }
165+ var stateStore state.Store
183166
184167 // Check if Datastore should be used via DATASTORE=<database-id>
185168 // Examples:
@@ -256,7 +239,7 @@ func run(ctx context.Context, cancel context.CancelFunc, cfg *config.ServerConfi
256239 slog .Info ("configured Slack manager with state store for DM tracking" )
257240
258241 // Initialize notification manager for multi-workspace notifications.
259- notifier := notify .New (notify .WrapSlackManager (slackManager ), configManager )
242+ notifier := notify .New (notify .WrapSlackManager (slackManager ), configManager , stateStore )
260243
261244 // Initialize event router for multi-workspace event handling.
262245 eventRouter := slack .NewEventRouter (slackManager )
@@ -679,23 +662,7 @@ func runBotCoordinators(
679662 githubManager * github.Manager ,
680663 configManager * config.Manager ,
681664 notifier * notify.Manager ,
682- stateStore interface {
683- Thread (owner , repo string , number int , channelID string ) (state.ThreadInfo , bool )
684- SaveThread (owner , repo string , number int , channelID string , info state.ThreadInfo ) error
685- LastDM (userID , prURL string ) (time.Time , bool )
686- RecordDM (userID , prURL string , sentAt time.Time ) error
687- DMMessage (userID , prURL string ) (state.DMInfo , bool )
688- SaveDMMessage (userID , prURL string , info state.DMInfo ) error
689- ListDMUsers (prURL string ) []string
690- LastDigest (userID , date string ) (time.Time , bool )
691- RecordDigest (userID , date string , sentAt time.Time ) error
692- WasProcessed (eventKey string ) bool
693- MarkProcessed (eventKey string , ttl time.Duration ) error
694- LastNotification (prURL string ) time.Time
695- RecordNotification (prURL string , notifiedAt time.Time ) error
696- Cleanup () error
697- Close () error
698- },
665+ stateStore state.Store ,
699666 sprinklerURL string ,
700667) error {
701668 cm := & coordinatorManager {
0 commit comments