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

Brittle guidance regarding idempotent activities #485

Open
Tamschi opened this issue Dec 24, 2024 · 3 comments
Open

Brittle guidance regarding idempotent activities #485

Tamschi opened this issue Dec 24, 2024 · 3 comments
Assignees
Labels
Needs Primer Page Needs a page in the ActivityPub primer

Comments

@Tamschi
Copy link

Tamschi commented Dec 24, 2024

This is regarding

(current versions as of writing).

If only the oldest activity of an idempotent kind is stored, it's relatively easy to (due to very unreliable network conditions or other bugs) arrive at a state where the sender is permanently unable to directly remove such a relation because their instance doesn't allow them to re-send an Undo-activity correctly targeting the activity that originally established the relation.

To mitigate this,

  1. the receiving server of subjectively superfluous Follow or Like activities should1 replace the activity @id they have on file for the existing relation with the latest one that would have created it while still cancelling any other side-effects of the latter.
  2. If a stored Undo targeting this new Follow or Like has already been received and buffered, its effects should be applied (as if) after updating the stored @id.

Footnotes

  1. arguably "SHOULD", but I'm not sure if those keywords are considered appropriate for use in the Primer

@Tamschi
Copy link
Author

Tamschi commented Dec 24, 2024

This was originally discussed in #381.

(Thanks @snarfed for pointing this out! I tried searching for it but must have just barely missed the keywords.)

@evanp evanp added the Needs Primer Page Needs a page in the ActivityPub primer label Dec 27, 2024
@evanp
Copy link
Collaborator

evanp commented Dec 27, 2024

I agree that it probably makes sense for maximum interoperability for the receiving server to store not only the first Follow or Like activity, but to store additional Follow or Like activities, primarily for Undo. It is possible to ignore the id of an activity being undone, and just execute based on shape, but there are probably some security issues there. I'm going to mark this ticket as requiring an update to the primer, in order to suggest maximizing Undo functionality.

@evanp evanp self-assigned this Dec 27, 2024
@nightpool
Copy link
Collaborator

nightpool commented Dec 27, 2024 via email

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
Projects
None yet
Development

No branches or pull requests

3 participants