Repository navigation
fix(app): always send --remove-scopes when the live grant is unknown - #89
Merged
Merged
Conversation
When the live grant read failed or timed out, the request printout said "Removing nothing" and the outcome showed `removed: none`, so an explicit --remove-scopes list looked dropped. The request body does carry it (the approval page re-reads the live grant and honors removals), but nothing said so. - Keep the explicit list on every grant-union plan (`removeScopes`) and report it in --json/outcome data. - Print "Removing (if shared) <list>" when the live grant was not read. - Raise the live grant read timeout from 5s to 10s and retry once. - Tests for timeout, gateway failure, owner unknown and --no-merge-grant paths, plus the retry behavior. Claude-Session: https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 8, 2026
## [0.40.1](v0.40.0...v0.40.1) (2026-10-08) ### Bug Fixes * **app:** always send --remove-scopes when the live grant is unknown ([#89](#89)) ([aaeb754](aaeb754))
Contributor
|
🎉 This PR is included in version 0.40.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
vana app request --scopes github.starred --remove-scopes github.profile --owner 0x...with a live grant read that timed out printedRemoving nothingand the outcome showedremoved: none. The explicit removal list looked dropped.What actually happened on the wire: the CLI still passed
removeScopesto the SDK controller, and the SDK sends it in the request body on every grant-union status (merged, owner_unknown, unavailable, disabled). So the approval page, which re-reads the live grant, would have honored the removal. The bug was that the CLI threw the list away in its own plan, so the printout and the--jsondata said nothing would be removed.Change
GrantUnionPlannow always carries the explicitremoveScopeslist, whatever the live grant read found, and the request is created from it.--json) gainsremoveScopes.removedkeeps its meaning: live grant entries actually removed, which is only known after a successful read.Removing (if shared) github.profileinstead ofRemoving nothing.SDK checked:
createDirectDataController().createAccessRequestkeepsremoveScopesin the body onowner_unknownandunavailable, so no SDK change is needed.Tests
New cases in
test/cli/app-request.test.tswith fakes:--owner: retried once, request body and stored request carryremoveScopes, printout showsRemoving (if shared), neverRemoving nothing--jsondata hasremoved: []andremoveScopes: [...]--no-merge-grant:removeScopesstill sentplanGrantUnionretries a hung read once and merges the second answer; two hung reads giveunavailablewith the removals keptpnpm validategreen (60 test files) with HOME and VANA_HOME in temp dirs.https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j