Skip to content

[ML-70358] [s] Name added user API scopes and the tools requiring them during deploy - #739

Draft
junchoi-db wants to merge 3 commits into
databricks:mainfrom
junchoi-db:fix/agentbricks-cuj-scope-report
Draft

junchoi-db wants to merge 3 commits into
databricks:mainfrom
junchoi-db:fix/agentbricks-cuj-scope-report

Conversation

@junchoi-db

@junchoi-db junchoi-db commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Adding a user-auth web-search tool implicitly requires ai-gateway, but the bug bash saw only a generic scope-change warning. Deploy now names added scopes and the tool or explicit manifest entry requiring each one. The same explanation appears when preflight stops an existing App before --allow-user-scope-update is granted. Redeploys with existing scopes report them as unchanged and avoid a re-consent warning.

Scope inference remains shared with the existing planner, including UC functions, Genie, and sandbox policy scopes. The CLI reference distinguishes API scopes from Unity Catalog data privileges. This change does not grant additional permissions or alter scope-update consent.

Design doc: n/a (customer journey feedback).

Proof of work

82 targeted deploy/auth tests passed. New regression cases cover the previously missed existing-App permission error for web search, UC functions, sandbox volume access, and explicit [auth.user].additional_api_scopes. They verify the missing scope and binding are named before any App create/update call.

For example, a user-auth sandbox volume binding reports files and its system.ai.sandbox binding, while preserving an unrelated existing sql scope. Read-only managed-tool discovery also completed successfully.

Live deployment and unchanged-scope redeployment remain blocked before mutation by the execution environment's approval gate. They are not claimed as completed E2E.

A controlled local existing-App SDK stub also exercised the actual preflight path: it named ai-gateway, files, mcp.functions, and workspace.workspace with the requiring bindings, and recorded zero App create/update calls. This is a local contract check, not a live deployment.

Tested commit: aa558cd922e9c0ba3fa4fd7b367c3427391f471f.

Validation

82 tests passed; JUnit verified. Ruff formatting/lint and targeted type checks passed. Tests cover added and unchanged scopes, user versus App bindings, and explicit manifest sources.

CI remains blocked by six pre-existing ordering assertions in template_langgraph_history_test.py:240. The same assertions fail on base commit a8d55f4074f4d58b979f8fe9cd22058936eba779: https://github.com/databricks/databricks-ai-bridge/actions/runs/38662891535. This PR remains a draft.

This pull request and its description were written by Isaac.

@jamesbxwu jamesbxwu changed the title Name added user API scopes and the tools requiring them during deploy [ML-70358] Name added user API scopes and the tools requiring them during deploy Oct 15, 2026
@jamesbxwu jamesbxwu changed the title [ML-70358] Name added user API scopes and the tools requiring them during deploy [ML-70358] [s] Name added user API scopes and the tools requiring them during deploy Oct 15, 2026

This branch has not been deployed

No deployments
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