How do you use `context` (if at all)?

@trwnh@socialhub.activitypub.rocks said in How do you use `context` (if at all)?:

I feel like having multiple collections for the same topic is not a good way forward; it's better to look at it as a state synchronization problem instead

That's a good point. I'm okay with that sort of assignment of context in theory, although I have concerns about how to handle that "local cache" situation where replies sent to a remote context aren't considered part of the context until an Add is received. Might be a sensible default to set the context for those items to the local context until confirmation is received...

If you haven’t received an Add yet, then either:

  • there was a network failure, and you might receive it later, or you can manually fetch the collection later to synchronize state.
  • more likely: your post wasn’t “approved” by the moderator of that collection, and it is intended that others won’t see it, unless you send it to your followers/etc as well. consider it in a pending state.

@trwnh@socialhub.activitypub.rocks said in How do you use "context" (if at all)?:

consider it in a pending state.

Ah, but given that there's no such thing in NodeBB (besides the post queue which is... not quite the same thing), I'd be hesitant to build a system just for handling the potential for receipt of an Add, especially given that there are few (if any?) implementations that contain a resolvable context, with an attributedTo, tied to an as:Note, that may or may not respond with an Add.

Again, all this is still in flux, so this may change.

If “pending” is something you feel uneasy with, would it be better to look at it as “approved” or “verified” once you get the Add? The idea is that in some future where more implementations do this, it can become a policy decision whether to show “unverified” posts. In the meantime, you can show a checkmark or other icon to indicate it’s been stamped by the authority.

1 Like

Yes, that is my understanding. For example, the canonical url of this topic would be

https://community.nodebb.org/topic/18050/how-do-you-use-context-if-at-all

I’m not sure I quite agree here, albeit I may be misunderstanding your meaning. I don’t think the “canonical” nature of the context should be dependent on the fidelity of the context’s object (e.g. the context’s collection) to all activities made with respect to it, or dependent on the context owner following a particular approach (beyond the necessities I’ve laid out below).

I feel like requiring activity fidelity makes the use of the context a bit too circumspect as there will always be a possibility that some actor interacting with it does not consider the context to have treated its activities appropriately.

Consider the following

  • Discourse and NodeBB both consider the context of this topic (i.e. the one we’re in right now) to be the canonical context, as represented in the canonical url

    https://community.nodebb.org/topic/18050/how-do-you-use-context-if-at-all
    
  • Another platform, let’s call it “SEOmaster” has also published some activities in this context, however for whatever reason they are not winding up in the context’s collection, and not appearing in the topic representations on nodebb and socialhub. There could be many reasons for this, ranging from an issue with their activity formatting, to connection issues, to an issue with the actor etc.

  • NodeBB has implemented FEP 400e compatibility, in addition to 1b12 support, in some form.

  • SEOmaster, as its name implies, has amazing SEO. Because it doesn’t consider its rejected activities to be treated appropriately. It feels justified in setting the canonical URL as a URL with its domain and points out that NodeBB is compatible with FEP 400e.

Now, the above could well happen anyway, without any justification, if SEOmaster were to ignore any convention we devise here. However I think the convention we set should be as robust as possible. Making it subject to the specific implementation of the context feels like a hostage to fortune to me.

That said, I do think that, to be considered a “canonical” context for the purposes of a forum the following needs to be true:

  1. context is resolvable.
  2. It resolves to a Collection.
  3. The Collection has a resolvable url.

For a forum I think we need to at least require the context to be a Collection, otherwise it can’t be a canonical context for a topic.

1 Like

@angus@socialhub.activitypub.rocks said in How do you use `context` (if at all)?:

That said, I do think that, to be considered a "canonical" context for the purposes of a forum the following needs to be true:

  1. context is resolvable.
  2. It resolves to a Collection.
  3. The Collection has a resolvable url.

Agreed on that. I think I am over-complicating things by thinking that individual objects in a forum topic could have different contexts when queried via ActivityPub.

However, what if after iterating through the resolved context, the top-level item identifies itself as having a context that differs from the one you queried? Do you start over with the new context (if resolvable? lol.)

I think the answer to that has to be that you have to take whatever context is associated with the object you’re sent as canonical. Otherwise we’ll always be second-guessing. The context on the object of the first object in whatever collection you resolve could also be “wrong”. Yes, practically speaking, this may lead to errors in certain cases, however I think that’s better than making the context overly relative.

**edit I guess in this case, practically speaking, you’d follow up with the implementer of whatever platform is being used to resolve the context you initially got and ask them to fix their issue :slight_smile: