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
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:
1 parent
ec658a7751
commit
b93cfea5b3
16 files changed
+694
-17
No files matched your search
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
# Run the GoToSocial federation interop test end to end, then tear everything down.
|
||||
# Usage: scripts/interop/run.sh [--keep] (--keep leaves the stack running afterwards)
|
||||
set -uo pipefail
|
||||
here="$(cd "$(dirname "$0")" && pwd)"
|
||||
compose="$here/compose.sh"
|
||||
keep=0; [ "${1:-}" = "--keep" ] && keep=1
|
||||
|
||||
cleanup() { [ "$keep" = 1 ] || "$compose" down -v --remove-orphans >/dev/null 2>&1; }
|
||||
trap cleanup EXIT
|
||||
|
||||
"$compose" down -v --remove-orphans >/dev/null 2>&1
|
||||
echo "==> Building and starting Scrobbler + GoToSocial"
|
||||
"$compose" up -d --build --wait db api ui worker tls gotosocial || { "$compose" ps; exit 1; }
|
||||
|
||||
echo "==> Waiting for GoToSocial"
|
||||
for _ in $(seq 1 60); do
|
||||
"$compose" exec -T gotosocial wget -qO- http://127.0.0.1/api/v1/instance >/dev/null 2>&1 && break
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "==> Creating the GoToSocial test user"
|
||||
"$compose" exec -T gotosocial /gotosocial/gotosocial admin account create \
|
||||
--username gtsuser --email gtsuser@gts.test --password 'Interop-Test-Password-1' >/dev/null
|
||||
"$compose" exec -T gotosocial /gotosocial/gotosocial admin account confirm --username gtsuser >/dev/null
|
||||
|
||||
"$compose" run --rm driver
|
||||
status=$?
|
||||
if [ $status -ne 0 ]; then
|
||||
echo "==> Scrobbler federation state"
|
||||
"$compose" exec -T db psql -U scrobbler -d scrobbler -c \
|
||||
"select activity_type, status, reason, attempts from federation_inbox order by id" -c \
|
||||
"select a.activity_type, d.status, d.attempts, d.last_status, left(d.last_error, 200) as error
|
||||
from federation_deliveries d join federation_activities a on a.id = d.activity_id order by d.id"
|
||||
echo "==> Recent logs"
|
||||
"$compose" logs --tail 200 worker gotosocial | grep -v "api/v1/accounts/relationships" | tail -40
|
||||
fi
|
||||
exit $status
|
||||
Reference in new issue
Block a user