One delivery a server; BookWyrm 0.9.3 in the pasture

An activity now goes once to each server, to its shared inbox when it has one, for the accounts a post names, answers
or quotes as for its followers, as Mastodon delivers (a circle post excepted: each member's copy names that member).
BookWyrm took the same post twice when one copy reached its shared inbox and another the named account's inbox at once.
SharedInboxTests checks a reply to a follower's post goes once.

BookWyrm joins the pasture (peers/bookwyrm.sh: its image on the shared Postgres and Redis, gunicorn and a Celery worker,
its user, book and statuses made in its Django shell). scenarios/bookwyrm.sh: follows both ways, a review, a comment and
a quotation reaching alice as BookWyrm's pure posts, her like, boost and reply landing there, her post naming bwuser and
bwuser's like and reply, a deletion, the unfollow and statistics: 20 checks. GoToSocial (64), Mastodon (57) and Misskey
(35) still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-06 01:56:06 +02:00
1 parent 12b51a211a
commit 53158b4cf4
9 files changed
+243 -21

No files matched your search

+23 -14
View File
@@ -13,12 +13,15 @@ namespace PrivaPub.Tests.Support
public sealed class RemoteActor
{
readonly RSA _key = RSA.Create(2048);
readonly bool _namesSharedInbox;
public RemoteActor(Peer peer, string name, string origin = default, string type = "Person")
// sharedInbox: whether its document names its server's shared inbox (endpoints.sharedInbox), as Mastodon's do
public RemoteActor(Peer peer, string name, string origin = default, string type = "Person", bool sharedInbox = false)
{
Name = $"{name}{Guid.NewGuid():N}"[..20];
Id = $"{origin ?? peer.A}/users/{Name}";
Type = type;
_namesSharedInbox = sharedInbox;
peer.Serve($"/users/{Name}", Document().ToJsonString());
}
@@ -29,21 +32,27 @@ namespace PrivaPub.Tests.Support
public string KeyId => Id + "#main-key";
public string SharedInbox => Id.Split("/users/")[0] + "/inbox";
public JsonObject Document() => new()
public JsonObject Document()
{
["id"] = Id,
["type"] = Type,
["preferredUsername"] = Name,
["inbox"] = Id + "/inbox",
["followers"] = Id + "/followers",
["featured"] = Id + "/featured",
["publicKey"] = new JsonObject
var document = new JsonObject
{
["id"] = KeyId,
["owner"] = Id,
["publicKeyPem"] = _key.ExportSubjectPublicKeyInfoPem()
}
};
["id"] = Id,
["type"] = Type,
["preferredUsername"] = Name,
["inbox"] = Id + "/inbox",
["followers"] = Id + "/followers",
["featured"] = Id + "/featured",
["publicKey"] = new JsonObject
{
["id"] = KeyId,
["owner"] = Id,
["publicKeyPem"] = _key.ExportSubjectPublicKeyInfoPem()
}
};
if (_namesSharedInbox)
document["endpoints"] = new JsonObject { ["sharedInbox"] = SharedInbox };
return document;
}
public HttpRequestMessage SignedGet(string path, string host = "privapub.test")
{