Skip to content

feat: log skip reason when detectors are skipped during scan#1845

Closed
Oxygen56 wants to merge 1 commit into
NVIDIA:mainfrom
Oxygen56:feat/detector-skip-reasons
Closed

feat: log skip reason when detectors are skipped during scan#1845
Oxygen56 wants to merge 1 commit into
NVIDIA:mainfrom
Oxygen56:feat/detector-skip-reasons

Conversation

@Oxygen56
Copy link
Copy Markdown

@Oxygen56 Oxygen56 commented Jun 6, 2026

What

Fixes #1061 — Detectors that skip probes now log their skip reason.

Problem

When skip=True, the harness silently continued. Users had no idea which detectors were skipped or why.

Fix

  1. Detector base: Added skip_reason attribute
  2. Harness: Logs at INFO level when a detector is skipped, including probe name and reason

Example

INFO: skipping detector always.Skip on probe test.Blank: disabled via config

Previously, when a detector had skip=True (e.g., AlwaysSkip detector),
the harness silently continued with no indication to the user about why
the detector was not run.

Changes:
- Add skip_reason attribute to Detector base class
- Log the reason at INFO level when a detector is skipped
- Default reason is 'disabled via config' when skip_reason is not set

Fixes NVIDIA#1061

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

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

This PR does not name sense, adding an attribute and never setting it does not provide a reason why the detector was skipped.

Using coding assistants to aid in contribution to this project is considered acceptable, this PR however includes changes that suggest the author has not reviewed the code before offering the revision.

@Oxygen56 Oxygen56 closed this Jun 6, 2026
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.

Include information about why detectors are skipped

2 participants