Interop with a real GoToSocial server, and the fixes it found (phase 2, step 8)
CI / validate-monitoring (push) Successful in 7s
CI / lint (push) Successful in 10s
CI / test (push) Successful in 2m16s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 6s

scripts/interop/run.sh brings up Scrobbler (API, worker, UI behind a
throwaway-TLS Caddy) and GoToSocial 0.22.1 on a private .test network,
creates a GoToSocial user, drives its sign-in/OAuth screens for a token,
and checks: lookup by handle, follow accepted, unfollow, manual approval
and approve, remove, block and unblock, and decline.

Found and fixed along the way:
- Keys whose id is a path serving the actor (GoToSocial's
  <actor>/main-key) weren't resolved; now all three publishing styles
  are handled
- An Undo of an older Follow arriving after a newer Follow removed the
  new follower; an Undo now only removes the Follow it names (and Undo
  referencing a Follow by id is understood)
- Rejects embedded the Follow, which some servers (GoToSocial) match by
  account pair, so a late Reject could cancel a newer request; Rejects
  now reference the Follow by id
- Unblocking didn't tell the other server; it now sends Undo(Block)
- Actors publish an (empty) featured collection, which Mastodon and
  GoToSocial fetch

GoToSocial 0.22.1 ignores Reject for already-accepted follows (a TODO
in its code, fixed on its main branch); the removal check on its side
is skipped until a release has it (GTS_REJECT_ENDS_FOLLOWS=1 enables).

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:11:39 +01:00
1 parent ec658a7751
commit b93cfea5b3
16 files changed
+694 -17

No files matched your search

+82
View File
@@ -0,0 +1,82 @@
# Federation interop test: Scrobbler and a real GoToSocial server on one private network.
#
# docker compose -f docker-compose.yml -f deploy/interop/docker-compose.interop.yml up -d --build
# ...create the GoToSocial user (see scripts/interop/run.sh), then run the driver.
#
# TEST ONLY: GoToSocial runs over plain HTTP and skips TLS verification; Scrobbler is
# served over HTTPS by a Caddy proxy with a throwaway certificate, and its "insecure
# testing" switch lets it reach GoToSocial over HTTP on this private network. All on the
# reserved .test domain. Never use these settings anywhere else.
name: scrobbler-interop
x-federation: &federation
DATABASE_URL: postgresql+psycopg://scrobbler:scrobbler@db:5432/scrobbler
FEDERATION_ENABLED: "1"
FEDERATION_DOMAIN: scrobble.test
FEDERATION_BASE_URL: https://scrobble.test
FEDERATION_KEY_SECRET: interop-test-only-secret-0123456789abcdef
FEDERATION_INSECURE_TESTING: "1"
UI_BASE_URL: https://scrobble.test
networks:
fedi:
ipam:
config:
- subnet: 172.30.0.0/24
services:
db:
ports: !reset []
networks: [fedi]
api:
environment: *federation
ports: !reset []
networks: [fedi]
worker:
environment: *federation
networks: [fedi]
ui:
environment:
API_BASE_URL: https://scrobble.test
API_INTERNAL_URL: http://api:8000
ports: !reset []
networks: [fedi]
# GoToSocial looks up remote servers over HTTPS: serve scrobble.test with TLS
# (Caddy's internal CA) in front of the UI, which forwards fediverse paths to the API.
tls:
image: caddy:2.10
command: ["caddy", "reverse-proxy", "--from", "https://scrobble.test", "--to", "http://ui:80", "--internal-certs"]
networks:
fedi:
aliases: [scrobble.test]
gotosocial:
image: superseriousbusiness/gotosocial:0.22.1
environment:
GTS_HOST: gts.test
GTS_PROTOCOL: http # local testing only
GTS_PORT: "80"
GTS_DB_TYPE: sqlite
GTS_DB_ADDRESS: /gotosocial/storage/sqlite.db
GTS_HTTP_CLIENT_ALLOW_IPS: 172.30.0.0/24 # let it reach Scrobbler on this network
GTS_HTTP_CLIENT_TLS_INSECURE_SKIP_VERIFY: "true" # Caddy's throwaway certificate
GTS_TRUSTED_PROXIES: 172.30.0.0/24
GTS_ACCOUNTS_REGISTRATION_OPEN: "false"
GTS_LOG_LEVEL: ${GTS_LOG_LEVEL:-info}
sysctls:
net.ipv4.ip_unprivileged_port_start: 0 # listen on :80 as its non-root user
networks:
fedi:
aliases: [gts.test]
driver:
image: python:3.13-slim
profiles: [driver]
volumes:
- ./scripts/interop:/interop:ro # relative to the project (first compose file)
command: ["python", "/interop/gotosocial_interop.py"]
networks: [fedi]