Skip to content

Commit ce7056d

Browse files
committed
Tighten relay fixtures and actor assertions
Move Bob's store-only inbox onto a distinct intercepted IPv6 address to keep the fixture convention consistent without sharing the destination recorded by the forwarding test. Require the embedded actor's id in both Accept delivery helpers. Removing the URL-string fallback makes serialization-shape regressions fail the assertion instead of accepting either representation. Addresses these review comments: #1047 (comment) #1047 (comment) Validated formatting and all 58 relay Deno test steps. Node.js and Bun were not rerun for these edits; the preceding fresh-worktree attempt was blocked by dependency-download timeouts at npm.jsr.io. Codex applied both requested review fixes and ran automated checks. Human manual verification was not recorded. Changelog: none Assisted-by: Codex:gpt-6
1 parent 74cab84 commit ce7056d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/relay/src/litepub.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ function assertAcceptDelivered(
156156
strictEqual(accepts[0].body.actor, "https://relay.example.com/users/relay");
157157
strictEqual(accepts[0].body.object.type, "Follow");
158158
strictEqual(
159-
accepts[0].body.object.actor?.id ?? accepts[0].body.object.actor,
159+
accepts[0].body.object.actor.id,
160160
follow.actorId?.href,
161161
);
162162
}

‎packages/relay/src/mastodon.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function assertAcceptDelivered(
122122
strictEqual(accepts[0].body.actor, "https://relay.example.com/users/relay");
123123
strictEqual(accepts[0].body.object.type, "Follow");
124124
strictEqual(
125-
accepts[0].body.object.actor?.id ?? accepts[0].body.object.actor,
125+
accepts[0].body.object.actor.id,
126126
follow.actorId?.href,
127127
);
128128
}
@@ -1047,7 +1047,7 @@ describe("MastodonRelay", () => {
10471047
const follower2 = new Person({
10481048
id: new URL("https://remote.example.com/users/bob"),
10491049
preferredUsername: "bob",
1050-
inbox: new URL("https://remote.example.com/users/bob/inbox"),
1050+
inbox: new URL(`${INBOX_PREFIX}3]/users/bob/inbox`),
10511051
});
10521052

10531053
await kv.set(

0 commit comments

Comments
 (0)