Skip to content

[INS-473] Add wit detector to defaults.go, gate it behind feat flag and update verification logic#5008

Merged
MuneebUllahKhan222 merged 3 commits into
mainfrom
wit-detector
Jun 9, 2026
Merged

[INS-473] Add wit detector to defaults.go, gate it behind feat flag and update verification logic#5008
MuneebUllahKhan222 merged 3 commits into
mainfrom
wit-detector

Conversation

@MuneebUllahKhan222

@MuneebUllahKhan222 MuneebUllahKhan222 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description:

This PR adds the Wit detector to defaults.go and gates it behind the appropriate feature flag.

Additionally, the PR updates the detector verification logic to align with the latest API behavior and validation requirements.

Corpora Test:

The detector does not appear in the list.
image

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Note

Medium Risk
Turns on a new default-scan detector (flag on in OSS) and changes live Wit.ai verification behavior, which can shift verified/unverified results and external API traffic during scans.

Overview
Registers the Wit.ai detector in the default engine list and rolls it out behind WitDetectorEnabled, which OSS enables by default in main.go alongside other gated detectors. defaults_test treats Wit as feature-flag gated instead of “never wired up.”

The Wit scanner itself is tightened up: deduped regex matches, verification moved to verifyWitKey against GET /apps (replacing the old /message probe), explicit 200 vs 401/403 handling with SetVerificationError, and response body drain on close. Integration tests now use go-cmp with ignored result fields.

Reviewed by Cursor Bugbot for commit 9fd3359. Bugbot is set up for automated code reviews on this repo. Configure here.

@MuneebUllahKhan222 MuneebUllahKhan222 requested a review from a team June 2, 2026 11:30
@MuneebUllahKhan222 MuneebUllahKhan222 requested review from a team as code owners June 2, 2026 11:30
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

Corpora Test Results

No detector regex or keyword changes in this PR. Bench skipped.

Comment thread pkg/engine/defaults/defaults.go Outdated
@MuneebUllahKhan222 MuneebUllahKhan222 merged commit 133cb39 into main Jun 9, 2026
16 checks passed
@MuneebUllahKhan222 MuneebUllahKhan222 deleted the wit-detector branch June 9, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants