GoToSocial's and Mastodon's scenarios passed once on a fresh pasture only:
their locked follows ended followed, so a second run found no request to
reject, and Mastodon's ended with mastouser blocking alice_masto, so every
follow after it was rejected. Each now unfollows first, and Mastodon's
undoes its block (checking that its Undo{Block} reaches our blocked_by) and
its lock; a run cut short is undone at the start.
Mastodon's scenario also checks the thread backfill live: a reply by an
account nobody here follows is never delivered, and joins the thread once
alice_masto opens it, read from Mastodon's FEP-7888 context.
interop.sh keeps the results of the peers it does not run, so the report
merges a partial rerun. All seven scenarios: 276 pass, 0 fail, 1 expected
(Lemmy moderation, P7).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Drives PrivaPub and each peer (started by run.sh) through each other's federation, as their users would, then checks
|
|
# that PrivaPub's statistics saw it all without naming anyone.
|
|
# usage: tools/pasture/interop.sh [peer...] peers: gts (default), mastodon, misskey, sharkey, akkoma, lemmy,
|
|
# peertube, crawler
|
|
set -uo pipefail
|
|
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
. "$here/lib/interop.sh"
|
|
peers=("${@:-gts}")
|
|
# a run replaces what the peers it runs said last time, and keeps what the others said
|
|
if [ -s "$INTEROP_JSONL" ]; then
|
|
python3 - "$INTEROP_JSONL" "${peers[@]}" <<'PY'
|
|
import json, sys
|
|
path, peers = sys.argv[1], set(sys.argv[2:])
|
|
kept = [line for line in open(path) if line.strip() and json.loads(line).get("peer") not in peers]
|
|
open(path, "w").writelines(kept)
|
|
PY
|
|
fi
|
|
|
|
for peer in "${peers[@]}"; do
|
|
[ -f "$here/scenarios/$peer.sh" ] || { echo "no scenario for $peer" >&2; exit 2; }
|
|
INTEROP_PEER=$peer
|
|
. "$here/scenarios/$peer.sh"
|
|
done
|
|
|
|
echo; echo "$pass passed, $fail failed, $expected expected failures"
|
|
[ "$fail" = 0 ]
|