Repository navigation
home-mixer: ignore expired safety labels in ads brand safety - #124
Closed
Pitchfork-and-Torch wants to merge 1 commit into
Closed
Pitchfork-and-Torch wants to merge 1 commit into
Pitchfork-and-Torch wants to merge 1 commit into
Conversation
cursor Bot
pushed a commit
to Pitchfork-and-Torch/x-algorithm
that referenced
this pull request
Sep 7, 2026
Rebased onto latest xai-org/x-algorithm main. Missed ads-VF hydration defaulted organics to MediumRisk, and ads-only nsfw_author_ads rewrote the shared verdict. Default For You blender then pulled those posts out of ranked order when placing ads. Keep a real MediumRisk tweet-label verdict off ad neighbors. Following still will not sit an ad next to Unspecified. Compatibility with sibling PRs that touch the same files: - expired ads brand-safety labels are ignored (xai-org#124) - gizmoduck uses origin author size/NSFW OR and fails closed on miss (xai-org#125) Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
Pitchfork-and-Torch
added a commit
to Pitchfork-and-Torch/x-algorithm
that referenced
this pull request
Sep 8, 2026
Rebased onto latest xai-org/x-algorithm main. Missed ads-VF hydration defaulted organics to MediumRisk, and ads-only nsfw_author_ads rewrote the shared verdict. Default For You blender then pulled those posts out of ranked order when placing ads. Keep a real MediumRisk tweet-label verdict off ad neighbors. Following still will not sit an ad next to Unspecified. Compatibility with sibling PRs that touch the same files: - expired ads brand-safety labels are ignored (xai-org#124) - gizmoduck uses origin author size/NSFW OR and fails closed on miss (xai-org#125)
GetSafetyLabels still returns expired rows. VF drop rules already skip them. Ads adjacency used type presence, so a lapsed NSFA_COMMUNITY_NOTE (or any other TTL label) kept the post MediumRisk or HighRisk. Skip labels whose expires_at_msec is at or before now in both v1 and v2 verdicts, and omit them from the scored-post label list. Missing expiry stays permanent.
Pitchfork-and-Torch
force-pushed
the
cursor/ads-ignore-expired-labels-upstream-8ee7
branch
from
September 8, 2026 23:13
bbdcb65 to
902a06f
Compare
Author
|
Parking this intern-stack PR per operator GitHub cleanup (2026-09-08). Hunt notes remain local. Not a reject of the class. |
Pitchfork-and-Torch
deleted the
cursor/ads-ignore-expired-labels-upstream-8ee7
branch
September 18, 2026 00:33
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
GetSafetyLabels still returns expired rows. VF drop rules already skip them (PR 106). Ads brand safety did not.
AdsBrandSafetyVfHydratorcallscompute_verdict/compute_verdict_v2, which used type presence only. A lapsedNSFA_COMMUNITY_NOTE(or any other TTL label in the high/medium/low-risk sets) kept the post HighRisk or MediumRisk. Ads blender then treats those verdicts as avoid, so ads would not sit next to a post whose note or label had already expired.Community Notes have no VF drop rule in this dump. Ads adjacency is the ranking sink for
NSFA_COMMUNITY_NOTE.Fix
Skip labels whose
expires_at_msecis at or before now before scoring v1 and v2 verdicts, and before listing labels on the scored post. A missing expiry stays permanent. Expired v2 written labels fall back to v1.No change to write paths, TTLs, GetSafetyLabels, or VF drop rules.
Proof
AdsBrandSafetyVfHydrator→compute_verdict/compute_verdict_v2expires_at_msec; GetSafetyLabels returns expired rowsfrom_proto_label_typesexpiry fence (PR 106)Tests
expired_community_note_does_not_keep_medium_risk(fails on unmodified main)safety_labels; active note still MediumRiskcargo testcannot run in the public dump (no Home Mixer Cargo.toml). Decision table for the expiry fence was run standalone and matched these cases.Fork
Same fix on the older fork tree (no HighRisk / v2): Pitchfork-and-Torch#13
This is a port onto current
xai-org/x-algorithmmainrather than a clean cherry-pick.