Skip to content

feat: provide clearer restriction reasons and keep post-level restrictions post-level (#216) - #220

Open
Adityakk9031 wants to merge 1 commit into
xai-org:mainfrom
Adityakk9031:fix/creator-restriction-clarity-and-post-level-isolation
Open

Adityakk9031 wants to merge 1 commit into
xai-org:mainfrom
Adityakk9031:fix/creator-restriction-clarity-and-post-level-isolation

Conversation

@Adityakk9031

Copy link
Copy Markdown

Summary

Closes #216

1. Clear, Actionable Restriction Transparency in Under the Hood

As requested in #216, Under the Hood labels now provide creators with high-level, human-readable reasons, affected elements, and explicit recommendation surface impact without exposing internal classifier weights:

  • under-the-hood/strato/lib/underTheHoodLabels.strato:
    • Enriched both postLabels and accountLabels with:
      • reason: high-level readable category (e.g., "Sexually suggestive or explicit visual media detected under Adult Content policy", "Automated spam or repetitive distribution pattern detected").
      • restriction: explicit distribution impact (e.g., "Not recommended to non-followers; content warning applied").
      • scope: distinct classification boundary ("Post-level" vs "Account-level").
      • affectedTarget: specific affected element ("Media", "Text", "Link", "Account profile", etc.).
    • Added helper accessors (postLabelReason, postLabelRestriction, postLabelScope, postLabelAffectedTarget, accountLabel...) and exported them in the Strato Library.
  • under-the-hood/strato/columns/underTheHoodReport.User.strato:
    • Updated postLabelRow and accountLabelRow to include reason, restriction, scope, and affectedTarget in reportJson.
  • under-the-hood/jetfuel/routes/_lib/report.ts:
    • Extended PostLabel and AccountLabel types and JSON parsing for reason, restriction, scope, affectedTarget, and affectedMedia.
  • under-the-hood/jetfuel/routes/report.tsx:
    • Updated LabelCard to render scope badges (Post-level in blue, Account-level in amber), high-level reason rows, affected elements (e.g., Affected element: Media or Image 2), and specific restriction surfaces.
  • under-the-hood/jetfuel/routes/_lib/mock.ts:
    • Updated mock data to showcase the enriched attributes matching the RFC specification.

2. Keep Post-Level Restrictions Focused on the Post

Addressed the cascade where a single post label turns into an account-wide suppression penalty that hinders subsequent compliant content:

  • home-mixer/filters/oon_nsfw_simclusters_filter.rs:
    • Out-of-network recommendation dropping is now focused on candidates that actually carry sensitive/NSFW content or media. Compliant non-media posts from the creator are retained rather than being dropped unconditionally across the board.
    • Added comprehensive unit tests verifying filtering behavior for media, labeled, and compliant posts.
  • home-mixer/models/candidate.rs:
    • Prevented stamping SAFETY_BIT_AUTHOR_NSFW in Phoenix neural candidate conversion for compliant non-media posts from authors with author-level historical flags, ensuring clean subsequent content receives fair candidate ranking.
    • Added unit tests for to_recsys_candidate() verifying safety_label_mask on compliant candidates.
  • safety-label-user-agg/postToUserLabelRules.strato:
    • Configured mediaOnly: true on the nsfw_high_precision aggregation rule so that non-media posts are not counted toward visual media aggregation.

Verification

  • Unit tests added in home-mixer/filters/oon_nsfw_simclusters_filter.rs and home-mixer/models/candidate.rs.
  • Tested and validated TypeScript interfaces and parsing logic in under-the-hood/jetfuel/.

…rictions (xai-org#216)

Provide creators with transparent high-level restriction reasons, affected element attribution, explicit distribution scope badges in Under the Hood, and prevent post-level violations from broadly suppressing subsequent compliant posts.
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.

Give creators clearer reasons for restrictions and keep post-level restrictions post-level

1 participant