Custom feeds, search, and threads route to wrong host for non-bsky.social PDS OAuth users #35
Labels
No labels
auth
bug
composer
correctness
database
durability
enhancement
feeds
interactions
notifications
performance
reliability
safety
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starsetbyte/peregrine#35
Loading…
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?
Summary
For OAuth users whose PDS is not
bsky.social, custom feeds, search, and thread views fail becausePdsRoutingInterceptorrewrites all XRPC reads to the user's own PDS — but most read endpoints are served by the app view (public.api.bsky.app), not the PDS. Onlyapp.bsky.labeler.getServicesis currently exempted viaAPP_VIEW_ONLY_PATHS.Root cause
PdsRoutingInterceptor(auth/oauth/PdsRoutingInterceptor.kt) rewrites every/xrpc/*path tosession.pdsUrlfor OAuth sessions. The single allowlist entry (app.bsky.labeler.getServices) was added to fix labeler loading (seedocs/OAUTH_IMPLEMENTATION_STATUS.md), but the same class of bug affects every app-view endpoint:app.bsky.feed.getTimelineapp.bsky.actor.getPreferencesapp.bsky.notification.listNotificationscom.atproto.repo.*(writes)app.bsky.feed.getFeedapp.bsky.feed.getFeedGeneratorsapp.bsky.feed.getPostThreadapp.bsky.feed.searchPostsapp.bsky.actor.searchActorsapp.bsky.actor.getAuthorFeedapp.bsky.actor.getProfileProposed fix
Expand
APP_VIEW_ONLY_PATHS(or rename toAPP_VIEW_PATHS) to include the app-view-served read endpoints listed above.Alternatively (more robust), invert the routing model: route writes and a small set of session-scoped reads (
getTimeline,getPreferences,putPreferences,listNotifications,updateSeen) to the PDS, and everything else to the app view. This matches what the official client does and won't need updating each time a new read endpoint is added.Considerations
public.api.bsky.appalready works for the labeler allowlist entry, so no new infrastructure is needed.getAuthorFeedfor the user's own DID could theoretically go to the PDS, but the app-view also serves it correctly — simpler to always use app-view for reads.Reproduction
bsky.social(e.g. a self-hosted PDS or a third-party-hosted account).