Repository navigation
fix: keep the assistant.read scope for existing OAuth2 clients - #14200
Conversation
Removing the Assistant (#14167) also removed the assistant.read scope. OAuth2 clients registered while it existed, such as the ChatGPT app, still request project:assistant.read, and Cloud now rejects their authorization with invalid_scope. Bring the scope back as deprecated so it stays a known scope without granting anything.
|
Review complete. No blocking issues — approved ✅; 1 nitpick below. 🧹 Nitpicks (1) — 🟢 1 low
This is a one-file change restoring the retired
Reviewed commit: d655fd9 |
🔵 Tier A · Mergeable after minor fixes
Restores
Fix with agent prompt### Issue 1
app/config/scopes/project.php:428-432
**Add a regression test for accepting the restored scope**
Existing scope-list and project-key E2E tests never assert that `assistant.read` is known, so removing this entry again would leave them passing. Please add a real-API regression that accepts a key carrying this scope and verifies its deprecated status in the scope listing.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.📂 Walkthrough · 1
Reviewed |
| 'assistant.read' => [ | ||
| 'description' => 'Access to use Assistant service. This scope is deprecated, the Assistant service has been removed.', | ||
| 'category' => 'Other', | ||
| 'deprecated' => true, | ||
| ], |
There was a problem hiding this comment.
Add a regression test for accepting the restored scope
Existing scope-list and project-key E2E tests never assert that assistant.read is known, so removing this entry again would leave them passing. Please add a real-API regression that accepts a key carrying this scope and verifies its deprecated status in the scope listing.
Prompt To Fix With AI
This is a comment left during a code review.
Path: app/config/scopes/project.php
Line: 428-432
Comment:
**Add a regression test for accepting the restored scope**
Existing scope-list and project-key E2E tests never assert that `assistant.read` is known, so removing this entry again would leave them passing. Please add a real-API regression that accepts a key carrying this scope and verifies its deprecated status in the scope listing.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.🟡 Minor · testing · Reply if this doesn't apply.
Security rulesNo new WARNING or ERROR findings from security rules. 32 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
Keys, functions, sites and OAuth2 clients store scopes, and MCP hosts such as ChatGPT keep requesting the list they registered with. Removing assistant.read (appwrite#14167) broke those clients with invalid_scope until appwrite#14200 restored it. Record every shipped scope in app/config/scopes/lock.json and fail the unit suite when one disappears from the catalogs or a new one is not locked, so retiring a scope means deprecating it.
Removing the Assistant in #14167 also removed the
assistant.readscope. OAuth2 clients registered while it existed, such as the ChatGPT app, still requestproject:assistant.read, and Cloud now rejects their authorization withinvalid_scope - Scope 'project:assistant.read' is not supported.This brings the scope back as
deprecated, with a comment saying why. Deprecated scopes stay known (keys and OAuth2 requests carrying them stay valid) but are left out of defaults and grant nothing; the endpoint stays removed. V25 still strips it from stored keys, functions and sites.Cloud needs a matching allowlist entry in
app/config/scopes/oauth2.phponce this lands.Part of #14203