Skip to content

Fail closed when TES NSFW, takedown, nullcast, or media reads error - #134

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/vf-tes-safety-flag-fail-closed-upstream-80ac
Open

Fail closed when TES NSFW, takedown, nullcast, or media reads error#134
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/vf-tes-safety-flag-fail-closed-upstream-80ac

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Wave 2 check

Quote / RT / ancestor Action::Interstitial does not set drop_ancillary_posts. Verified.

should_drop_reason only matches Action::Drop. AncillaryVFFilter reads that flag. Home NSFW rules emit Interstitial; Recs has Drop twins (NSFW_HIGH_PRECISION_DROP, etc.). Interstitial means keep-and-warn, not hard-drop. Not rewritten.

This is not #115 (Following quotes at Home), #117 (QuoteHydrator TES), #118 (quoted id on RTs), #119 (RT primary looked up by wrapper id), or #121 (VF Err / missing key). #121 leftover text called this Interstitial≠Drop path out and said TES-flag miss is separate.

Bug

TES tweet-flag RPCs (nsfw_user, nsfw_admin, takedown_reasons, nullcast, media) already distinguish Found / NotFound / Failed. build_tweet_features then does get(...).unwrap_or(false) and get_or_default.

Failed and NotFound both become “flag unset”. NSFW interstitial / Recs Drop, legal takedown, nullcast, and DMCA/geo rules never see the label.

  • Entry: TesHydrator::hydrate_tweetsTweetHydration
  • Sink: NsfwAuthorInterstitialRule, tweet NSFW Recs drops, legal takedown, NullcastedTweetDropRule, Recs DMCA/geo
  • Break: Failed TES flag read assembled as false
  • Viewer effect: NSFW or taken-down post (or a quote/reply of one) serves as a normal card
  • Twin: Fail closed when primary VF lookup is Err or missing #121 fail-closes a missing VF map key. TES flags were the leftover that issue called out.

Genuine NotFound / Ok(None) (no flag) is unchanged.

Fix

If any of those five lookups is Failed for a tweet id, drop that candidate from the hydrated set. FilterTweets already maps a missing hydrated candidate to Verdict::unresolved_author (Drop / UnspecifiedReason). Mixer VFFilter and should_drop_ancillary already drop that reason.

Do not treat Interstitial as Drop.

Tests

  • Found false / NotFound / empty batch → not a safety failure
  • Failed nsfw_user, takedown_reasons, nullcast, or media → safety failure
  • retain_candidates_with_usable_tes_flags drops only the Failed id
  • Hydrated::is_failed is true only for Failed

Standalone decision-table harness (same Found / NotFound / Failed arms): 12 assertions passed.

cargo test cannot run. Public dump has no visibility-filtering / Home Mixer manifest.

Leftover

Gizmoduck author NSFW miss is #125. Socialgraph relationship miss still fail-opens as “not muted / not blocked”.

Interstitial on a quote/RT/ancestor is keep-and-warn, not Drop. The leak
next to that is TES nsfw/takedown/nullcast/media RPC failure treated as
"flag unset", so those rules never fire and the post serves clean.

Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
This was referenced Sep 7, 2026
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.

2 participants