Skip to content

Add advisory enforcement mode to Tier 1 reusable workflow - #431

Merged
rng1995 merged 14 commits into
NVIDIA:mainfrom
pt-bhavsar:fea-396-advisory-report-only-mode
Nov 13, 2026
Merged

rng1995 merged 14 commits into
NVIDIA:mainfrom
pt-bhavsar:fea-396-advisory-report-only-mode

Conversation

@pt-bhavsar

@pt-bhavsar pt-bhavsar commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add enforcement-mode: strict|advisory to the Tier 1 reusable workflow, defaulting to strict.

  • Validate the input before setup or image pulls.
  • Keep the Docker step blocking. Pass an explicit advisory flag to supporting scanner images; strict mode preserves the existing image invocation.
  • Only completed policy/score failures become non-blocking, after evidence validation and rendering. Failed verdicts and full reports remain intact, with a workflow warning.
  • Configuration errors, incomplete scanners, missing/malformed evidence, abnormal process exits and runtime failures still fail the job.
  • Document that the released 0.8.0 bundle does not accept this input and that advisory mode requires both supporting workflow and image pins.

Closes #396.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes
  • Ran make lint — passed
  • Ran make test — attempted; blocked during collection by 52 import errors for missing optional Harbor/provider dependencies (harbor, openai, anthropic, botocore, toml)
  • Ran make build — passed
  • Did not add credentials, private datasets, or proprietary benchmark content

Focused validation:

  • python -m pytest tests/ci/test_evaluate_workflow.py tests/ci/test_run_tier1.py tests/ci/test_image_build.py -q — 172 passed.
  • fern check — 0 errors, 1 warning.
  • git diff --check — passed.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Found two issues: advisory mode suppresses runtime failures as well as policy verdicts, and the onboarding example passes an unsupported input to the release-pinned workflow. Focused validation: tests/ci/test_evaluate_workflow.py passes (10 tests); reproduced a Docker startup failure with exit 125 and no retained reports using the actual scan shell.

Comment thread .github/workflows/evaluate-skills.yml Resolved
Comment thread docs/github-actions.mdx Resolved

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review of the advisory enforcement mode: 6 inline comments. The main concern is that continue-on-error in advisory mode also hides configuration and infrastructure failures, not just a failing verdict.

Comment thread .github/workflows/evaluate-skills.yml Resolved
Comment thread .github/workflows/evaluate-skills.yml Resolved
Comment thread .github/workflows/evaluate-skills.yml Resolved
Comment thread .github/workflows/evaluate-skills.yml Resolved
Comment thread tests/ci/test_evaluate_workflow.py Resolved
Comment thread .github/workflows/evaluate-skills.yml Resolved
@pt-bhavsar

Copy link
Copy Markdown
Contributor Author

@rng1995 Thanks for the advisory-mode update — the direction makes total sense.

I still see one gap that affects adoption: incomplete scan failures remain blocking and often don’t provide enough actionable detail for downstream users.

I resorted to run this diagnostic when scan was incomplete to understand where the exceptions were thrown for evaluated skills

- name: Re-run raw Skillspector for incomplete skill paths
        if: ${{ steps.collect-incomplete.outputs.has_incomplete == 'true' }}
        shell: bash
        run: |
          set -euo pipefail
          mkdir -p skillspector-diagnostics/raw
          docker pull "$TIER1_IMAGE"
          while IFS= read -r skill_path; do
            [[ -z "$skill_path" ]] && continue
            safe_name=$(echo "$skill_path" | tr '/ .' '___')
            docker run --rm \
              --entrypoint /opt/skillspector/bin/skillspector \
              --mount "type=bind,src=$GITHUB_WORKSPACE,dst=/workspace,readonly" \
              "$TIER1_IMAGE" scan "/workspace/$skill_path" --format json --no-llm \
              > "skillspector-diagnostics/raw/${safe_name}.json" \
              2> "skillspector-diagnostics/raw/${safe_name}.stderr.log" || true
          done < skillspector-diagnostics/incomplete-skill-paths.txt

Could we keep current fail/strictness but improve diagnostics for incomplete/runtime paths?

Some suggestions

  • Emit a clear workflow warning/error summary that includes:
    • failure class (policy_failed vs incomplete_scan vs runtime_failure vs evidence_invalid)
    • scanner/tool name when known
    • dominant reason (startup error, timeout, missing output, malformed JSON, etc.)
  • Write the same classification into summary.json so wrappers/my reusable workflow can surface it deterministically.
  • Ensure summary.md includes a short “Why this failed” section with remediation hints.

@chrisknvidia

Copy link
Copy Markdown
Collaborator

@pt-bhavsar thanks for this PR. Two things are needed before it can merge:

  1. DCO: commit d273ad8f ("Add advisory enforcement mode to Tier 1 reusable workflow") is missing a Signed-off-by trailer, so the required DCO check fails. The sign-off has to come from you as the author. Please sign off and force-push, for example:

    git fetch origin
    git rebase --signoff origin/main
    git push --force-with-lease
    

    See CONTRIBUTING.md for the DCO requirement.

  2. Merge conflicts: the branch now conflicts with main. Rebasing onto current main as above will also resolve this. Please keep Narendran's follow-up fix (4297ddcc) when you resolve the conflicts.

The Package check failure doesn't look related to your change. The wheel smoke test passes locally on this branch, and the check will re-run after you push.

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the work on this, and for the notes about incomplete scans. The earlier review points are all handled in the current head: the Docker step stays blocking, the mode is validated first, the downgrade only happens inside run_tier1.py after the reports are validated and rendered, and the new tests run the real shell steps and runner paths. Strict mode passes the same arguments to the image as before, and an older image rejects --enforcement-mode instead of ignoring it, so that fails closed.

