Skip to content

Drop replies whose conversation ancestors are muted or blocked - #101

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/mute-blocked-ancestors
Open

Drop replies whose conversation ancestors are muted or blocked#101
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/mute-blocked-ancestors

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Summary

AuthorSocialgraphFilter already drops when the viewer mutes or blocks the candidate author, and when the viewer blocks a quoted or retweeted author. Conversation modules still render ancestor tweets (root plus parent) from ancestor_users. Mute and block did not look at that list.

Brazil2026ElectionFilter already drops a reply when ancestor_users hits the listed-author set, with an explicit comment that ancestors are returned on the scored post for For You thread UI. This PR clones that ancestor edge for muted_user_ids and blocked_user_ids. One class, one file. No ranking changes.

This is not mute-on-quote (PR 23), not mute-on-retweet (PR 9), and not retweet original blocked-by (PR 100).

Proof

  • Entry: CoreDataCandidateHydrator.build_ancestor_users writes candidate.ancestor_users (parent author plus root author)
  • Sink: AuthorSocialgraphFilter (Phoenix pre-selection and Following reverse-chron post-selection)
  • Break: mute/block matched author_id, quoted_user_id, and retweeted_user_id; ancestor_users was Brazil-only
  • Viewer effect: F replies to muted or blocked user Q; Home still serves the reply and convo_marshaller includes Q's tweet in the conversation module (unless tombstoned)
  • Twin: Brazil2026ElectionFilter.should_remove ancestor_users any(is_excluded); FollowingViewerMutedKeywordFilter already matches ancestor_texts

Test plan

  • test_muted_ancestor_author_is_removed fails on main, passes on this branch
  • test_blocked_ancestor_author_is_removed fails on main, passes on this branch
  • test_unmuted_unblocked_ancestor_is_kept still keeps a reply whose ancestors are not muted or blocked
  • unit tests added; cargo test cannot run in the public dump (no Home Mixer Cargo.toml)

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.

1 participant