Loading
Forward access token in Orbit GraphQL status request context
What does this MR do and why?
!264924 (merged) added the token_type claim but wired it through the REST Orbit API only. GraphQL status queries still don't send the token type or the Duo Workflow source type to the Orbit server. This passes both through, as REST does, so they are correct if those calls start being recorded for analytics. Nothing user-visible changes today.
Related Issues
Related to gitlab-org/orbit/knowledge-graph#310 (closed)
Testing
Extended the Orbit namespace request spec: a PAT-authenticated query sends personal_access_token, a session-authenticated one sends none, and an ai_workflows OAuth token sends oauth_access_token with source type dws. The PAT and OAuth examples fail without the change.
Agent context
Resolvers::Analytics::Orbit::StatusResolvable#orbit_request_contextnow passesaccess_token: context[:access_token]toRequestContext.from_request, and theOauthAccessToken(when it is one) asoauth_access_token:toSourceType.for_orbit_request, mirroringAPI::Orbit::Data#orbit_request_context.GraphqlControlleralready setscontext[:access_token].- This is a consistency fix. The
token_typeclaim comes from !264924 (merged) and is analytics only. GKG records it onexecute_queryevents, and these status resolvers never callexecute_query. - Out of scope: the other
RequestContextsites (API::Orbit::McpHandlers::Base,Analytics::KnowledgeGraph::InfoService,Mcp::Tools::Orbit::CommandCatalog). - Specs run on a Caproni slot:
namespace_spec.rb102 examples, 0 failures (2 pending, existing). Rubocop clean. - Title carries
[skip ci], so no MR pipeline runs. Branch pipelines are not covered by it.
Edited by Dmitry Gruzd