Display name only: UI, docs, API title, dashboards, hashtag and User-Agent.
Identifiers (package, metrics, env vars, SCROBBLER_CONFIG) are unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Intake (in the request, no network): size, content type and shape
checks, blocked domains refused (403), duplicates acknowledged once,
then stored and answered 202.
Processing (federation.inbox worker task):
- verify the HTTP signature with either scheme, as of when it arrived,
using the cached key and refreshing the sender once on failure (key
rotation); a deleted account's Delete still verifies from cache
- the signer must be the activity's actor and the activity id must be
on the actor's host
- handlers: Follow (accept, or pending with manual approval; repeat
follows re-accepted; blocked accounts rejected), Undo of a Follow
(only by the same actor), Delete of an actor, Update of an actor;
anything else recorded
- items being processed are marked, retried on transient failures,
re-queued if a worker dies, and pruned after 30 days
Outgoing Accept/Reject/Block activities are stored with stable ids and
queued per inbox for the delivery task (next step). Public activities
are fetchable at /activities/<uuid>. Metrics for inbox activities and
signature checks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
- net.py: the only client federation uses, on httpcore (BSD-3-Clause)
with a guarded network backend: https only, every resolved address
must be public (private, loopback, link-local, CGNAT, multicast and
IPv4-mapped forms refused), and the connection goes to the checked
address; 3 redirects max (GET only), 1 MB cap, 10s/20s timeouts
- outbound.py: signed GETs (instance actor, so authorized-fetch servers
answer) and signed POSTs (as the user), trying the configured
signature schemes in order and the next only on a 401
- remote.py + federation_remote_actors: fetch, validate (id matches
URL and host, actor type, inbox on its host, key owned by the actor),
cache for 24h, refresh on demand, 410 marks an actor gone; resolve a
key id to its actor, including standalone key documents
- Config: FEDERATION_SIGNATURE_SCHEMES, FEDERATION_BLOCKED_DOMAINS,
FEDERATION_DELIVERY_CONCURRENCY, and FEDERATION_INSECURE_TESTING
(http and private addresses; only allowed for .test domains)
- Tests against a real local HTTP server, including verifying that our
fetches carry a valid signature
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW