go-fed / activity

ActivityStreams & ActivityPub in golang, oh my!
BSD 3-Clause "New" or "Revised" License
710 stars 111 forks source link

Aggressive deserialization into PublicKey #123

Closed cjslep closed 5 years ago

cjslep commented 5 years ago

Things are aggressively deserializing into PublicKey, due to it's type-less nature not being explicit in the JSON-LD (wtf).

Fixing it would be straightforward, but id right now is tied to ActivityStreams when it should be... time to pay off tech debt and make it stand alone (but will probably be a breaking change).

cjslep commented 5 years ago

809fd1f0414affef24779128dbaedf2ddec339e9 adds failing unit tests for this use case.

cjslep commented 5 years ago

07df3adee59677ec361730794499c9b2f4f0de2c is on the way to fixing this bug, long-term, correctly.

Introduces a breaking syntax change:

Commit message has some relevant details.

cjslep commented 5 years ago

The fix is mostly verified in 84ee3614781ac73ebdf1be5a2991fd2eac1e29e0, however there is a map-stability issue that needs to be fixed for the tests to reflect that.

cjslep commented 5 years ago

Testing now sorts @context, eliminating flakiness for the test covering this bug, in 9acafe5f975875d6257a7aac5ee0322c7609aaeb