Skip to content

Apply original-tweet civic labels when scoring retweets - #43

Closed
Pitchfork-and-Torch wants to merge 19 commits into
mainfrom
cursor/civic-quote-rt-fail-open-8cb7
Closed

Apply original-tweet civic labels when scoring retweets#43
Pitchfork-and-Torch wants to merge 19 commits into
mainfrom
cursor/civic-quote-rt-fail-open-8cb7

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown
Owner

Bug

VF SafetyLabelHydrator looks up labels only for the requested tweet ids. A retweet wrapper has source_tweet_id after TES, but civic / FOSNR / misinfo labels live on the original. FosnrCivicIntegrityDropRule checks has_safety_label on the wrapper, so Following and in-network For You keep a retweet of a civic-integrity labeled post.

UTH says FOSNR_CIVIC_INTEGRITY restricts discoverability to the author's profile. Hate / abuse / violent-speech stay on TimelineHome for the same reason. This is not xai-org#109 (civic table move to OON). This is not xai-org#115 (Following quotes at TimelineHome). This is not xai-org#119 (home-mixer primary lookup by wrapper id). This is not xai-org#121 / xai-org#139 (primary VF or wrapper label Err).

When the original is not in the same VF batch, the source label read was never issued. When it is issued and returns Err or omits the id, this change fails closed (omit wrapper → unresolved_author Drop). Confirmed-empty original stays unlabeled.

Five-line proof

  • Entry: HydrationPipeline::hydrate / apply_source_tweet_safety_labels (TES source_tweet_id)
  • Sink: FosnrCivicIntegrityDropRuleVFFilter Action::Drop / PossiblyUndesirable
  • Break: wrapper label map never included the original; civic drop never fired
  • Viewer effect: followed user's retweet of a civic-labeled post served on Following and in-network For You
  • Twin: AdsBrandSafetyVfHydrator already uses retweeted_tweet_id.unwrap_or(tweet_id)

Survey (xai-org#96xai-org#142)

Tests

  • retweet_inherits_confirmed_civic_label_from_original
  • retweet_source_label_err_fails_closed (fails open on unmodified main: source never fetched)
  • confirmed_unlabeled_original_does_not_fail_closed
  • civic_integrity_retweet_with_source_label_drops / golden corpus Home + Recs
  • union_adds_civic_without_dropping_existing

cargo test cannot run. Public dump has no VF crate manifest.

Fork PR: none

Open in Web Open in Cursor 

CI agent and others added 19 commits August 14, 2026 20:55
in_network_ids is passed to the VF client without deduplication, while
oon_ids is deduped four lines below. retweeted_tweet_id is pushed for
every candidate that has one, so the same ID repeats once per retweet of
a given post — most often when that post is going viral.

Neither VfClient implementation dedupes its input: StratoVfClient builds
one call per element, and XaiVfClient chunks by XAI_VF_MAX_BATCH_SIZE, so
duplicates consume batch slots and can force an extra round trip.

Not a correctness issue — results collapse into a HashMap keyed by tweet
ID — but redundant work on the For You serving path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Deduplicate in_network_ids before VF lookup
VF hydrated safety labels only for the requested wrapper id. A civic-integrity
label on the original never reached FosnrCivicIntegrityDropRule, so Following
and in-network For You kept the retweet. Fetch the source tweet's labels, union
them onto the wrapper, and fail closed when that read is Err or omitted.

Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
@Pitchfork-and-Torch

Copy link
Copy Markdown
Owner Author

Wrong base (fork PR). Do not merge.

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.

4 participants