trails/packages
Ullrich Schäfer b96bef91a9 feat(journal): outbox-poll ingestion of remote trails activities (§7)
Tasks 7.1–7.3, 7.5 (+7.4 pacing; Retry-After-duration backoff noted as
remaining). Resolves the activities.owner_id open question.

Schema (design decision from the open question):
- activities.owner_id nullable + check constraint enforcing exactly
  one of (owner_id, remote_actor_iri) — the follows pattern again.
- remote_published_at carries the origin's publish time for the §8
  feed sort; index on remote_actor_iri for the feed join.
- Compiler-audited fallout: notification fan-out, the Note object
  dispatcher, and the activity detail loader explicitly skip/404
  remote rows (their canonical page is the origin; feed links there).
  Every other surface joins users on owner_id and excludes remote rows
  structurally.

Ingestion:
- federation-ingest.server.ts: parseOutboxItem targets exactly our own
  outgoing Create(Note) shape (PropertyValue stats, first-paragraph
  name, audience from to/cc); unknown items skipped, never fatal.
- ingestRemoteActivities: replay-safe via unique remote_origin_iri,
  conflict-streak early exit (outboxes are newest-first).
- pollRemoteActor: signed fetch (Authorized Fetch via a local
  follower's key), outbox resolution via remote_actors cache with
  actor-doc fallback (which refreshes the cache), 1 req/5 s per-host
  pacing, last_polled_at stamping. Network + pacing injectable.

Jobs: poll-remote-actor (per-actor; the §4 Accept listener already
enqueues it as the first poll) + poll-remote-outboxes (5-min cron
sweep over accepted remote follows not polled within the hour).

Tests: parse-shape units; integration suite for ingestion provenance,
audience→visibility mirroring, replay safety, the DB author invariant,
poll flow (actor-doc → collection → page), signer requirement, and
due-polling selection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 12:27:10 +02:00
..
api Bump the production group with 41 updates 2026-05-10 08:42:40 +00:00
db feat(journal): outbox-poll ingestion of remote trails activities (§7) 2026-06-07 12:27:10 +02:00
fit chore(deps): bump the production group with 28 updates 2026-05-31 08:37:04 +00:00
gpx chore(ts): drop the last 2 \eslint-disable\ comments in prod code 2026-05-26 07:34:09 +02:00
i18n docs(journal): federation privacy manifest + runbook + honest home blurb (§10) 2026-06-07 12:21:51 +02:00
jobs chore(ts): eliminate the remaining 4 \as any\ casts in production code 2026-05-26 07:11:02 +02:00
map fix: extensionless server-side imports + lint rule to catch them 2026-05-26 08:08:19 +02:00
map-core Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00
sentry-config Fix sentry-config typecheck: explicit types: [node] in tsconfig 2026-04-18 00:43:48 +02:00
types Add per-waypoint notes and nearby POI snap to Planner 2026-05-17 23:58:21 +02:00
ui Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00