What is left before this can merge:

  1. DCO: commit d273ad8 has no Signed-off-by line. git rebase --signoff origin/main && git push --force-with-lease fixes it and is also where you resolve the next point.
  2. CHANGELOG.md conflicts with main (both sides added bullets at the top of Unreleased > Added). Keep both. Main also reworked docs/github-actions.mdx, so please check where the advisory text lands after the rebase.
  3. The Package check failed in the wheel smoke-test step. This PR does not touch anything that goes into the wheel and the same step passed on other runs at the time, so it looks like a one-off. It should go green when CI runs again on the rebased branch; if not, let us know.
  4. Advisory mode and the hosted-report publisher: with a failing verdict the run now ends as success, but ci/publish_reports.py rejects a run whose conclusion is success when summary.json says overall_passed is false ("The workflow conclusion contradicts the report artifact verdict"). So an advisory run with a failing skill will not get a hosted report or PR comment. Either record the downgrade in summary.json and teach the publisher to accept that combination (with a test), or say in the docs that advisory mode does not publish hosted reports yet.

Smaller things, not blocking: add an enforcement-mode row to the input table in ci/README.md; finding annotations are still ::error in advisory mode, so you get red annotations on a green check; and the CHANGELOG bullet can drop the leading word 'Unreleased'.

On improving diagnostics for incomplete scans: that sounds useful, but it is separate from #396, which asks for those failures to stay blocking (and this PR keeps them blocking). A follow-up issue for a failure class in summary.json and a short 'why this failed' section would be a good home for it.

Comment thread ci/run_tier1.py Resolved
Comment thread ci/run_tier1.py Resolved
Comment thread docs/github-actions.mdx Resolved
Comment thread CHANGELOG.md Resolved
ptbhavsar and others added 2 commits November 11, 2026 11:42
Refs NVIDIA#396

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Prashant Bhavsar <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Prashant Bhavsar <[email protected]>
@pt-bhavsar
pt-bhavsar force-pushed the fea-396-advisory-report-only-mode branch from 4297ddc to f5922ee Compare November 11, 2026 18:46
Record advisory downgrade metadata in summary output, allow publisher success+failed only when marked as advisory downgrade, and add coverage for both accepted/rejected paths plus advisory warning annotations.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Prashant Bhavsar <[email protected]>

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-reviewed at 43cb1b6. The runtime-failure fix and the publisher change look right:

  • downgraded is set only when every row is passed/failed, has no incomplete_scans, exit code 0 or 1, and no error. Configuration errors, skipped selections and checkpoints always record downgraded: false.
  • validate_summary rejects malformed enforcement metadata and downgraded: true unless the verdict is failed and the mode is advisory. publish accepts a success conclusion only for that combination. A strict failure with a success conclusion is still rejected (test_publish_rejects_success_conclusion_without_advisory_downgrade).
  • Finding annotations are ::warning in advisory mode and ::error in strict mode.
  • Every commit has a DCO sign-off, and the branch is behind main but has no conflicts.

Checked locally: tests/ci/test_evaluate_workflow.py, test_run_tier1.py, test_publish_reports.py and test_image_build.py pass (418), and ruff check is clean.

Two small things:

  1. The docs paragraph about the hosted-report publisher is now out of date (inline).
  2. Nit: ruff format --check tests/ci/test_publish_reports.py wants to wrap the two long archive([...]) lines in the new advisory publisher tests. make lint doesn't run the formatter, so CI won't catch it, but the rest of the file is formatted.

Comment thread docs/github-actions.mdx Resolved
Update GitHub Actions docs to match advisory downgrade publication behavior and apply formatter wrapping in publisher tests.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Prashant Bhavsar <[email protected]>
@pt-bhavsar
pt-bhavsar force-pushed the fea-396-advisory-report-only-mode branch from a53d5b6 to d02cab3 Compare November 11, 2026 19:50

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-checked all eight earlier comments at ebea9ea against the workflow shell and the runner, and each one is addressed: enforcement-mode is validated before checkout, advisory mode no longer hides input or runner errors, strict mode fails in the scan step itself, the docs and onboarding example match the inputs, the new tests exercise the real step scripts, and the CHANGELOG entry sits under Unreleased. Approving.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you @pt-bhavsar for your contribution and for your patience throughout the review process. The advisory enforcement behavior and remaining documentation feedback are addressed, and the PR merges cleanly with main. Verified 418 focused workflow, runner, publisher and image tests, Ruff, and Fern documentation validation. Approved; auto-merge will remain subject to the required CI checks.

@rng1995
rng1995 enabled auto-merge (squash) November 13, 2026 07:30
@rng1995
rng1995 merged commit 91ecf1a into NVIDIA:main Nov 13, 2026
26 checks passed
@pt-bhavsar

Copy link
Copy Markdown
Contributor Author

Thank you @pt-bhavsar for your contribution and for your patience throughout the review process. The advisory enforcement behavior and remaining documentation feedback are addressed, and the PR merges cleanly with main. Verified 418 focused workflow, runner, publisher and image tests, Ruff, and Fern documentation validation. Approved; auto-merge will remain subject to the required CI checks.

Thank you @rng1995 and @chrisknvidia I appreciate your support.

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.

[FEA]: Add reusable-workflow input for advisory/report-only enforcement mode

4 participants