docs(config): point rate_limit at the Channel settings resource

The rate-limit budget's runtime owner is the channel-settings control-plane
resource, which the Web UI edits and which boot.loadRuntimeConfig layers over
the file before boot.startRateLimiter reads it. [chat.rate_limit] is that
resource's seed, not its authority.

1fe4691b's comments and commit message described the file key as the thing that
documents a webhook's per-route budget, which is the pre-migration framing.
Cite the resource and the layering instead, and say plainly that editing the
file does not change a stored value.
This commit is contained in:
sam committed 2026-09-22 03:32:20 +10:00
1 parent 27d7c08049
commit 0ca733f7e5
2 files changed
+18 -6

No files matched your search

+4
View File
@@ -189,6 +189,10 @@ class = "ollama"
# its configured route path -- a source, not a person, so it reaches the
# limiter as a transport-only budget key rather than as an identity. Off by
# default -- both fields must be set to a positive value.
#
# This section is the seed for the Channel settings resource. The Web UI owns
# the value a running deployment limits with (restart-required), so edit it
# there rather than here; a stored value is not overwritten by this file.
# [chat.rate_limit]
# window = "1m"
# max_requests = 20
+14 -6
View File
@@ -968,18 +968,26 @@ type ChatConfig struct {
// RateLimit budgets inbound messages per (channel, sender) across
// every chat channel. Zero MaxRequests (the default) leaves rate
// limiting off entirely -- it is an opt-in control, not a default
// throttle that could surprise an existing deployment.
// throttle that could surprise an existing deployment. This key seeds
// the Channel settings resource, which the Web UI owns at runtime
// (restart-required): editing the file does not change a stored value.
RateLimit RateLimitConfig `toml:"rate_limit" yaml:"rate_limit"`
}
// RateLimitConfig configures the sliding-window inbound rate limiter
// (internal/ratelimit) shared by every chat channel. A sender is
// identified per channel: Telegram by numeric user ID, email by the SMTP
// from address, webhook by the configured route path -- which is a source,
// (internal/ratelimit) shared by every chat channel. This type is the shape of
// the Channel settings resource (channel-settings,
// internal/app/controlplane); the file key is only that resource's seed, and
// the Web UI owns the value a running deployment limits with. Applied by
// boot.startRateLimiter from the config boot.loadRuntimeConfig layers, so a
// stored value takes effect on restart and the resource is restart-required.
//
// A sender is identified per channel: Telegram by numeric user ID, email by the
// SMTP from address, webhook by the configured route path -- which is a source,
// not a person, so it reaches the limiter through the transport-only
// Inbound.BudgetKey rather than through SenderID (see
// docs/prds/memory-engine-unification.md §3). Disabled unless both fields
// are set to a positive value.
// docs/prds/memory-engine-unification.md §3). Disabled unless both fields are
// set to a positive value.
type RateLimitConfig struct {
// Window is the rolling interval MaxRequests is budgeted over.
Window time.Duration `toml:"window" yaml:"window"`