Revert "Merge branch '605887-fix-direct-access-400-on-saas' into 'master'"
What does this MR do and why?
Revert "Merge branch '605887-fix-direct-access-400-on-saas' into 'master'"
This reverts merge request !248253 (merged)
!248253 (merged) let POST /code_suggestions/direct_access succeed on GitLab.com, enabling the Language Server's direct-connection path to AI Gateway for code completions. That path never carries root_namespace_id (no per-request headers, JWT doesn't set it, AI Gateway drops unset params), and CustomersDot requires it for saas claims — so every direct-connection completion request 422'd as "Root namespace can't be blank."
Prod impact: saas/code_completions resolve calls went from ~28/20min to 9,759/20min after !248253 (merged) deployed; 9,734 of those had no root_namespace_id. ~2,339 users affected in one 30-min window.
Why it's safe to revert
Restores the unconditional 400 on /code_suggestions/direct_access, which just forces the Language Server back to its existing fallback: the indirect path through the monolith. Completions keep working, just without the direct-connection speed-up.
Follow-up
Re-land !248253 (merged)'s fix only once direct-access tokens can carry root_namespace_id through to the usage-quota check.
References
Incident #inc-12778-increased-rate-of-usage-billing-blocks-for-an-error-block-reason
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.