trails/docs
Ullrich Schäfer 57696286e4
feat(journal): federation instance blocklist
Task group 3 of federation-hardening. There was no blocklist of any kind;
the only lever against a hostile instance was an IP/host block in Caddy.

- New `federation_blocked_instances` table (domain PK, reason,
  created_at). Additive → created by drizzle-kit push.
- `federation-blocklist.server.ts`: exact-host matching —
  `isBlockedDomain`, `isBlockedIri` (unparseable IRI ⇒ treated as
  blocked), and `filterBlockedDomains` for batch recipient filtering.
- Enforced at all three boundaries (spec: federation-operations
  "Instance blocklist"):
  - inbox — each of the 4 listeners silently drops a blocked actor's
    activity (202, no error oracle) before dedup/side effects;
  - delivery enqueue — `enqueueActivityDeliveries` filters blocked
    recipients in one batch query;
  - outbox poll / actor fetch — `pollRemoteActor` refuses a blocked host
    up front (`skipped: "blocked instance"`), before any network.
- Operator procedure (SQL insert/list/delete) documented in the
  deployment runbook's federation section.
- Tests: unit (hostOfIri) + integration against real Postgres covering
  the helper and the delivery + outbox boundaries; inbox uses the same
  tested isBlockedIri primitive.

Note: the inbox-drop *counter* (federation_inbox_dropped_total{reason})
lands with the other metrics in task 4.2; this commit is the enforcement.

Verified: db + journal typecheck + lint clean; drizzle-kit push creates
the table; blocklist integration tests green against real Postgres;
journal unit suite 357 passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 22:59:11 +02:00
..
adr Atomic GPX save: validate + persist row + geometry in one transaction 2026-05-10 15:02:56 +02:00
conversations Move conversation log into docs/conversations/ 2026-03-22 12:00:45 +01:00
ideas poi-index: Grafana dashboard/alert, docs, privacy manifest 2026-07-12 22:54:51 +02:00
legal-archive Add visibility disclosure to the binding German privacy text 2026-04-19 09:14:15 +02:00
reviews docs: archive the 2026-06-10 architecture + security review decks 2026-06-11 08:33:48 +02:00
architecture.md poi-index: Grafana dashboard/alert, docs, privacy manifest 2026-07-12 22:54:51 +02:00
demo-persona.md Apply configurable-demo-persona: per-instance demo identity + voice 2026-04-19 10:30:32 +02:00
deployment.md feat(journal): federation instance blocklist 2026-07-13 22:59:11 +02:00
gpx-extensions.md Add docs/gpx-extensions.md documenting the trails: GPX namespace 2026-05-17 23:35:06 +02:00
information-architecture.md Refresh IA doc — all six streams shipped on 2026-04-26 2026-04-26 10:03:05 +02:00
inspirations.md docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
old-trails-analysis.md Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
philosophy.md docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
roadmap.md poi-index: Grafana dashboard/alert, docs, privacy manifest 2026-07-12 22:54:51 +02:00
server-hardening.md Add transactional emails (SMTP) and planner features (no-go areas, notes, crash recovery) 2026-03-26 01:00:42 +01:00
tooling.md Add CLAUDE.md, README, and development tooling docs 2026-03-22 12:06:51 +01:00