Conversation
Code Review: Add interactive login
|
8908deb to
6b05689
Compare
|
Claude finished @ramilamparo's task in 8m 37s —— View job Code Review: Add interactive login
The latest push ( Ran four specialized subagents against the full PR diff. No new noteworthy findings beyond what prior reviews have already raised. Five open items remain unaddressed but none are blocking:
Resolved 3 now-addressed bot threads, minimized 14 outdated bot review summaries, and deleted 1 progress-tracking comment. Submitted as APPROVE. |
There was a problem hiding this comment.
The latest push (9837ba6 — "Fixes") addresses three open items from prior reviews:
replace('-', '')→replaceAll('-', '')inauth.ts:69— multi-hyphen user codes now normalize correctlysourceLabelsnow includes entries forkeyringandcredentials.json(auth.ts:194-195)resolveAutherror output inresolvers.ts:152-174now usesconsole.errorinstead ofconsole.log
Ran four specialized subagents against the full PR diff. No new noteworthy findings beyond what prior reviews have already flagged. Five open items from prior reviews remain unaddressed but none are blocking:
oauth.ts:134—refreshAccessTokenomitsclient_id(consistency with other OAuth calls)browser.ts:15—cmd /c starton Windows interprets shell metacharacters (URLs are server-controlled, low practical risk)keyring.ts:22—loadKeyringModule()re-attempts dynamic import on every calloauth.ts— OAuth responses lack Zod runtime validation (inconsistent with API-layer conventions)auth-e2e.spec.ts— three test coverage gaps (default OAuth error branch, polling network error, keyring-backed refresh persistence,clearCredentialsfailure inhandleLogout)
LGTM.

Summary
Adds interactive
qasphere authcommands for login, logout, and status — replacing the need to manually manage API keys and environment variables.Login methods
Credential storage
Credentials are persisted in priority order:
@napi-rs/keyring) — preferred, used when the OS keyring daemon is available~/.config/qasphere/credentials.json) — restricted permissions (0600), used when keyring is unavailableCredential resolution
resolveCredentialSource()checks sources in priority order:QAS_TOKEN+QAS_URLenvironment variables.envfile in cwd~/.config/qasphere/credentials.json.qasphereclifile (searched up directory tree)Auth subcommands
qasphere auth loginqasphere auth statusqasphere auth logout