Skip to content

Fail closed when exclusive-content TES lookup errors - #209

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/exclusive-hydration-fail-closed
Open

Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:fix/exclusive-hydration-fail-closed

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Bug

VF ExclusiveContentHydrator asks TES get_exclusive_controls, then treats RPC Err and timeout the same as "this tweet is not exclusive."

DropExclusiveTweetContentRule only drops when exclusive_content.is_some(). timed_rpc on timeout returns an empty map (T::default()). Per-id TES Err is dropped by .ok(). Assemble then stores None. is_exclusive() is false, so the rule Allows.

TES Ok(None) still means the tweet is public. That path is unchanged.

This is not #7 (author/graph fail-open). Not #24 (safety labels / TES nsfw-nullcast-takedown flags). Not #208 (mixer SubscriptionHydrator wrapper id). Exclusive hydration is a third TES call with no fail-closed bit.

Fix

Map TES Err and hydrator timeout to ExclusiveHydration::Failed. Wire ExclusiveHydrationFailureDropRule immediately before DropExclusiveTweetContentRule on TimelineHome and TimelineHomeRecommendations. Drop with FilteredReason::ExclusiveTweet.

Successful empty TES map stays public. Super-follower Allow on a successful exclusive TES hit is unchanged.

Tests

  • TES Ok(None) stays Public
  • TES Ok(Some(author)) stays Exclusive
  • TES Err is Failed
  • Timeout fails the whole batch
  • Successful empty map stays Public
  • Rule + golden corpus drop Failed on Home and Recommendations
  • Public tweets still Allow
  • Wired rule order includes the new name

cargo test cannot run. Public dump has no visibility-filtering manifest. Verification of the change is on you.

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