Home | Notifications | New Note | Local | Federated | Search | Logout

Note Detail


Reply to @stevebate@socialhub.activitypub.rocks
a@trwnh@socialhub.activitypub.rocks (2026-05-13 05:53:50)
stevebate:there are different mental models of AS2 [...] If AS2 is considered to be plain JSON, then the meaning of “link” becomes relatively muddled for me

Yeah -- even for people who understand the difference between a direct link and an indirect/reified Link, there's still uncertainty about when you would want to use one or the other. "You can describe properties of the link/reference" is something that makes sense in the abstract but it depends on a processing model to make sense in practice. as:Link feels like it's largely unused in AS2 documents across the fediverse; most links are direct links by way of using AS2 properties with non-embedded objects. (For example, when "actor" and "object" are JSON strings instead of as:Link nodes.)

silverpill:Every id value is expected to be an identifier of an ActivityPub object. When it resolves to something else, like an HTML document, we conclude that the identifier is not valid.

Do you expect every AS2 document to be an ActivityPub object?
Do you dereference every id to make sure of what it resolves to?
If some id doesn't have an AS2 representation, do you:...discard the entire activity?
...discard that particular statement?
...process the statement as-is without further information?

silverpill:Fediverse != Web

One can certainly claim this (and they might not be fully incorrect per se), but then it leads to asking if AP == AS2 == Fediverse, or if AP == Web != Fediverse != AS2. At least in theory, AP and AS2 are intended to be Web specifications published by the W3C under the Social Web WG.

silverpill:By default, hrefs do not point to ActivityPub objects.

Would you then say something like this?

If an id is the "href" of a Link, then it can have representations not including AS2.
Otherwise, an id (SHOULD? MUST? MAY? is expected to without being required to?) have an AS2 representation.
We currently don't require this, and there is no processing model defined for AS2 documents. AP implies a partial processing mo
---Reply--- silverpill@silverpill@socialhub.activitypub.rocks (2026-05-14 03:07:40) trwnh:Do you expect every AS2 document to be an ActivityPub object?

Yes. I don't think of AP and AS2 as separate things, and in my view, any contradictions between the two are specification bugs.

trwnh:Do you dereference every id to make sure of what it resolves to?

No, that would be impractical. I resolve id values only when an object needs to be authenticated (for example, when it is not signed). I resolve id-ish values (such as inReplyTo) only when that is required by application logic.

trwnh:If some id doesn’t have an AS2 representation, do you:

…discard the entire activity?
…discard that particular statement?
…process the statement as-is without further information?
In most cases, the entire activity is discarded. An activity is not very useful if you can't authenticate it or resolve its actor. But sometimes only a particular statement is discarded.

trwnh:Would you then say something like this?

If an id is the “href” of a Link, then it can have representations not including AS2.
Otherwise, an id (SHOULD? MUST? MAY? is expected to without being required to?) have an AS2 representation.
How href can be an id? What I mean is that in JSON-verse, href is not considered an id-ish property. FEP-e232 is an exception to this rule.
Reply

---Replies---
a@trwnh@socialhub.activitypub.rocks (2026-05-14 06:55:24)
silverpill:I resolve id-ish values (such as inReplyTo) only when that is required by application logic.

silverpill:What I mean is that in JSON-verse, href is not considered an id-ish property. FEP-e232 is an exception to this rule.

I'm mainly talking about what you call "id-ish" -- when a property has a value that is a JSON string interpreted as a reference (@type: @id in the context).

It sounds like you don't try to fetch those unless needed, which is good; I'm still not sure what your criteria for "needed" would be, though.

So for example, with a document like this:

{ "inReplyTo": "https://apnews.com/article/reading-math-test-scores-education-scorecard-7fa4111ad0de934f664ebb984e830d13"}
I imagine you would attempt to fetch the replied-to resource, fail to find an AS2 representation, and treat the currently-processing object as having a broken reply link (even if there are non-AS2 representations for the replied-to resource).

With a document like this:

{ "type": "Article", "url": { "href": "https://apnews.com/article/reading-math-test-scores-education-scorecard-7fa4111ad0de934f664ebb984e830d13" }}
I imagine you would leave it up to the user whether they want to follow that link or not.

And for a document like this:

{ "tag": { "href": "https://apnews.com/article/reading-math-test-scores-education-scorecard-7fa4111ad0de934f664ebb984e830d13", "mediaType": "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"" }}
I imagine you would take that as a hint to fetch the "href" with Accept: application/ld+json; profile="https://www.w3.org/ns/activitystreams", but if you instead encountered this document:

{ "tag": { "href": "https://apnews.com/article/reading-math-test-scores-education-scorecard-7fa4111ad0de934f664ebb984e830d13" }}
Then I imagine you'd go back to letting the user decide whether to fetch it... or possibly ignore it, or possibly some other application-specific thing.