p0 dedupe tune: configurable dedupe windows, include buttons in outbound idempotency key, and add regression coverage

This commit is contained in:
DBT
2026-03-01 12:27:38 +00:00
parent 95d9f43034
commit 9f5191eef3
6 changed files with 101 additions and 24 deletions

View File

@@ -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"))
}