trails/openspec/changes
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
..
account-export docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
activity-duplicate-review docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
activity-locations docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
activity-photos Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
activity-privacy-controls docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
archive chore(openspec): archive route-surface-breakdown 2026-07-13 21:21:58 +02:00
changelog Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
credits-page docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
elevation-profile-hardening docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
federation-hardening feat(journal): federation instance blocklist 2026-07-13 22:59:11 +02:00
fit-parsing-hardening docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
garmin-import feat(journal): Garmin activity import — provider, webhook pipeline, backfill (§1–5) 2026-06-07 17:47:22 +02:00
gpx-parser-robustness docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
hiking-foot-profile docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
hiking-time-estimate docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
link-share-tokens docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
mobile-app Implement mobile route editor with MapLibre and BRouter routing 2026-04-15 01:06:10 +02:00
route-discovery docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
route-features Add 8 proposed changes and old trails analysis 2026-03-25 03:57:20 +01:00
route-federation docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
route-sharing docs: fix stale route-sharing → social-federation dependency 2026-06-06 13:16:06 +02:00
self-hosting-guide docs+openspec: prior-art research (Organic Maps, Endurain, wanderer) and 15 proposals 2026-07-06 07:23:00 +02:00
visual-redesign Fix all OpenSpec validation failures (36/36 passing) 2026-04-06 22:17:52 +02:00
wahoo-production-cutover Add openspec changes for Wahoo production cutover and route updates 2026-05-01 11:37:42 +02:00