Some clients (anisota) seem to miss the $type here. It's quite inconvenient if they are not allowed to write their records - and we can easily elide the $type anyway by what collection the record is going to!
+22
-2
crates/tranquil-pds/src/api/repo/record/write.rs
History
1 round
5 comments
1 commit
expand
collapse
Some clients (anisota) seem to miss the $type here. It's quite
inconvenient if they are not allowed to write their records - and we can
easily elide the $type anyway by what collection the record is going to!
merge conflicts detected
expand
collapse
- crates/tranquil-pds/src/api/proxy.rs:40
expand 5 comments
im a bit on the fence in some ways about this yea but honestly think its less controversial than the former 馃槄. records without $type fields are objectively invalid types but also that field is required to match the collection anyways ...
main two arguments i see against this are
- dont accept invalid objects. theyre invalid.
- enforcing $type causes just a bit of extra friction against accidentally writing invalid records the first argument has some value and is what makes me hesitant but the second argument gets shot down by one: lexicon validation is there and more comprehensive and two: just like for the first reason to not do this. buggy clients arent our issue.
not sure quite yet honestly. i think we see if anyone has any strong very strong arguments for before we merge. otherwise like the former: try and get a hold of dame? this is arguably an anisota and reference impl bug not an tranquil one
try and get a hold of dame
I've already sent a message in bluesky DMs, I'll try keep this thread updated with any responses. Anisota is definitely broken here (and in a few other places) - I just would also like to be able to use broken clients that work with bsky... (actually specifically anisota. I just really like moth bluesky :))
Just checked - I actually got a response shortly before I sent this
Anisota seems to be interested in fixing this, I'm offering to give them an account on my PDS for debugging...
nice nice! im sure we can set them up with an account on tranquil.farm too if needed.
the main logic here i we want to keep one-off exceptions like this to a minimum. the expectation is that eventually either spec will be updated to align with ref impl or ref impl will be updated to align with spec. so we stick to spec where we can rn. having to account for all the various ways smaller clients are broken because they have buggy implementations gets messy really quickly. its already messy having to do that for bluesky to work at all. so we're using the official bluesky client + spec as the baseline to keep this thing at all maintainable long term 馃槄
So, this is necessarily pretty controversial and I'm not really happy with it. I'm certain it must break some tests somewhere too ... but I needed the patch for myself and I wanted to start some conversation
I stacked this ontop of the other patch so hopefully it should be possible to merge only that if (as I think is plausible) we decide we want that but not this