-
-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Uncovered while testing https://github.com/aliceisjustplaying/atproto-smoke against rsky-pds
This is one I'm not 100% confident about but confident enough to report it and worth investigating.
Describe the bug
After com.atproto.repo.createRecord, the local read-after-write path is inconsistent:
app.bsky.feed.getAuthorFeedimmediately includes the new postapp.bsky.actor.getProfilestill returns stalepostsCountapp.bsky.actor.getProfilescan time out in that window, and later still return stalepostsCount
This causes a real client-visible failure: on bsky.app, post -> own profile can land on the correct profile URL but render only the shell/footer with no profile content. The same
sequence works against bluesky-pds on the same VPS.
To Reproduce
Steps to reproduce the behavior:
- Log into
https://bsky.appagainsthttps://rsky.pdslab.net - Create a post
- Immediately navigate to
/profile/<own-handle> - Observe that the page lands on the correct profile URL but the profile content never appears
- Compare with
bluesky-pds, where the same flow works
Expected behavior
After a local write, profile reads should reflect the updated local state consistently enough for bsky.app to render the profile page correctly.
Details
- Operating system:
Linux 6.12.63+deb13-arm64 aarch64 GNU/Linux - Node version:
v20.19.2
Additional context
- Tested version:
mainatd2cb2b4e695a6f25b5981cab21eb6c7621fe4de8 - Rust:
rustc 1.94.0 (4a4ef493e 2026-03-02) - Direct local XRPC trace:
createRecord:200fastgetAuthorFeed:200, includes the new post immediatelygetProfile:200, but stalepostsCountgetProfiles: can time out immediately after the write; later returns200but still stalepostsCount
- Files:
- Exact code detail:
get_profile_munge()andget_profiles_munge()calllocal_viewer.update_profile_detailed(...)- update_profile_detailed preserves
followers_count,follows_count, andposts_countfrom the original upstream view unchanged,
while only overlaying profile-record fields likedisplay_name,description,avatar, andbanner
- Minimal fix:
Make read-after-write profile munging patch derived profile counters from local records instead of preserving stale upstream counts unchanged. The likely change is in
update_profile_detailed and theget_profile_munge/get_profiles_mungecall sites.