Document following on the fediverse; mark phase 2 done (phase 2, step 9)
CI / validate-monitoring (push) Successful in 9s
CI / lint (push) Successful in 11s
CI / federation-interop (push) Successful in 1m3s
CI / test (push) Successful in 2m4s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 1m20s

README: following works, the Followers page, optional federation
settings and the worker requirement. Federation README: settings,
module layout, worker tasks and the interop test. Design doc: what
interop testing changed. Phase 2 plan marked done with its deviations
(httpcore, no in-process two-instance test, Undo of Block), leaving
only the manual Mastodon check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 22:17:02 +01:00
1 parent fe95f59fc8
commit fefdeb90ec
4 files changed
+54 -3

No files matched your search

+8
View File
@@ -1,5 +1,13 @@
# ActivityPub phase 2: followers
**Status: done** on `feature/activitypub` (`a6d3fb6` … `fe95f59`). The GoToSocial interop test passes locally and in CI. Before merging, the plan still calls for a manual pass with a real Mastodon account through a tunnel.
Where this differed from the plan:
- **httpcore instead of httpx.** httpcore is the transport layer underneath httpx, and it publicly supports the custom network backend that connecting to a pre-checked address needs.
- **No in-process test with two Scrobbler instances.** Scrobbler can't initiate follows yet, so one instance has nothing to send the other. Scripted remote accounts over real HTTP cover the same paths, and GoToSocial is the real second server.
- **Undo of a Block.** Unblocking needed it: GoToSocial otherwise keeps the block.
This implements phase 2 of [activitypub.md](activitypub.md), building on [phase 1](activitypub-phase1.md).
**Outcome:** people on Mastodon, GoToSocial and similar servers can follow a user who shares. Follows are accepted automatically, or wait for the user's approval if they've turned it on. The user sees their followers and can approve, decline, remove or block them. Scrobbler signs everything it sends and checks the signature on everything it receives. Posts come in phase 3; this phase makes the relationship work end to end.
+10
View File
@@ -391,3 +391,13 @@ Still open (neither is needed before phase 3):
- [SocialHub: RFC 9421 HTTP signatures in 2026](https://socialhub.activitypub.rocks/t/rfc-9421-http-signatures-in-2026/8427)
- [Funkwhale federation docs](https://docs.funkwhale.audio/develop/developer/federation/index.html): the `Listen` activity with a `Track` object
- [Pubby on PyPI](https://pypi.org/project/pubby/): features and AGPL-3.0-or-later licence
## Lessons from interop testing (phase 2)
Testing against a real GoToSocial server changed a few details:
- **Key IDs come in three shapes.** A fragment of the actor (`<actor>#main-key`, used by Mastodon), a path that serves the actor document (`<actor>/main-key`, used by GoToSocial), or a separate key document with an `owner`. All three are resolved.
- **Rejects reference the Follow by ID rather than embedding it.** Some servers match an embedded Follow by the pair of accounts. A late Reject of an old Follow would then cancel a newer request between the same two accounts.
- **An Undo only removes the Follow it names.** Deliveries race, so an Undo of an older Follow can arrive after a newer one.
- **Unblocking sends an Undo of the Block**, so the other server lets the person follow again.
- **Actors publish a `featured` collection** (empty for now). Mastodon and GoToSocial fetch it.