Skip to content

Fail closed when Flock mute/block graph slots are missing - #162

Open
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/flock-partial-slots-fail-closed-b15d
Open

Fail closed when Flock mute/block graph slots are missing#162
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/flock-partial-slots-fail-closed-b15d

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

Bug

decode_relationship_edges mapped a truncated Flock multi-query onto empty mute/block/mute-retweet sets. RPC success with 1–3 result slots therefore assembled viewer_mutes_author = false / viewer_blocks_author = false.

A total Flock Err already returns an empty map (SocialgraphHydrator marks Failed). Four empty slots is a confirmed unlabeled read. Those paths are unchanged.

This is not #137 (total Failed assembled via get_or_default). #137 leftover: "Partial Flock result slots still default missing mute/block graphs to empty."

Five-line proof

  • Entry: decode_relationship_edges (next_edge_set used unwrap_or_default for missing slots)
  • Sink: ViewerMutesAuthorRule / ViewerBlocksAuthorRule / MutedRetweetsRule
  • Break: 1-slot Flock success decoded as follows-only, mute/block empty → Allow
  • Viewer effect: a muted or blocked author still served when Flock returned a truncated multi-query
  • Twin: Fail closed when socialgraph mute/block relationship reads fail #137 fail-closes a total Failed read; four confirmed-empty slots stay unlabeled

Change

Require exactly four result slots (follows, blocks, mutes, mute-retweets). Otherwise return no relationships, same sink as RPC Err. Four empty slots remain a successful all-false read.

Tests

  • Four named slots still decode follows/blocks/mutes/mute-retweets
  • Four empty slots stay confirmed unlabeled
  • 0 / 1 / 3 / 5 slots fail closed (None)

Standalone decision-table harness (same match arms): 8 assertions passed.

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

Fork PR: none

A truncated Flock multi-query used to decode missing mute/block slots as
empty sets. Require all four relationship slots; otherwise treat the
read as failed so muted and blocked authors are not assembled as safe.

Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
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