Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

find a minor bug, fix it, you don't have to build and run, just find ...#3

Closed
ningcui-compass wants to merge 2 commits into
main from
harness/goldenWorkflow-1781544457518
Closed

find a minor bug, fix it, you don't have to build and run, just find ... #3
ningcui-compass wants to merge 2 commits into
main from
harness/goldenWorkflow-1781544457518

Conversation

@ningcui-compass

@ningcui-compass ningcui-compass commented Jun 15, 2026

Copy link
Copy Markdown

Summary

What we're building and why

Gemini CLI is an open-source TypeScript/Node.js CLI tool that provides terminal-first access to Google's Gemini AI models. It's structured as a monorepo with packages for the CLI frontend (packages/cli, React/Ink), backend core (packages/core), and supporting packages.

We found a minor bug in the OAuth2 authentication flow: a missing return statement after a promise reject() in an HTTP request handler, causing fall-through execution on invalid requests.

Architectural context

  • Language/Runtime: TypeScript on Node.js ≥20
  • Testing: Vitest
  • Build: esbuild, npm workspaces
  • The affected file (packages/core/src/code_assist/oauth2.ts) implements Google OAuth2 authentication. It spins up a local HTTP server to receive the OAuth callback redirect. The server's request handler is inside a new Promise constructor, using resolve/reject to signal auth completion.
  • Convention: The codebase uses early-return guard clauses extensively elsewhere. This one was simply missed.
  • No build/run required per the task instructions — this is a one-line fix with obvious correctness.

Chunks

# Summary Status Confidence Attempts
1 Add missing return after promise rejection in OAuth callback handler to prevent fall-through execution completed high 1

Advisories

  • packages/core/src/code_assist/oauth2.ts: The two reject() calls at lines 504-508 (qs.get('error') branch) and 512-516 (state mismatch branch) also lack return after reject(). They are safe today because they sit in an if/else if/else chain with no code after reject() within each block. However, they are inconsistent with the style of the fix applied here. Adding return after those reject() calls too would make the handler uniformly defensive against future edits that might add code after a branch. This is minor and not blocking.

Metrics

  • Total cost: 4ドル.97
  • Total duration: 8.6 min
  • Files changed: 2
  • Commits: 2
  • Activities (agent turns): 279
  • Chunks processed: 1
  • Success rate: 100%

Generated by temporal-harness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /