Repository navigation
fix(auth): request assistant access by default - #997
Conversation
b8ff557 to
9a940f9
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efcfc5a6f5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
More details
The added assistant_access scope follows the existing OAuth flow while preserving read-only defaults and explicit overrides. Existing users must log in again to receive the new grant.
🤖 Bits Code Review · Commit efcfc5a
TL;DR
Request
assistant_accessin Pup's default OAuth login scopes as a prerequisite for packaging Bits CLI with Pup and letting Bits CLI reuse Pup's authentication.Motivation
The planned integration packages Bits CLI with Pup and reuses the user's Pup login to authenticate Bits CLI requests to the Assistant API. That API requires
assistant_access. Including it in the default grant means users can authenticate throughpup auth loginwithout needing to know about or manually add--extra-scopes assistant_access.This PR supplies the required scope; packaging, launching Bits CLI, and the authentication handoff will be handled separately.
Behavior
Adds
assistant_accessunder aBits CLIsection in the existing default scope list, between BITS and Cases. Normal login passes this list through the existing OAuth authorization flow. Existing users must log in again to grant the added scope; refreshing an existing token does not expand its grant.Read-only defaults remain unchanged. Explicit
--scopesand configured scope lists retain their existing precedence, and--extra-scopescontinues to append and deduplicate scopes. This change only requests the permission; it does not add a Bits launcher or change command routing, credential storage, or refresh behavior.Validation
cargo fmt --check: passed.cargo clippy --locked --all-targets -- -D warnings: passed.cargo test --locked -- --test-threads=1: 2,517 tests passed, zero failures. UsedDD_TOKEN_STORAGE=fileand a temporaryPUP_CONFIG_DIRto isolate tests from macOS Keychain credentials. Debug symbols and incremental compilation were disabled to reduce local disk use.--extra-scopes assistant_accessand Assistant API requests previously succeeded for the tested site/org. A fresh live login with this build and cross-site compatibility were not tested.cargo audit: reports 15 vulnerabilities and 19 warnings in the existing upstream dependency set.Cargo.tomlandCargo.lockare identical to the base branch; this PR introduces no dependency changes.Documentation and tests
No documentation files are changed, per the requested minimal scope. The operational requirement is to log in again to receive the new grant. Existing tests exercise default and read-only scope selection, explicit overrides, extra-scope deduplication, and subset invariants; no new command or error path is introduced.
LoC breakdown
Counts are added/deleted lines.