mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-01 17:57:38 +08:00
p0 dedupe tune: configurable dedupe windows, include buttons in outbound idempotency key, and add regression coverage
This commit is contained in:
@@ -260,6 +260,15 @@ func Validate(cfg *Config) []error {
|
||||
errs = append(errs, fmt.Errorf("memory.recent_days must be > 0"))
|
||||
}
|
||||
|
||||
if cfg.Channels.InboundMessageIDDedupeTTLSeconds <= 0 {
|
||||
errs = append(errs, fmt.Errorf("channels.inbound_message_id_dedupe_ttl_seconds must be > 0"))
|
||||
}
|
||||
if cfg.Channels.InboundContentDedupeWindowSeconds <= 0 {
|
||||
errs = append(errs, fmt.Errorf("channels.inbound_content_dedupe_window_seconds must be > 0"))
|
||||
}
|
||||
if cfg.Channels.OutboundDedupeWindowSeconds <= 0 {
|
||||
errs = append(errs, fmt.Errorf("channels.outbound_dedupe_window_seconds must be > 0"))
|
||||
}
|
||||
if cfg.Channels.Telegram.Enabled && cfg.Channels.Telegram.Token == "" {
|
||||
errs = append(errs, fmt.Errorf("channels.telegram.token is required when channels.telegram.enabled=true"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user