Repository navigation
Read the health-check token from the keychain like the CLI does. - #322
Merged
Merged
Conversation
`vp run health` still read the token from `~/.void/config.json`, but `void auth login` now stores it in the system keychain, so the check failed on a machine that had just logged in. The script now resolves the token in the same order as `getToken()` in the CLI: `VOID_TOKEN`, then the keychain (`dev.void.cli` / `token` or `stagingToken`), then the config file. It only reads; the CLI owns the file-to-keychain migration. The keyring addon is imported lazily so a missing native binary falls through to the env or file token instead of aborting the script. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WNXbwieSdsSErZwQ7HWRwG
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_bec565ee-42ab-495a-b39f-89ec212d176f) |
Codex Review SummaryThis 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. |
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.
What
vp run health/vp run health:stagingfailed aftervoid auth login: the CLI stores the token in the system keychain now, and the script only read~/.void/config.json.The script now resolves the token in the same order as
getToken()inpackages/void/src/cli/auth.ts:It only reads. The CLI still owns the file-to-keychain migration.
@napi-rs/keyringis added to the api package as a devDependency at2.0.0, the version the CLI pins. The addon is imported lazily, so a missing native binary falls through to the env or file token instead of aborting the script.Verified
Health check: PRODUCTION, 4 passed 0 failedVOID_TOKEN=invalid/projectsreturns 401VOID_TOKENsetvp fmt --check,vp run lint:platform🤖 Generated with Claude Code
https://claude.ai/code/session_01WNXbwieSdsSErZwQ7HWRwG
Note
Low Risk
Dev-only health script and dependency change; no production API or auth server behavior is modified.
Overview
Fixes
vp run health/ health:staging aftervoid auth loginwhen tokens live only in the system keychain instead of~/.void/config.json.The platform API health script now resolves credentials in the same order as CLI
getToken():VOID_TOKEN→ keychain (dev.void.cli/tokenorstagingToken) →~/.void/config.json. It only reads from the keychain (no file migration).@napi-rs/keyring2.0.0 is added as a devDependency on@voidcloud/api; the module is lazy-imported so missing native binaries in CI/Docker still allow env or file fallbacks. Error text and usage docs now mentionVOID_TOKENandvoid auth login.Reviewed by Cursor Bugbot for commit 149e71e. Bugbot is set up for automated code reviews on this repo. Configure here.