Skip to content

Conversation

@pory-gone
Copy link
Contributor

@pory-gone pory-gone commented Dec 4, 2025

Description

fix #2663
The boostPosition resolver was not applying the same filter as getAd, generating wrong boost estimates.

Screenshots

Schermata del 2025-12-04 19-33-46 Schermata del 2025-12-04 19-34-23 Schermata del 2025-12-04 19-34-43 Schermata del 2025-12-04 19-34-59 Schermata del 2025-12-04 19-35-13 Schermata del 2025-12-04 19-35-25 Schermata del 2025-12-04 19-35-37 Schermata del 2025-12-04 19-35-49 Schermata del 2025-12-04 19-36-03 Schermata del 2025-12-04 19-36-14 Schermata del 2025-12-04 19-36-25 Schermata del 2025-12-04 19-36-41

Additional Context

When a user wanted to pin a post to the homepage, SN showed the wrong cost because it included posts that would never be visible to that user (NSFW posts, muted users, muted subs)

Checklist

Are your changes backward compatible? Please answer below:
Yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
8/10
I tested all filter combinations via SQL queries simulating the resolver logic: logged out users, logged in with NSFW on/off, user mute, sub mute, and viewing specific subs

For frontend changes: Tested on mobile, light and dark mode? Please answer below:
NaN

Did you introduce any new environment variables? If so, call them out explicitly here:
NaN

Did you use AI for this? If so, how much did it assist you?
AI helped me generating the SQL test queries to check all filter combinations

@pory-gone pory-gone marked this pull request as ready for review December 4, 2025 18:59
@pory-gone pory-gone marked this pull request as draft December 5, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top Boost estimate is wrong

1 participant