Repository navigation
fix(tier2): report a chat-model refusal as an advisory dedup finding - #281
Merged
Merged
Conversation
Some chat models refuse to classify security-themed skill content. Tier 2 treated that refusal like any other LLM failure: the cluster counted as failed, the scan was marked incomplete, and validate failed under the default --block-on-dedup. The same model usually refuses again on a rerun, so these skills could not pass Tier 2 without switching models or turning off dedup gating altogether. A refusal is no evidence of duplicated content. Context deduplication now reports a refused cluster as a MEDIUM CONTENT_DEDUP/llm_refused finding that names the overlapping sections, and counts it in the JSON report's llm_analysis.clusters_refused. Other chat-LLM failures still leave the scan incomplete. A policy overlay can raise CONTENT_DEDUP.llm_refused to keep refusals blocking. The console Tier 2 summary no longer presents an advisory refusal as the reason a result failed. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
requested review from
chrisknvidia,
mosheabr and
rmalani-nv
as code owners
October 30, 2026 18:57
chrisknvidia
force-pushed
the
naren/port-tier2-refusal-advisory
branch
from
October 30, 2026 22:24
4a97ff6 to
a823c5a
Compare
rng1995
commented
Nov 1, 2026
rng1995
left a comment
Collaborator
Author
There was a problem hiding this comment.
Reviewed the validator, console summary, docs and CHANGELOG. A refusal no longer marks the scan incomplete, other chat failures still do, duplicates beside a refusal stay blocking, the policy override path is covered, and the real-CLI test confirms no retry and no provider text leaking into reports. ruff is clean and the dedup, command and reporting suites pass locally. No findings.
Reviewed with Claude Code.
Resolve Tier 2 documentation conflicts by retaining the work-limit failure guidance alongside advisory model refusals. Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
enabled auto-merge (squash)
November 2, 2026 18:28
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 2, 2026
Clean merge of the newer main (#281, #271, #293); CHANGELOG.md and docs/agents-and-sandboxes.mdx auto-merged with no conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 6, 2026
* docs(changelog): move entries released in 0.7.0-0.7.2 out of Unreleased 0.7.0 (#314) and 0.7.1 (#327) never cut their sections on main, and 0.7.2 (#335) added its section below the whole Unreleased block, so Unreleased still listed work that had already shipped. Place each Unreleased entry under the release that shipped the PR that added it: - 0.7.0: the published section from the 0.7.0 tag, verbatim. It already holds the six entries that main had filed under 0.6.0, so 0.6.0 again matches the v0.6.0 tag, including the original run_config.json entry. - 0.7.1: #264 #271 #274 #281 #284 #289 #293 #299 #316 #317 #318 #323 #324 #326 #327, plus the #320 wording of the Windows Git-root entry, since #320 changed that 0.7.0 fix in 0.7.1. - 0.7.2: #263 #265 #269 #270 #276 #279 #287 #290 #296 #309 #328 #330 merged with the existing #335 entries. Only post-v0.7.2 entries stay under Unreleased, with one heading per subsection. Entry text is unchanged, apart from the published tag wording in 0.7.0 and 0.6.0. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(release): prepare v0.8.0 Set the package, fallback, lock, citation and developer-guide versions to 0.8.0 and move every entry merged since v0.7.2 under '## 0.8.0 - 2026-11-05', leaving Unreleased empty. The refusal-fallback documentation test now reads the release section that names CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK, requires it to be 0.8.0, and requires exactly one entry there to name the switch. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(release): pin the verified 0.8.0 Tier 1 image and add its CI bundle Pin onboarding to the Tier 1 image published by the reviewed main revision 55d2d04 in "Build and publish Tier 1 image" run 42158955180: ghcr.io/nvidia/skillevaluator-tier1@sha256:9d5483243918937be4f2178f74cf7c622a531dee41e3176906994d52fa14950a (config sha256:d17d6f5105ec5f1bf0cbe4dff0d693aae4ecf01e9c1c6a6ddb7830518acace33). The workflow and publisher refs both move to 55d2d04. ci/bundles/0.8.0 mirrors the 0.7.2 bundle. The templates, README and release.json are the run's github-actions-onboarding artifact and match ci/render_templates.py output for these pins byte for byte. The scanner inventory and verification receipt come from the build's runtime-stage version step, the five-case smoke receipt, the onboarding job's anonymous pull, and the public manifest, whose config digest equals the smoke-tested image ID. The ZIP uses the 0.7.2 layout (sorted members, inner checksums, 1980 timestamps, 0644, deflate level 9) and rebuilds to identical bytes. Point the current-bundle links at 0.8.0 and list 0.7.2 as historical. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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
When the chat LLM declines to classify a Tier 2 content cluster (a safety refusal), Tier 2 now reports an advisory MEDIUM finding instead of marking the scan incomplete.
IntraSkillValidatorcatchesLLMClientRefusedErrorseparately from other LLM failures. A refused cluster adds aCONTENT_DEDUP/llm_refusedfinding at MEDIUM severity.DUPLICATEfinding.source_filesand the sanitized provider/model labels.--llm-modelorSKILL_EVAL_LLM_MODEL).llm_analysisin the JSON report gainsclusters_refused.clusters_completednow counts clusters that returned a verdict, so completed + refused + failed = total.deduplication-llm) and blocks, as before. A refusal next to such a failure does not hide it.docs/tier2-deduplication.mdx) and a CHANGELOG entry under Unreleased / Fixed.Why
Some chat models refuse security-themed skill content, for example a skill about penetration testing or malware triage. Before this change the refusal surfaced as a failed cluster, so Tier 2 marked the scan incomplete. Under the default
--block-on-dedup,validatethen failed, and thetier2/context-optimization-checkcommands exited non-zero.Retrying usually does not help, because the same model refuses the same content again. The only workarounds were switching models or passing
--no-block-on-dedup, which also stops realDUPLICATEfindings from gating.A refusal is not evidence of duplicated content. Tier 2 deduplication measures context bloat, not safety, so letting a refusal block the skill gave no protection and made Tier 2 unusable for these skills. The finding keeps the refused overlap visible in every report. Teams that want refusals to block can raise
CONTENT_DEDUP.llm_refusedtohighin avalidate --policyoverlay.Kept from public
_checked_contentalready raisesLLMClientRefusedErrorforcontent_filter/refusalstop reasons and for an OpenAImessage.refusal. An empty reply staysEmptyLLMResponseError, a failure, and is not treated as a refusal. This change only adds a branch for that existing type.llm_failure_diagnosticerrors,safe_llm_labels, and "never log raw bodies" are unchanged. The refusal finding and log line use only the sanitized provider/model labels and never the provider's text. The end-to-end test checks that partial reply content from a content-filtered response stays out of the console, JSON and HTML output.apply_policypath, so the policy overlay mechanism can raise the refusal.Tests
Without the source change, all six new tests fail. With it, they pass.
tests/deduplication/intra_skill/test_intra_skill_validator.py:test_llm_refusal_is_an_advisory_finding: one refused cluster gives a passing, complete result with one MEDIUMllm_refusedfinding. Checks location, message, suggestion,llm_analysiscounts (0 completed / 1 refused / 0 failed) and that the refusal text is not echoed.test_llm_refusal_beside_a_failed_cluster_keeps_the_scan_incomplete: refusal plus a provider failure staysincomplete(deduplication-llm), with counts 0 / 1 / 1.test_llm_refusal_beside_a_duplicate_keeps_the_duplicate_blocking: refusal plus a HIGHDUPLICATEstaysfailed, not incomplete. Also covers the cross-file message.test_policy_can_make_an_llm_refusal_blocking:CONTENT_DEDUP.llm_refused: highfails the result.tests/test_tier2_command_failures.py::test_chat_refusal_is_advisory_in_real_cli_and_reports: runs the realtier2CLI with the OpenAI SDK against a loopback server whose chat endpoint returnsfinish_reason: content_filter. It checks:overall_status: passedllm_refusedfindings andclusters_refused == 2tests/test_commands.py::test_summarize_tier2_does_not_blame_an_advisory_llm_refusal: covers the console summary for incomplete, policy-escalated and advisory-only results.main:tests/deduplication,tests/test_tier2_command_failures.py,tests/test_commands.py,tests/reportingandtests/inference(1,708 passed), and the full suite. Ranruff checkon the changed Python files andscripts/check_oss_boundary.py.ruff format --checkreports no change in the lines this PR adds.test_nvidia_build_bridge.pyslow-drip test failed once under load and passed when rerun alone. Two groups of tests also fail on unmodifiedmainon this host: the twosidecar_retains_*tests, because of host environment variables, and the generated custom-only grader tests intests/tier3/test_judge_failure_artifacts.py, because the host'spython3is 3.9.🤖 Generated with Claude Code