Skip to content

fix: apply duo context exclusion to search tools

What does this merge request do and why?

Apply Duo Context Exclusion to search results for the Duo agent when searching for files

How to set up and validate locally

  1. Enable :use_duo_context_exclusion feature flag on your gitlab instance (Feature.enable(:use_duo_context_exclusion))
  2. Set up Duo Context Exclusion rules for a project under Project Settings >> Gitlab Duo >> Duo context exclusions (e.g. "README.md")
  3. Checkout that project and open it in VS Code
  4. Ask agentic chat to search for something in the contents of README.md
  5. It should not find your search term in the contents of README.md

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
  • If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.

Resolves gitlab-org/gitlab#574598 (closed)

Edited by Allen Cook

Merge request reports

Loading