Repository navigation
Fix fail-open hydration: drop tweets when label or TES flag lookup fails - #24
Open
Pitchfork-and-Torch wants to merge 3 commits into
Open
Pitchfork-and-Torch wants to merge 3 commits into
Pitchfork-and-Torch wants to merge 3 commits into
Conversation
Pitchfork-and-Torch
force-pushed
the
fix/failopen-safety-labels
branch
from
September 3, 2026 23:02
40a5236 to
76cc147
Compare
SafetyLabelHydrator treated lookup errors as an empty SafetyLabelMap, so VF rules saw unlabeled and allowed. Stop inserting the default on miss and fail closed through SafetyHydrationFailureDropRule.
build_tweet_features treated TES timeout/RPC error as false for nsfw_user, nsfw_admin, nullcast, takedown, and media, so OON NSFW flag drops and nullcast/takedown drops allowed. Mark those Failed keys on the existing safety_hydration_failed flag. Ok(None) still means the tweet is not flagged.
build_tweet_features discarded Found nsfw/nullcast/takedown/media bits whenever fetch_pure_core omitted the tweet. Core miss also failed open. Keep the flag bits and mark safety_hydration_failed when core is absent.
Pitchfork-and-Torch
force-pushed
the
fix/failopen-safety-labels
branch
from
September 4, 2026 01:13
090403c to
e9f61c1
Compare
Author
|
Parking this intern-stack PR per operator GitHub cleanup (2026-09-08). Hunt notes remain local. Not a reject of the class. |
Author
|
Reopened. This was a serving-path hunt PR parked by mistake during the 2026-09-08 intern-stack cleanup. Not a reject of the class. Leaving it for xAI review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Safety-critical tweet metadata fail-open on miss.
SafetyLabelHydrator collapsed lookup errors and missing keys into SafetyLabelMap::default(). VF tweet-label rules then saw unlabeled and allowed.
TesHydrator.assemble_tweet_features treated TES timeout/RPC Failed the same as Ok(None): nsfw_user, nsfw_admin, nullcast, takedown, and media became false. fetch_pure_core then omitted Err/None, and build_tweet_features unwrap_or_default wiped any Found flag bits. TweetNsfwUserDropRule / TweetNsfwAdminDropRule (OON), NullcastedTweetDropRule, and takedown/DMCA drops allowed.
This is not VF dual-role merge (PR 55 / residual 90). Not mute/block (PR 23 / PR 9). Not author/graph hydration (PR 7). Not HM TES miss wiping retweet/reply ids (PR 94).
Fix
On label miss, do not insert an empty map. On TES flag RPC Failed or missing core, mark the tweet. Found flag bits stay attached even when core is absent. Assemble sets safety_hydration_failed. SafetyHydrationFailureDropRule is the first TimelineHome / TimelineHomeRecommendations RuleSpec row and drops on that flag.
Ok(None) on a flag RPC still means the tweet is not flagged.
Proof
Tests