Repository navigation
Select text detectors before scanning - #47
Merged
Merged
Conversation
sidmohan0
marked this pull request as ready for review
October 8, 2026 15:47
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Text scans run every enabled detector even when callers only want certain entity types. MCP filters findings afterward, so unwanted matches still consume time and memory. See DataFog/datafog-mcp#59.
Solution
entitiesselection to text scans and skip unselected detectors before matching.Validation: Rust format, workspace/all-features Clippy, and 122 tests pass (one existing benchmark ignored). Python installed-wheel/typing, Node package/TypeScript, and WASM browser/TypeScript checks pass. Node validation used host Node 25; CI should confirm the declared Node 24 environment.
Five fresh-process runs per case on Mac arm64/Python 3.11, using 10 MB synthetic log fixtures from #59:
The control's 271,710 unrequested findings disappear; the mixed case returns the 9,999 planted selected findings. Candidate scans with selection omitted retain the published counts and similar performance. These are Core-only measurements, not end-to-end MCP/model benchmarks.
Closes #46. Downstream MCP integration is tracked in DataFog/datafog-mcp#63. No package version or release is changed; MCP adoption requires a subsequent Core release.
Draft MCP implementation: DataFog/datafog-mcp#65.