Skip to content

spec: six operations from a browser HAR capture - #125

Merged
fa0311 merged 1 commit into
mainfrom
feat/har-ops-2026-10
Oct 17, 2026
Merged

fa0311 merged 1 commit into
mainfrom
feat/har-ops-2026-10

Conversation

@fa0311

@fa0311 fa0311 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #124. Six operations that the X web client issues but the spec did not cover, found in a browser HAR capture the maintainer provided. Each is typed from recordings only (sandbox account, 2026-10-17; the HAR bodies as extra samples) and registered in placeholder.json with the canonical sample values (elonmusk / 44196397).

operation API class what it returns samples
AboutAccountQuery UserApi the "About this account" panel: join date, where the account is based, username changes, verification. The result is a reduced User plus about_profile, so it has its own type (AboutAccountUser) rather than widening User. 2
SidebarUserRecommendations UsersApi who to follow in a profile's sidebar (token + UserResults) 4
BroadcastQuery DefaultApi a live video broadcast by id (state, timings, viewer counts, Periscope user, the announcing post) 7
AudioSpaceById DefaultApi a Space by id: metadata, participants (admins / speakers / listeners carry a reduced user: label, blue verified, verification without verified), the announcing post, sharings 3
useStoryTopicQuery DefaultApi AI-written explore stories of a topic (rest_id: "For You"), new typename AiTrend 2
grokAccountJwtQuery DefaultApi whether the account is linked to a Grok account 2

Also:

  • IdentityProfileLabelsHighlightedLabel is a new shared schema in schemas/user.yaml (same key and backend object on the about panel and on space participants).
  • test/python/test_serialize.py resolves placeholder keys case-insensitively, so operations whose name starts lowercase (useStoryTopicQuery, grokAccountJwtQuery) are now exercised by the strict test.

Skipped on purpose (niche, and each would be a live call in every strict run): UserSportsProfile, NflScoresSidebarFollow, SportsLeagueFollow, MLBTeams, MLBSchedule.

Verification

  • 831 stored responses deserialize at match rate exactly 1.0, including the 26 samples of the six operations.
  • Strict live test: 130 calls (the six new operations included), 129 at match rate exactly 1.0; the remaining call was an HTTP 503 from X on UserRepliesTimeline, not a spec issue. 6 responses with partial errors beside complete data are logged as warnings.

🤖 Generated with Claude Code

AboutAccountQuery (AboutAccountUser: a reduced User plus about_profile),
SidebarUserRecommendations, BroadcastQuery, AudioSpaceById (participants carry
a reduced user), useStoryTopicQuery (new typename AiTrend), grokAccountJwtQuery.
Typed from sandbox recordings plus the HAR bodies; placeholder entries use the
canonical sample values. The strict harness resolves placeholder keys
case-insensitively so lowercase operation names are exercised too.

831 stored responses at match rate exactly 1.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@fa0311
fa0311 changed the base branch from refactor/enum-policy to main October 17, 2026 17:28
@fa0311
fa0311 merged commit 82d12f1 into main Oct 17, 2026
@fa0311
fa0311 deleted the feat/har-ops-2026-10 branch October 17, 2026 17:28
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