smolboid/daemon
randogoth e606b3a1e0 feat: add the registration mode and the global hourly budgets to state
Mode is persisted rather than read from config alone, so an admin can flip
registration by mail instead of needing a redeploy; config supplies only the
initial value. It defaults to Silent, which is today's behaviour byte for
byte, so landing this cannot start mailing strangers on its own.

Limits holds the two daemon-wide hourly counters. Identity keys are free to
mint, so a per-key budget does not bind an attacker and these are what
actually do; each vector is pruned to the hour on read and so is bounded by
its own cap.

Also fixes reply_allowed's ledger growth, which stops being a wart here and
becomes a vulnerability: until now only accepted authors reached it, but once
a stranger can draw a reply any throwaway keypair appends a permanent row.
Ledgers idle for an hour are dropped and the count is capped, with a
regression test that drives it past the cap.

drained carries the one-time backlog guard: a live mail.db holds every
requests-tier mail ever received, and the first poll after upgrading must not
mail all of them.
2026-10-14 19:05:10 +03:00
..
locales/en-US refactor: reject mail with a reason identifier, not a sentence 2026-10-14 18:57:57 +03:00
src feat: add the registration mode and the global hourly budgets to state 2026-10-14 19:05:10 +03:00
Cargo.toml refactor: move author-facing mail copy into a Fluent catalogue 2026-10-14 18:48:31 +03:00