Skip to content

Fail closed when TES edit-control lookup is Err or missing - #145

Closed
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/conversation-control-fail-open-bbb4
Closed

Fail closed when TES edit-control lookup is Err or missing#145
Pitchfork-and-Torch wants to merge 1 commit into
xai-org:mainfrom
Pitchfork-and-Torch:cursor/conversation-control-fail-open-bbb4

Conversation

@Pitchfork-and-Torch

Copy link
Copy Markdown

TES get_edit_control timeout or per-id Err was collapsed to edit_control = None. is_stale_tweet treats None as current and Allows. EditControl::Edit with no edit_control_initial did the same.

This is not #134 (NSFW / takedown / nullcast / media TES flags). #134 leftover left edit-control out. Not #141 (exclusive TES). ConversationControl / TrustedFriends / MentionFilter have no TES hydrator on this dump (schema-only).

  • Entry: TesHydrator::hydrate_tweetsget_edit_control (timed_results already Found / NotFound / Failed)
  • Sink: DropStaleTweetsRule (is_stale() && !is_retweet()). Wired on TimelineHome and TimelineHomeRecommendations via TES_HOME_DROPS / VFFilter.
  • Break: Failed TES edit-control RPC or omitted id assembled as not-stale. Missing edit_control_initial on the Edit variant also assembled as current.
  • Viewer effect: a superseded / edited post ranks as the current card on For You and Latest Following.
  • Twin: Genuine Ok(None) (never edited) is unchanged.

Stamp edit_control_lookup_failed when the edit-control slot is Failed. is_stale_tweet Drops Failed, empty edit chains, and Edit-without-initial. DropStaleTweetsRule already drops stale non-retweets.

  • Assemble stamps lookup-failed on TES Err; NotFound stays not failed; Found current stays current
  • Failed still stamps when core data is missing
  • is_stale_tweet true for lookup-failed, empty chain, and Edit-without-initial
  • DropStaleTweetsRule drops Failed for viewer, author, and logged-out
  • Golden corpus: stale_edit_control_lookup_failed_drops, stale_edit_control_missing_initial_drops

Standalone decision-table harness (same Found / NotFound / Failed / missing-initial arms): 12/12 passed.

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

ConversationControl / TrustedFriends / MentionFilter are schema-only (thunder tweet/user). No TES RPC on this dump to hydrate an ACL. Exclusive TES fail-closed is #141. DropStaleTweetsRule still Allows stale retweets.

Fork PR: none

TES get_edit_control already returns Found / NotFound / Failed.
Assemble collapsed Failed to None, and is_stale_tweet treated
None as current, so DropStaleTweetsRule allowed superseded edits.
@Pitchfork-and-Torch
Pitchfork-and-Torch force-pushed the cursor/conversation-control-fail-open-bbb4 branch from e96fdbf to 902a06f Compare September 8, 2026 23:11
@Pitchfork-and-Torch

Copy link
Copy Markdown
Author

Parking this intern-stack PR per operator GitHub cleanup (2026-09-08). Hunt notes remain local. Not a reject of the class.

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.

1 participant