Skip to content

Lexicon definition name app.bsky.actor.defs#savedFeedsPrefV2 is not valid according to Lexicon spec #3588

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

Open
candy-jackal opened this issue Feb 26, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@candy-jackal
Copy link

Describe the bug

According to the Lexicon spec at https://atproto.com, app.bsky.actor.defs#savedFeedsPrefV2 (link to lexicon definition) is not a valid definition name due to using a digit (2).

Quote from Lexicon:

References to specific definitions within a Lexicon use fragment syntax, like com.example.defs#someView.

Which implies that definition names must be a subset of NSID fragments.

Quote from Namespaced Identifiers (NSIDs):

A fragment may be appended to an NSID in some contexts to refer to a specific sub-field within the schema. The fragment is separated from the NSID by an ASCII hash character (#). The fragment identifier string (after the #) has the same syntax restrictions as the final segment of an NSID: ASCII alphabetic, one or more characters, length restricted, etc.

For example, com.example.fooBar is a syntactically valid NSID, where com.example is the domain authority, and fooBar is the name segment.

  • Name:
    • must have at least 1 and at most 63 characters
    • the allowed characters are ASCII letters only (A-Z, a-z)
    • digits and hyphens are not allowed
    • case-sensitive and should not be normalized

NSID fragments follow the same syntax as NSID name segments and name segments do not permit digits, thus NSID fragments do not permit digits. The definition name savedFeedsPrefV2 would have the NSID app.bsky.actor.defs#savedFeedsPrefV2, but that would not be valid due to the digit 2, thus it is implied that the definition name is invalid due to the use of digit 2.

To Reproduce, etc.

This is an issue in the Lexicon definitions, not the software of this repo.

@candy-jackal candy-jackal added the bug Something isn't working label Feb 26, 2025
@bnewbold
Copy link
Collaborator

Thanks for reporting! Indeed the specs are not consistent with current usage here.

I would speculate that the way we will resolve this will be to allow digits in the "name" part of NSIDs, as long as they are not the first character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants