Skip to content

Stop conversation-gap expansion from inserting unhydrated grandparents - #102

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

Stop conversation-gap expansion from inserting unhydrated grandparents#102
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/hydrate-gap-ancestors

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Summary

ConversationGapAncestorHydrator splices a skipped grandparent tweet id into candidate.ancestors from the parent's in_reply_to_tweet_id, then VF and convo_marshaller consume that list. It never TES-fetched the spliced id.

Consequences on Following today (and on For You if PR 97 lands the same hydrator):

  • ancestor_texts was built from the pre-splice id list, so muted-keyword matching missed grandparent text
  • ancestor_users was never written, so Brazil / socialgraph mute-block (PR 101) missed the grandparent author
  • tombstone_ancestor_ids could not mark a deleted grandparent, so the conversation module still tried to render it

This PR TES-fetches spliced ids, then hydrates texts, users, and tombstones from the expanded list. CoreData ancestor_users are merged, not wiped (TES miss does not clear parent/root authors). One class, one file. No ranking changes.

This is not PR 97 (Phoenix wiring of the hydrator) and not PR 101 (the mute/block filter).

Proof

  • Entry: ConversationGapAncestorHydrator.expand_ancestors_for_gap inserts grandparent tweet id
  • Sink: VFFollowingCandidateHydrator / convo_marshaller / FollowingViewerMutedKeywordFilter / AuthorSocialgraphFilter / Brazil2026ElectionFilter
  • Break: TES was only fetched for original ancestor ids; texts used the pre-splice list; ancestor_users was never set
  • Viewer effect: a skipped-conversation grandparent from a muted, blocked, listed, or deleted account still appears in the Following thread module
  • Twin: CoreDataCandidateHydrator.build_ancestor_users and the hydrator's own ancestor_texts/tombstone helpers, which already run for the original parent and root

Test plan

  • spliced_grandparent_gets_text_users_and_tombstone fails on main, passes on this branch
  • deleted_spliced_grandparent_is_tombstone fails on main, passes on this branch
  • deep_chain_inserts_grandparent and short-chain keep cases still pass
  • batches_unique_parents_across_candidates now expects a second TES batch for spliced ids
  • 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