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

Clarify 'Delete' activity re unwinding side effects #472

Open
dmitrizagidulin opened this issue Sep 30, 2024 · 4 comments
Open

Clarify 'Delete' activity re unwinding side effects #472

dmitrizagidulin opened this issue Sep 30, 2024 · 4 comments
Labels
Needs Primer Page Needs a page in the ActivityPub primer Next version Normative change, requires new version of spec

Comments

@dmitrizagidulin
Copy link
Collaborator

dmitrizagidulin commented Sep 30, 2024

(Big thanks to @hrefna for raising this issue). To quote/paraphrase:

Many Activities in AP have complicated (and sometimes recursive) side effects. The specs (and Best Practices docs) on the Delete activity need to address how Delete interacts with unwinding side effects. For example:

  • Side effects of deleting a Follow action
  • Side effects of deleting a Accept/Decline action
  • What happens when you Delete{Create{object}}? Does the object go away?
  • What happens when you Delete{Create{object}} if someone has acted on the object other than the entity who has Created it? Especially if there are multiple creators or if the attributedTo is different from the actor?
  • If you Delete{Object} what happens to Create for that object?
  • What happens to the posts/likes/follows/etc if you Delete{Actor}?
  • If I Delete my actor's inbox—and just the inbox—what should I expect to happen?
  • If hashtags are defined as Links, that means I can't delete a Hashtag? Because Links are dis- In the following scenario what should happen:
    1. Create{Note{attributedTo: user1}, actor: user1}
    2. C2S: Update{Note} (indicating that the attributedTo has been changed to user2, which I don't think is forbidden by the spec)
    3. Delete{Create{Note{attributedTo: user2}, actor: user1}, actor: user1}.
  • Note1 has an inbox and allows follow relationships so that people can follow the Note. What happens when someone Deletes it?
@evanp
Copy link
Collaborator

evanp commented Oct 4, 2024

So, I think this is a really good issue. I have a few thoughts on the topic.

First, I don't think the concern about side effects is quite as severe for content types like Note, Image, Video, etc. This is pretty well-worn territory, covered in the spec, and the side effects are mainly about distributing to collections like replies.

The second issue is that I don't think deleting the activity is the preferred way to undo its side effects; they would normally be handled with an Undo. I think the Postel guideline for this is to say that publishers MUST use Undo or the inverse activity to undo an activity, not Delete, and that consumers MAY treat a Delete as if it were an Undo.

@evanp
Copy link
Collaborator

evanp commented Oct 4, 2024

I'll take the rest in order, but I think these should probably go to the Primer.

If you Delete{Object} what happens to Create for that object?

Nothing. It remains how it is.

What happens to the posts/likes/follows/etc if you Delete{Actor}?

Great question! I think a best practice by the server that hosts the actor object is to send out undos for all the relevant actions (Undo Follow, Undo Like, ...). It could even send out Delete's for created object, Undo's for Announce activities, etc.

That said, it's a real big lift, and I don't think anyone does this right now.

If I Delete my actor's inbox—and just the inbox—what should I expect to happen?

With the API, your server should reject it.

If hashtags are defined as Links, that means I can't delete a Hashtag?

Yeah, I don't think it's even meaningful to talk about deleting a hashtag. It's kind of a global numinous object that nobody owns; it's like deleting an idea or a category.

Note1 has an inbox and allows follow relationships so that people can follow the Note. What happens when someone Deletes it?

It works the same as deleting any other actor.

I'm going to try capturing some of these ideas to the Primer.

@evanp evanp added Needs Primer Page Needs a page in the ActivityPub primer Next version Normative change, requires new version of spec labels Oct 4, 2024
@evanp
Copy link
Collaborator

evanp commented Oct 4, 2024

We think that at least the question of deleting an actor should be addressed in the main spec.

@evanp
Copy link
Collaborator

evanp commented Oct 4, 2024

Bob Wyman points out that for many applications, deleting an actor is overkill, and would be really deleterious to the fabric network. For example, in a marketplace application, it would be a real big problem if the seller in a transaction deleted their account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Primer Page Needs a page in the ActivityPub primer Next version Normative change, requires new version of spec
Projects
None yet
Development

No branches or pull requests

2 participants