Completely omit id for anonymous objects #850

Merged
floatingghost merged 1 commit from Oneric/akkoma:ap-anonymous-errata into develop 2025-01-03 15:23:03 +00:00
Member

Although current behaviour is (the only way to) follow ActivityPub specification, the specification itself is buggy and incompatible with the JSON-LD spec its (transitively) based on. In practice following current spec creates federation issues with implementations performing JSON-LD processing, like e.g. IceShrimp.NET.

The bug was brought up with W3C and to remedy the situation a AP spec amendment/errata was proposed; this patch brings us in line with the proposed spec change, fixing: #848

WIP since federation effects are completely untested atm and the decision wrt AP spec isn’t final yet

Although current behaviour is (the only way to) follow ActivityPub specification, the specification itself is buggy and incompatible with the JSON-LD spec its (transitively) based on. In practice following current spec creates federation issues with implementations performing JSON-LD processing, like e.g. IceShrimp.NET. The bug was brought up with W3C and to remedy the situation a AP spec amendment/errata was proposed; this patch brings us in line with the proposed spec change, fixing: https://akkoma.dev/AkkomaGang/akkoma/issues/848 ~~**WIP** since federation effects are completely untested atm and the decision wrt AP spec isn’t final yet~~
Oneric added 1 commit 2024-11-10 01:52:31 +00:00
Completely omit id for anonymous objects
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
ci/woodpecker/pull_request_closed/build-amd64 Pipeline is pending approval
ci/woodpecker/pull_request_closed/docs Pipeline is pending approval
ci/woodpecker/pull_request_closed/lint Pipeline is pending approval
ci/woodpecker/pull_request_closed/build-arm64 Pipeline is pending approval
ci/woodpecker/pull_request_closed/test Pipeline is pending approval
0f9c9aac38
Current AP spec demands anonymous objects to have an id value,
but explicitly set it to JSON null. Howeveras it turns out this is
incompatible with JSON-LD requiring `@id` to be a string and thus AP
spec is incompatible iwth the Ativity Streams spec it is based on.
This is an issue for (the few) AP implementers actually performing
JSON-LD processing, like IceShrimp.NET.
This was uncovered by IceShrimp.NET’s zotan due to our adoption of
anonymous objects for emoj in f101886709.

The issues is being discussed by W3C, and will most likely be resolved
via an errata redefining anonymous objects to completely omit the id
field just like transient objects already do. See:
https://github.com/w3c/activitypub/issues/476

Fixes: #848
Author
Member

Federation test results:

Confirmed good:

  • Akkoma
  • IceShrimp.NET
  • Mastodon
  • Sharkey
Presumed good, but no confirmation:
  • Pleroma
Confirmed subpar, but still receiving all posts etc:
  • GTS (only showing text, no image)

This restores federation with IceShrimp.NET (and any other JSON-LD-processing implementations) and otherwise appears is no worse than before. With how the discussion in the W3C issue is going it also seems unlikely the effective result of the spec change will change from this, thus removing WIP; imho fairly safe and good to merge now

Federation test results: <strong>Confirmed good:</strong><br /> <ul> <li>Akkoma</li> <li>IceShrimp.NET</li> <li>Mastodon</li> <li>Sharkey</li> </ul> <strong>Presumed good, but no confirmation:</strong><br /> <ul> <li>Pleroma</li> </ul> <strong>Confirmed subpar, but still receiving all posts etc:</strong><br /> <ul> <li>GTS <i>(only showing text, no image)</i></li> </ul> This restores federation with IceShrimp.NET (and any other JSON-LD-processing implementations) and otherwise appears is no worse than before. With how the discussion in the W3C issue is going it also seems unlikely the effective result of the spec change will change from this, thus removing WIP; imho fairly safe and good to merge now
Oneric changed title from WIP: Completely omit id for anonymous objects to Completely omit id for anonymous objects 2024-11-14 17:55:04 +00:00
hongminhee approved these changes 2024-12-31 16:48:46 +00:00
First-time contributor

The bug that this patch addresses causes interoperability issues between Akkoma and any Fedify-based implementations (including Hollo). I hope this patch will be merged soon!

The bug that this patch addresses causes [interoperability issues](https://github.com/dahlia/hollo/issues/86) between Akkoma and any [Fedify](https://fedify.dev/)-based implementations (including [Hollo](https://docs.hollo.social/)). I hope this patch will be merged soon!
floatingghost merged commit 91bedcfa68 into develop 2025-01-03 15:23:03 +00:00
floatingghost deleted branch ap-anonymous-errata 2025-01-03 15:23:04 +00:00
Sign in to join this conversation.
No description provided.