trails/openspec/changes/archive/2026-07-13-federation-hardening/specs/social-federation/spec.md
Ullrich Schäfer 42149d8e02
chore(openspec): archive federation-hardening
All 13 tasks complete (implementation shipped in #570–573; staging
verification in #574). Archive via `openspec archive` (CLI 1.6.0):

- Creates openspec/specs/federation-operations/spec.md — the new
  capability: durable federation queue, inbound replay defense, instance
  blocklist, published protocol doc, delivery observability (Purpose
  filled in; CLI leaves a TBD placeholder).
- Applies the MODIFIED requirement to openspec/specs/social-federation:
  "Push delivery on local activity create" now guarantees persistent
  queueing + a "Fan-out survives a deploy" scenario.
- Moves the change to openspec/changes/archive/2026-07-13-federation-hardening/.

Both specs pass `openspec validate --strict`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 23:54:56 +02:00

1.1 KiB

MODIFIED Requirements

Requirement: Push delivery on local activity create

The Journal SHALL deliver a Create(Note) activity to every accepted remote follower's inbox when a local user with profile_visibility = 'public' creates a new public activity. Delivery queueing and retry state SHALL be persistent: queued deliveries and scheduled retries survive process restarts.

Scenario: New public activity fans out

  • WHEN a local user with N accepted remote followers creates a new public activity
  • THEN N delivery jobs are enqueued (one per follower's inbox), each retrying with exponential backoff on 5xx, giving up after a documented retry budget

Scenario: Rate-limited per remote host

  • WHEN multiple deliveries target the same remote host
  • THEN they are rate-limited so we never exceed 1 request per second per remote host (configurable; chosen for safety, not throughput)

Scenario: Fan-out survives a deploy

  • WHEN a deploy restarts the journal while fan-out deliveries are queued or awaiting retry
  • THEN the deliveries complete after the restart without loss