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

Appearance settings

Conversation

himanshusinghs
Copy link
Collaborator

Proposed changes

Adds a drop-index tool categorised under delete operation and marked as one requiring elicitation.

  1. The tool has been marked to require user confirmation before execution.
  2. Tests are added to confirm the negative and positive behaviour

Checklist

@himanshusinghs himanshusinghs requested a review from a team as a code owner October 13, 2025 16:38
@Copilot Copilot AI review requested due to automatic review settings October 13, 2025 16:38
@himanshusinghs himanshusinghs added the no-title-validation Add this label to disable the title check for this PR. label Oct 13, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Introduces a new drop-index tool for MongoDB that allows users to drop regular indexes from collections, categorized as a delete operation requiring user confirmation.

  • Adds a new MongoDB tool for dropping indexes with proper validation and elicitation
  • Implements comprehensive integration tests covering success and error scenarios
  • Configures the tool to require user confirmation before execution

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/tools/mongodb/delete/dropIndex.ts New tool implementation for dropping MongoDB indexes
src/tools/mongodb/tools.ts Registers the new DropIndexTool in the MongoDB tools array
src/common/config.ts Adds drop-index to the list of tools requiring confirmation
tests/integration/tools/mongodb/delete/dropIndex.test.ts Comprehensive integration tests for the drop-index functionality

Copy link
Contributor

📊 Accuracy Test Results

📈 Summary

Metric Value
Commit SHA 93962c13247de6bda1f580361300d30d22734c1d
Run ID 129d6b65-4558-440f-938b-c91a19599aab
Status done
Total Prompts Evaluated 70
Models Tested 1
Average Accuracy 88.2%
Responses with 0% Accuracy 7
Responses with 75% Accuracy 5
Responses with 100% Accuracy 58

📊 Baseline Comparison

Metric Value
Baseline Commit 83f34b1ad4973f46673857f8b9746cc928debcbe
Baseline Run ID db35418a-98df-4bf8-b655-2e0f2aea79a6
Baseline Run Status done
Responses Improved 1
Responses Regressed 4

📎 Download Full HTML Report - Look for the accuracy-test-summary artifact for detailed results.

Report generated on: 10/13/2025, 9:16:41 PM

protected description = "Drop an index for the provided database and collection.";
protected argsShape = {
...DbOperationArgs,
indexName: CommonArgs.string().nonempty().describe("The name of the index to be dropped."),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't seem right - index names can be unicode:

Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Interesting. Just noticed that rest of the tools don't enforce these checks. I do wonder though how practical are such index names?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the unicode check

src/tools/mongodb/delete/dropIndex.ts Outdated Show resolved Hide resolved
tests/integration/tools/mongodb/delete/dropIndex.test.ts Outdated Show resolved Hide resolved
tests/integration/tools/mongodb/delete/dropIndex.test.ts Outdated Show resolved Hide resolved
1. The tool has been marked to require user confirmation before
   execution.
2. Tests are added to confirm the negative and positive behaviour
@himanshusinghs himanshusinghs enabled auto-merge (squash) October 14, 2025 09:42
@himanshusinghs himanshusinghs merged commit 7e80114 into main Oct 14, 2025
16 checks passed
@himanshusinghs himanshusinghs deleted the feat/drop-index-tool branch October 14, 2025 09:48
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 18492324576

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 40 of 40 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 82.287%

Totals Coverage Status
Change from base Build 18478241913: 0.07%
Covered Lines: 5665
Relevant Lines: 6756

💛 - Coveralls

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

Labels

accuracy-tests no-title-validation Add this label to disable the title check for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.