fix(lexicon)!: wire fidelity against upstream lexicons, enforced by a drift test #123
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the v0.7.0 update cycle (wave 4). The hand-written Lexicon models have drifted from upstream: wrong JSON names, an endpoint that never existed, and 7 invented permission sets. The root fix is a drift test against a pinned upstream snapshot, with everything it finds fixed.
Drift test
tests/:bluesky-social/atprotolexicons/at a recorded commit, plus thesite.standard.*schemas from the network. Add a script or README for refreshing it.[JsonPropertyName]on a Lexicon model exists on its upstream def, with an explicit allow-list;[JsonPropertyName]on every public Lexicon property) replaces about 100 DTO-only serializer tests.Fixes the drift test demands (known today)
GetConvoAvailabilityResponse.canConvo→canChat(+convo);ListConvosAsync(readOnly)→readState;ProfileViewDetailed.associatedChat→ the typedassociated(profileAssociated); removeConvoView.opened;AcceptConvoResponseis{rev}only.tools.ozone.moderation.querySubjectsnever existed: implementqueryStatuses(all params,subjectStatuses, booleantakendown/appealed).tools.ozone.signature.searchAccountsis a GET query withvalues[];AccountResult→admin.defs#accountView.server.deactivateAccountandchat.bsky.convo.updateAllReadsend their JSON bodies (deleteAfter,status);updateAllReadreturnsupdatedCount.chat.bsky.actor.exportAccountDatareturns JSONL; don't deserialize it as JSON.listNotificationsseenAt, which "will cause an error" since 2026-09-21;[Obsolete]onpriority,isFallback,sync.notifyOfUpdateandCommitEvent.TooBig/Rebase/Blobs;#handle/#tombstoneevents, removed upstream in 2025.AtProtoScopes.PermissionSets: remove the 7 invented NSIDs and addauthDeleteContent,authManageNotifications,chat.bsky.authFullChatClient,site.standard.authFullandsite.standard.authSocial. Pin the list to the snapshot.!hide,!warnandbot;[Obsolete]gore; fixNotAvailable.Missing fields on existing models
Everything in the lexicon research §3 and §5, including:
bookmarkCount,debug; viewerbookmarked,knownLikers;FeedViewPost.reqIdand a typedreasonunion (#reasonRepost,#reasonPin);threadContext; a typedblockedAuthor; generatorcontentMode;searchPoststag[]; typed threadgate/postgate rules; typedembed.recordview variants; videopresentation; the new external-embed fields.pronouns,associated,verification,status,debug,website,joinedViaStarterPack. Viewer gainsmutedOnlyReposts/mutedOnlyQuoteposts/activitySubscriptionand typedmutedByList/blockingByList. Typed preferences (the 16#*Preftypes with an unknown fallback).recId/recIdStr.starterPack,reasons[], all 13 reason constants,registerPush.ageRestricted.subjectOptedOut,referenceListOptOut;muteActoronlyReposts/onlyQuoteposts; followers/followssort;getListspurposes[]; typed starter-packfeeds.createSession.allowTakendown,describeServer.blobUploadLimit,createReport.modTool;failureCodeand the 4 new states;ModerationSubjectconvoRef/messageRef,modEventTag.durationInHours,emitEvent.reportAction;site.standardrecord fields.CHANGELOG
Fixed(every wrong name, method or body),Breaking changes(renames and removals),Added(fields).Wire bugs found during the #119 type conversions (parts 2 and 3). JSON names and methods were deliberately left unchanged there, so add these to this issue's scope:
app.bsky (#155)
SearchPostsAsynctagis a single string, but the lexicon defines an array.listNotificationsreasons[],getListspurposes[].viaon the like and repost records;Relationshipblocking/blockedBy/blockingByList/blockedByList.StandardLabelValues.NotAvailableduplicatesNoUnauthenticated.chat.bsky / tools.ozone (#156)
MuteConvoAsync,UnmuteConvoAsyncandUpdateReadAsyncread aConvoView, but the server sends{convo: …}.AddReactionAsync/RemoveReactionAsyncread aMessageView, but the server sends{message: …}.RecordViewDetail.BlobCidsshould beblobs.modEventLabel/modEventTagarrays that Ozone requires are optional here.verifierDid,relatedProfiles, and severalqueryEvents/querySets/listMembersfilters.