Skip to content

test(acp): add missing coverage for extensions command error paths#25313

Merged
scidomino merged 2 commits intogoogle-gemini:mainfrom
sahilkirad:sahil-22934-acp-error-path-tests
Apr 30, 2026
Merged

test(acp): add missing coverage for extensions command error paths#25313
scidomino merged 2 commits intogoogle-gemini:mainfrom
sahilkirad:sahil-22934-acp-error-path-tests

Conversation

@sahilkirad
Copy link
Copy Markdown
Contributor

Summary

Adds missing ACP test coverage for extension command error paths in disable/uninstall flows.

Details

  • Added packages/cli/src/acp/commands/extensions.test.ts
  • Added explicit tests for:
    • returns error when disabling fails
    • returns error when uninstalling a non-existent extension
  • Each test asserts exact command response format, including extension name and propagated error message.

Why

DisableExtensionCommand and UninstallExtensionCommand already handle these failures, but explicit tests were missing for regression protection of user-facing output.

Testing

  • Passed:
    • npm run test --workspace @google/gemini-cli -- src/acp/commands/extensions.test.ts
  • Also validated with:
    • npx vitest run src/acp/commands/extensions.test.ts
  • Note: full npm run preflight on Windows hit yamllint command parsing issue in scripts/lint.js (grep/xargs pipeline), unrelated to this change.

Related issues

Related to #22934

@sahilkirad sahilkirad requested a review from a team as a code owner April 13, 2026 18:03
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces comprehensive test coverage for error handling within the ACP extension management commands. By explicitly testing failure states for disabling and uninstalling extensions, the changes ensure that the CLI provides consistent and accurate error feedback to users, preventing potential regressions in command output.

Highlights

  • Test Coverage: Added new test suite for ACP extension command error paths to ensure robust regression protection.
  • Error Handling Validation: Implemented explicit assertions for error scenarios in disable and uninstall extension flows, verifying correct user-facing output.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new test file, packages/cli/src/acp/commands/extensions.test.ts, which focuses on verifying the error handling logic for the DisableExtensionCommand and UninstallExtensionCommand. The tests mock the ExtensionManager and core error utility to ensure that failed operations return the correct error messages. I have no feedback to provide.

@gemini-cli gemini-cli Bot added area/extensions Issues related to Gemini CLI extensions capability help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Apr 13, 2026
@scidomino scidomino enabled auto-merge April 30, 2026 20:29
@scidomino scidomino added this pull request to the merge queue Apr 30, 2026
Merged via the queue into google-gemini:main with commit a03ec92 Apr 30, 2026
27 checks passed
@sahilkirad
Copy link
Copy Markdown
Contributor Author

sahilkirad commented May 1, 2026

Thank you sir for merging the PR, i have also raised PR #26312 and waiting for its approval
image

TirthNaik-99 pushed a commit to TirthNaik-99/gemini-cli that referenced this pull request May 4, 2026
kimjune01 pushed a commit to kimjune01/gemini-cli-claude that referenced this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extensions Issues related to Gemini CLI extensions capability help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants