Improve audit detector precision#1059
Open
nadaverell wants to merge 1 commit into
Open
Conversation
efda567 to
1299378
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1299378. Configure here.
1299378 to
a314176
Compare
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.

Summary
Improves audit detector precision for noisy real-cluster findings so Radar separates broken dependencies from benign infrastructure endpoints and scheduler/status noise. Operators should see fewer false positives while genuinely risky missing admission webhook backends and workload blockers remain visible.
Linear: SKY-1091
What changed
failurePolicy: absent/default/explicitFailreports as critical, explicitIgnorereports as warning, and multiple webhooks that share the same missing backend Service collapse into one issue using the worst severity and stable ordering/fingerprints.host:6443values, while still reporting normal Service-shaped values.BoundPVC, so pending PVCs stay classified as storage provisioning problems instead of volume-conflict alerts.Testing
go test ./internal/k8s -run 'TestDetectMissingWebhookRefs|TestDetectProblems_ConfigSignals|TestFindEnvServiceRefChecks_SplitHostPort|TestDescribeUnschedulable_DropsDRADeallocateJargon|TestDetectProblems_SharedRWOVolume'go test ./internal/k8smake tscmake testmake buildLive/API checks:
kind-radar-gitops-demo: Radar connected, CRD discovery ready, and the detector-focused issue filter returned zero webhook backend, kindnet, DRA-jargon, or ReadWriteOnce false positives.Failwebhook and one aggregated warning for threeIgnoreDatadog webhooks sharing the same missing backend Service.radar-test-nonprod: Radar connected to a 2-node EKS cluster with webhook resources synced; the same detector-focused issue filter returned zero matching issues.us-east-1-nonprod: not live-verified because the local AWS SSO session expired before the cluster request reached Kubernetes.Visual-test: skipped, because this is backend detector and diagnosis-copy logic with no rendered UI component changes.
Notes / risk
Blast radius is limited to audit issue generation for admission webhook backends, config/env Service reference detection, scheduler unschedulable copy, and RWO volume-conflict classification. The main residual risks are over-suppressing a genuinely missing Service whose host exactly matches a node name/address, or failing to suppress node endpoints when Nodes cannot be listed; both affect issue visibility only, not cluster mutation. Unit tests and live checks against kind, GKE, and EKS clusters cover the intended scenarios.