M2: every inbox answer is recorded
InboxReceiver records each answer once, in a finally, with a reason: too-large, not-json, not-activity, missing-type-or-actor, no-signature, the signature check's own codes (headers-unsigned, digest-mismatch, header-unreadable, date-skew, expired, algorithm-unsupported), signature-invalid, actor-not-key-owner, key-unavailable, id-cross-origin, undo-foreign, misattributed, unknown-recipient, and for 202s queued, duplicate, suspended or self-delete-unknown-key. Each event carries the activity and object type, the inbox, the signature scheme, the bytes and the time taken. A 404 for an unknown /mouth and a rate-limited inbox (429, from OnRejected) are recorded too. Until the signature verifies, the host is only claimed, so it is kept only if the server is already known. A suspended server is recorded under its own name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ELjqpznMFMNrJoJUj6K5p2
This commit is contained in:
1 parent
15cd034b29
commit
4fa53f63bd
7 files changed
+385
-24
No files matched your search
@@ -51,7 +51,7 @@ namespace PrivaPub.Tests.Support
|
||||
RemotePosts = new RemotePosts(Db, Local, Remote, new NoBlocks(), Queue, Records, new NoPreviews());
|
||||
Outbox = new OutboxPublisher(Db, Local, Delivery);
|
||||
Quotes = new QuoteService(Db, Remote, RemotePosts, Local, Delivery, Outbox);
|
||||
Receiver = new InboxReceiver(Local, Remote, Queue, new NoBlocks(), NullLogger<InboxReceiver>.Instance);
|
||||
Receiver = new InboxReceiver(Local, Remote, Queue, new NoBlocks(), NullLogger<InboxReceiver>.Instance, Ledger);
|
||||
Handlers = new IActivityHandler[]
|
||||
{
|
||||
new FollowHandler(Db, Local, Remote, Delivery),
|
||||
@@ -83,6 +83,7 @@ namespace PrivaPub.Tests.Support
|
||||
|
||||
public Peer Peer { get; }
|
||||
public DbEntities Db { get; } = new();
|
||||
public MemoryLedger Ledger { get; } = new();
|
||||
public JobQueue Queue { get; } = new();
|
||||
public LocalActorService Local { get; }
|
||||
public RemoteActorService Remote { get; }
|
||||
|
||||
Reference in new issue
Block a user