Skip to content

Fail closed when gizmoduck viewer-age lookup errors - #159

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/vf-gizmoduck-fail-closed-abba
Open

Fail closed when gizmoduck viewer-age lookup errors#159
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/vf-gizmoduck-fail-closed-abba

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Bug

Gizmoduck viewer RPC Err / timeout was collapsed to ViewerAge::Unknown. SensitiveViewerUnderageDropRule only matches Known(age) < 18. SensitiveViewerNoStatedAgeDropRule only matches NotStated in a gating country. Unknown Allows.

#133 left this: "RPC error already fails open as Unknown." Age-0 is now NotStated. A failed read of a real logged-in viewer is not "no such user."

This is not #133 (age 0 sentinel). This is not #125 (mixer origin NSFW). This is not #149 (VF author Failed → omit). This is not #144 (user-label miss).

Five-line proof

  • Entry: ViewerHydrator::hydrate (Err / timeout used to stamp Unknown)
  • Sink: SensitiveViewerUnderageDropRule (LookupFailed now hard-drops sensitive media)
  • Break: gizmoduck viewer RPC error assembled as un-aged, so NSFW/gore/card-image never age-gated
  • Viewer effect: a 15-year-old (or any viewer) whose gizmoduck row timed out still sees NSFW as a normal For You / Following card
  • Twin: confirmed Unknown (no such user) and NotStated (jurisdiction-scoped) are unchanged. Fail closed when VF gizmoduck author lookup is Err or missing #149 owns author Failed.

Change

Stamp ViewerAge::LookupFailed on gizmoduck viewer Err / timeout. The underage drop also fires on age_lookup_failed so sensitive media hard-drops globally, including outside NSFW_GATING_COUNTRIES. Non-sensitive posts still serve.

Tests

  • Viewer RPC error / timeout → LookupFailed (not Unknown, not underage, not NotStated)
  • LookupFailed drops every sensitive firing candidate, including NSFW_TEXT in US
  • LookupFailed allows a clean non-sensitive post
  • Unknown still Allows (confirmed no-such-user)
  • Golden corpus gizmoduck_age_lookup_failed_drops_sensitive_media

Standalone decision-table harness (same match arms): 15/15 passed.

cargo test cannot run. Public dump has no visibility-filtering crate manifest.

Leftover

Author gizmoduck Failed is #149. Interstitial on an ancillary quote/RT is #143/#146. Account-country geo is #113.

Fork PR: none

Gizmoduck viewer RPC Err/timeout was mapped to ViewerAge::Unknown.
SensitiveViewerUnderageDropRule and NoStatedAgeDropRule both miss
Unknown, so NSFW/gore/card-image served as a normal card during an
outage. Stamp LookupFailed and hard-drop sensitive media globally.
Confirmed Unknown (no such user) and NotStated stay unchanged.

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

Copy link
Copy Markdown
Author

Same class as #160 (gizmoduck viewer-age lookup fail-closed). One class one PR. Prefer #160.

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