Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document usage of Link in places where it is not semantically clear #572

Open
1 of 5 tasks
trwnh opened this issue Dec 27, 2023 · 7 comments
Open
1 of 5 tasks

Document usage of Link in places where it is not semantically clear #572

trwnh opened this issue Dec 27, 2023 · 7 comments
Assignees
Labels
Pending Closure Resolved Unless the issue creator protests, this will be closed in a week or two Waiting for Commenter

Comments

@trwnh
Copy link

trwnh commented Dec 27, 2023

Please Indicate One:

  • Editorial
  • Question
  • Feedback
  • Blocking Issue
  • Non-Blocking Issue

Please Describe the Issue:

During issue triage, a possible usage of Link was cited as describing the actor of a tweet, as a sort of way of porting in data from non-AS2 sources. There are several places where Link is allowed, typically denoted by a range of Object | Link or similar. It would be a good idea to review such uses of Link and provide guidance, because some of them can be unexpected and confusing.

@trwnh
Copy link
Author

trwnh commented Dec 28, 2023

the ones that definitely make sense

  • tag / attachment
  • url

the ones that might make sense

  • generator
  • result
  • context / inReplyTo
  • icon / image / preview
  • instrument
  • location
  • oneOf / anyOf
  • attributedTo
  • closed
  • object / origin / target
  • subject

the ones that need to be clarified

  • actor (how does a Link perform an activity?)
  • audience / bto / bcc / cc / to (what does it mean to address a Link?)
  • current / next / prev / first / last (generally supposed to be CollectionPage)
  • partOf (generally supposed to be Collection)

@steve-bate
Copy link

steve-bate commented Dec 28, 2023

the ones that might make sense

  • ...
  • closed

I'm curious, what's the intended use case for Object | Link for closed? Someone asked about this on the Fediverse and I didn't know the answer. It's not consistent with the normative AP/AS2 JSON-LD context.

the ones that need to be clarified

  • actor (how does a Link perform an activity?)
  • audience / bto / bcc / cc / to (what does it mean to address a Link?)
  • current / next / prev / first / last (generally supposed to be CollectionPage)
  • partOf (generally supposed to be Collection)

In general, can't a Link be used anywhere an Object reference could be used? A Link is an "indirect, qualified reference to a resource" (emphases mine). If one wants to add properties to an Object URI, then a Link represents the reified form of that reference where additional information can be included (the reference can be qualified). As an indirect reference, it's not correct to think of the Link as equivalent to the referent. With actor, for example, it's not the Link that acted, it's the referent. Maybe there are multiple actors for an activity, a primary one and others playing secondary roles. Link entities could be used to qualify those roles (co-author, editor, ...).

The Link.href is xsd:anyURI data type so it may or may not refer to an AS2 Object. However, this can be disambiguated by specifying the mediaType. In most of the examples you gave, I'd think it's an error if it's not qualified as an AS2 mime type (referencing an Object).

@trwnh
Copy link
Author

trwnh commented Dec 28, 2023

the issue with closed is described in #542 -- the intent is to allow marking which resource is the reason something was closed, rather than just a timestamp or a boolean. for example, "issue 123 was closed by pr 124"

as for Link being indirect and qualified, my understanding is that the primary use case of a Link is to provide metadata about that reference, such as the link relation in rel. but aside from that, it's still unclear how to interpret or handle encountering a Link in those properties. pointing directly to a graph node makes sense, but indirectly pointing to some resource makes you wonder why the indirection even exists. see also #498 for ambiguity around Links

@steve-bate
Copy link

the issue with closed is described in #542 -- the intent is to allow marking which resource is the reason something was closed, rather than just a timestamp or a boolean. for example, "issue 123 was closed by pr 124"

(Note that closed is only defined for Question. I assume "issue" is being modeled as a Question in your example.)

Based on the vocabulary document commit history, when closed was added to the rec, only Object | Link was specified as the range in the Vocabulary document and xsd:dateString was defined as the @type in the JSON-LD context (commit). The discussion in the related issue only mentions a closed timestamp. Based on this, it seems like the initialObject | Link range may have been a mistake.

Years later, xsd:dateTime | xsd:boolean was added (commit). It was added without any issue reference and I can't find any related discussion in the WG transcripts. However, it's relatively easy to guess the rational (at least, for adding xsd:dateTime).

I think it would be better to fix the property range definition rather than trying to find a JSON-LD kludge to compensate for what appears to be a mistake. The xsd:dateTime type in the JSON-LD context is consistent with the AS2 Vocabulary definition of similar properties like published, updated, etc. One option is to make the Vocabulary consistent with these similar properties and with the JSON-LD context and define a new property (not aliased), closedBy (or closeReason or whatever), that supports an Object|Link reference.

makes you wonder why the indirection even exists

I gave an example earlier of where it could potentially be used with Actor resources. The fact that Object | Link is so prevalent in the Vocabulary ranges strongly implies to me that indirect Links to Objects (resources) was the primary (but not exclusive) intent.

@cristianolongoodhl
Copy link

* `audience` / `bto` / `bcc` / `cc` / `to` (what does it mean to address a Link?)

I don't know if it is the most appropriate place for these questions, however I think it is closely related to this issue. Suppose that we have an activity a linked to a resource l of type Link through the property to. Now let l has the property href with a resource r as value. Then l should be considered a member of the primary audience of a? And r?

@evanp
Copy link
Collaborator

evanp commented Jan 10, 2024

I think the best case here is to discuss at a high level why and how we would use Link objects for these parts of AS2. I'll add a primer page.

https://www.w3.org/wiki/Activity_Streams/Primer/Link_type

@evanp evanp self-assigned this Jan 10, 2024
@evanp evanp added Waiting for Commenter Pending Closure Resolved Unless the issue creator protests, this will be closed in a week or two labels Jan 10, 2024
@cristianolongoodhl
Copy link

cristianolongoodhl commented Jan 14, 2024

Thus, excluding image and icon, when a Link instance is used as value (object) for a core property does it means that the main object is connected with an unknown one, which in turn is connected to the resource specified via href with a unknown property? For example, when an agent receive the activity

{
   "@context": "https://www.w3.org/ns/activitystreams",
   "type": "Create",
   "to": {
     "type": "Link",
     "href": "https://twitter.com/dril"
   }
}

may it consider this activity equivalent to the following one?

{
   "@context": "https://www.w3.org/ns/activitystreams",
   "type": "Create",
   "to": {
      "owl:topObjectProperty": "https://twitter.com/dril"
    }
 }

In the example, owl:topObjectProperty is used as a place holder for some property (which we don't know). If so I think that should be more safe removing the following paragraf from the primer document, just because we can't say anything about the property connecting the object with the resource specified by href:

If you see Link objects for "core" activity properties like actor, object, to, you can treat them as unique by href.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending Closure Resolved Unless the issue creator protests, this will be closed in a week or two Waiting for Commenter
Projects
None yet
Development

No branches or pull requests

4 participants