-
Notifications
You must be signed in to change notification settings - Fork 630
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
lexicons: more string limits #1994
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These all make sense to me 👍
I can't imagine any of these limits being hit in normal use
Let's get @pfrazee's opinion before merging tho
Runs the risk of invalidating some existing records but I dont know how many without, you know, scanning the whole network. I'd lean towards yoloing it. |
The limits look fine to me btw |
The motivation is to have *some* size limit on every string in post records, to maximize interoperation. For example, we currently have a CBOR library rejecting some records because of too-long strings. We don't want to limit the ability of folks to be very descriptive in alt text, specifically, so chose what seems to be a very large limit. If this is not large enough, based on feedback, we can bump it even higher. As context this is the largest string length limit in all of our lexicons.
This mostly results in checks against the string being empty, or unlimited size.
eddda66
to
5a2f140
Compare
Updated PR with codegen and changeset. My current disposition is to merge, and some small dev comms. |
…andling * origin/main: Revert "lexicons: more string limits (#1994)"
The most sensitive thing here is putting a (very long!) length limit on alt text. I believe this is long enough to not cause accessibility issues, but can update if needed.
The motivation is that an issue with very long embed image descriptions came up that has been causing records to be discarded by golang code. We'll separately work around that by bumping limits in the CBOR library (cborgen), but I think communicating some reasonable limit on these fields is helpful. This isn't intended to be antagonistic; the current problematic records seem to have huge values by mistake not intentionally.
While I was at it I did an informal review of all the "string" fields in records (I might have missed a couple, this was an informal scan).
These are technically violations of Lexicon stability, so need a bunch of review and buy-in on these. I'm not strident about these changes, but I think they are worth re-visiting, and this is probably our last chance to push them through.
The specific values are somewhat arbitrary. I chose "large" ones to minimize the change in behavior (given that there are no limits right now).
Haven't run codegen, would do that just before merging.
cc: @whyrusleeping w/r/t embed description length