Repository navigation
spec: deserialize error-only search responses, add TimelineTrend.grouped_trends - #120
Merged
Merged
Conversation
The three item types were marked never observed in #118 but the stored responses do carry them: relevance prompts in SearchTimeline (8), subscription and Community Notes prompts on UserSuperFollowTweets / GenericTimelineById (11) and community cards on CommunityDiscoveryTimeline (81). Community gains the is_nsfw flag those cards carry. Verified: 180 stored responses and the strict live test (93 calls) at match rate exactly 1.0. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ped_trends
When a search query fails (bad filter syntax, internal error) X answers
search_timeline: {} plus errors whose entries carry no code, so
SearchTimeline.timeline and ErrorResponse.code / extensions.code are optional
now and the wrappers raise X's message through error_check instead of a
validation error. ExplorePage trends gained grouped_trends (related trends).
Verified: 267 stored responses (two of them error-only) and the strict live
test (93 calls) at match rate exactly 1.0.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Stacked on #119 (the diff shows both until #119 is merged).
Error-only responses. When a search query fails X answers
{"data": {"search_by_raw_query": {"search_timeline": {}}}, "errors": [...]}(seen forfilter:quote min_faves:2000, a query X cannot parse, and for anInternal: Unspecifiederror on a community search).SearchTimeline.timelinewas required, so the whole response failed to deserialize with a validation error instead of surfacing X's message. It is optional now, following the existing convention for fields X drops on errors (data.user?on user timelines), and the wrapper helpers raise X's message througherror_check(python #TBD / typescript #TBD apply the doubleerror_checkon the search helper). The error entries of those responses carry nocode(extensionsneither), so both are optional;message,kind,name,source,locations,pathstay required.Drift.
TimelineTrend.grouped_trends: [{name, url}](related trends under a trend on ExplorePage) appeared in tonight's strict run;urlis the same URT landing url object astrend_url(SocialContextLandingUrl).Verified: 267 stored responses deserialize at match rate 1.0, including the two error-only search responses; strict live test with the nightly settings, 93 calls, every match rate exactly 1.0.
🤖 Generated with Claude Code