Edge case when backfilling topics

When it comes to backfilling topics, NodeBB utilises what is called "context collection backfill" instead of reply-chain traversal. In a nutshell, instead of crawling up and down the reply tree one-by-one — kind of like what Mastodon does currently — it checks for a canonical source-of-truth in the context property.

NodeBB supports both strategies, since not all objects contain context.

I found a fun little edge case where if I start a topic, a reply is received, and that reply points to my instance, it won't catch any replies made in between.[...]

In other words:

localA starts topic → remoteB replies → remoteC replies to B only → remoteB replies to C and A

In this scenario, because my instance A is left out of the third activity, I don't know about it. When the fourth activity appears, the context is checked, C's reply isn't in it, and I proceed without knowing about it. Oops!

In this case, when incoming replies reference a context that is same-origin to your own instance, you should not use context collection backfill, because:

  1. You already have the entire context, so it's unnecessarily duplication of work
  2. You won't catch any replies made out-of-band unless you do reply-tree traversal

Tagging @silverpill@mitra.social because this is related to FEP f228.

Replying to @⁨julian@activitypub.space⁩

When the fourth activity appears, the context is checked, C's reply isn't in it, and I proceed without knowing about it. Oops!

I don't understand this part. Is C's reply being dropped?

I think if you encounter an object where inReplyTo is not known to you, that unknown object should be fetched, regardless of context.

this is related to FEP f228.

FEP-f228 specifies a backfill algorithm that works from top-level post down the thread. But it would be nice to provide an algorithm that works for any post in a thread. I'll think about it.

en