Repository navigation
fix(security): explain SkillSpector LLM provider outages as retriable incomplete scans - #342
Merged
Merged
Conversation
When the --llm SkillSpector stage fails only because the LLM provider kept failing after SkillSpector's bounded retries, report a fixed, retriable message instead of the redacted unexpected-exit-code or execution_successful=false error. The report is checked on the exit 2 path first and on the execution_successful=false path as a fallback. A strict classifier requires SkillSpector 2.11.2+, only fatal llm_connection_retries_exhausted rows on LLM analyzers (plus the run-level semantic_runtime_incomplete row on SKILL.md), matching failed analyzer statuses and explained limitations, and no error or truncation markers. Anything else keeps the generic error. Gating is unchanged: the stage stays INCOMPLETE and static findings still decide FAILED. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add a Tier 1 troubleshooting entry for the provider outage message and an Unreleased > Fixed CHANGELOG entry. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
commented
Nov 5, 2026
rng1995
left a comment
Collaborator
Author
There was a problem hiding this comment.
Automated review: 2 findings (0 P1, 0 P2, 2 P3); 2 posted inline.
Five more report changes must keep the generic error: - a provider row names an analyzer that has no status entry - the completeness status is partial instead of failed - the completeness says is_complete=true - a provider row has a blank path - a provider row message is longer than the 4096-character bound Removing the matching guard from the classifier now fails each case on both exit 2 and exit 0. Before, the existing cases passed with any one of these guards removed. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
SkillSpector has recorded llm_connection_retries_exhausted since 2.9.1, but until 2.11.2 only for an APIConnectionError left after the provider SDK's own retries. 2.12.0 added its own bounded retry loop for transient provider failures such as rate limits and records the reason when that loop gives up. The new message and docs describe the 2.12.0 behavior, so the classifier now needs SkillSpector 2.12.0 or later instead of an unexplained 2.11.2. Reports from 2.11.2 and older keep the generic error. The code comment, the docs and the CHANGELOG now say which release the check reads and why, and a new test pins both sides of the boundary. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
rng1995
marked this pull request as ready for review
November 5, 2026 18:29
rng1995
requested review from
chrisknvidia,
mosheabr and
rmalani-nv
as code owners
November 5, 2026 18:29
…list The non_llm_analyzer case named static_yara on the provider row but left static_yara completed and the LLM analyzers failed, so the classifier rejected it at the analyzer status check and never used the LLM-analyzer allowlist. The case is now a consistent report: one provider-reason row and the run-level runtime row, static_yara failed with one failed unit, the LLM analyzers completed, and a single static_yara limitation. Only the allowlist rejects it. Without the allowlist, both the exit 2 and the exit 0 case now fail; before, all cases passed. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ten more report changes must keep the generic error, each built so that only one guard rejects it: - top-level errors - top-level execution_successful=true - analysis_completeness execution_successful=true - a partial or a skipped count on a provider analyzer status - a provider row with outcome skipped - an extra provider row with no analyzers - a provider row with an empty message - a ledger one row over the 4096-row bound - the run-level runtime row with fatal 0, which equals False A new case also checks that a runner error message on exit 2 is kept as is and is not replaced by the provider message. Removing the matching guard now fails its exit 2 case, and its exit 0 case where the classifier decides on that path. Before, every case passed with any one of these guards removed. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: src/skillevaluator/validators/security.py. Kept both exit-code hints: the provider-outage message and main's invalid --baseline hint. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
SkillSpector uses exit code 2 both for a provider outage and for rejected input such as an invalid --baseline file. After main's baseline hint was merged in, a provider outage with a valid baseline got the retry advice followed by advice to check the baseline. A provider-outage report proves SkillSpector accepted its input, so the baseline hint now applies only when the error is not a provider outage. 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
--llmSkillSpector stage fails because the LLM provider kept failing after SkillSpector's own bounded retries, the security error now says so. It readsskillspector-llm did not complete: the LLM provider kept failing after SkillSpector's bounded retries (llm_connection_retries_exhausted), says this is a retriable provider failure and not a security finding, says static findings are kept, and asks for a full rescan when the provider is available.execution_successfulis false. A report withexecution_successful=falseand exit code 0 or 1 gets the same check, as a fallback._skillspector_provider_retries_exhausted, decides when the message applies. All of these must hold:execution_successfulfalse at the top level and inanalysis_completeness, completeness statusfailedandis_completefalse. v2.12.0 added SkillSpector's own bounded retry loop for transient provider failures such as rate limits. v2.9.1 to v2.11.2 used the same reason only for a connection error left after the provider SDK's retries, so their reports keep the generic error.llm_connection_retries_exhaustedrow in thesemanticormetaphase, with a non-blank path and a message of at most 4096 characters. Its analyzers must be distinct LLM analyzers, andmeta_analyzermust appear exactly in themetaphase. The only other row allowed is SkillSpector's run-levelsemantic_runtime_incompleterow onSKILL.md, matched field by field.failed, each with its own status entry, with no partial, skipped or unaccounted work and no other reason. Every other analyzer iscompletedornot_applicable, and every limitation names one of the failed analyzers.errors,failuresor similar markers, and no*_truncatedflag.skillspector-llm failed with unexpected exit code 2: scanner diagnostics were redacted. That covers mixed causes, partial rows, truncated or malformed reports, older SkillSpector and wrong field types. A wrong type never raises.INCOMPLETE(skillspector-llminincomplete_scans), and the command exits 1. Issues in the failed LLM report, including any AE1 finding caused by the outage, are still not converted. Static-stage findings are kept, and a High static finding still makes the resultFAILED.docs/tier1-validation.mdxand a CHANGELOG entry under Unreleased > Fixed.Why
With
--llm, rate limits or a provider outage make SkillSpector v2.13.3 end the LLM stage as failed and exit 2. SkillEvaluator reported onlyskillspector-llm failed with unexpected exit code 2: scanner diagnostics were redacted, so users could not tell a provider problem that a rerun fixes from a scanner bug. SkillSpector already records the cause asllm_connection_retries_exhaustedin its report. This change reads that cause and turns it into a clear, retriable message.Not every provider failure gets this message. From v2.12.0, SkillSpector uses
llm_connection_retries_exhaustedonly when its own retry logic gives up. A failure that the provider SDK's built-in retries handle is recorded under a different reason, and that report keeps the generic error.Kept from public
_run_skillspector_onceand_validate_skillspector_report. The classifier only changes the error text after those checks have already decided the stage is incomplete.mark_scan_incomplete(stage_name)gating, and discarding every issue from a failed LLM report.FAILEDoverINCOMPLETE....; security scan did not completeandunexpected exit codemessages for every case that is not a clear provider outage, including the static stage and exit codes other than 2.Tests
TestSkillspectorProviderOutageintests/validators/test_security.py(93 cases). It uses a SkillSpector v2.13.3 report whose only fatal cause is provider retry exhaustion, plus a variant with an extra failedSKILL.mdrow, an outage-derived AE1 finding and the run-levelsemantic_runtime_incompleterow:INCOMPLETEwith no findings and the retry message, in the result, the JSON report and the CLI reportfailedexecution_successful=falsegets the same message after exit 0 or 1meta_analyzeroutageruntime_limitrow, a truncated ledger, a malformed row, a non-LLM or misplaced analyzer, older or missing versions, unexplained limitations or status messages, unfinished or unaccounted work, partial or skipped provider work, a moved or reworded runtime row, a runtime row withfatal0, a provider analyzer that reportscompletedor has no status entry, a completeness status ofpartial,is_completetrue,execution_successfultrue at the top level or inanalysis_completeness, a provider row with outcomeskipped, no analyzers, a blank path, or an empty message or one over 4096 characters, a ledger over 4096 rows, duplicate statuses, reported errors at the top level or inanalysis_completenessand wrong field typesstatic_yarafailed, so only the LLM-analyzer allowlist rejects itunexpected exit codemessagesecurity-scan --llmexits 1, showsINCOMPLETEand gives the retry messagetest_provider_outage_with_a_baseline_gets_only_the_retry_advice: SkillSpector exits 2 both for a provider outage and for rejected input such as an invalid--baselinefile, so a provider outage with a valid baseline gets only the retry advice, notmain's baseline hint. It fails when the two hints are applied together.srcfrom the branch base onmainwith these tests: 10 failed and 83 passed (before the outage-with-baseline case was added). The 10 are every case that expects the new message. The 83 that pass assert the generic error or the runner error is kept.srcbefore the version fix, the two v2.11.2 cases fail. Removing any one of five guards from the classifier (every row analyzer has a failed status, completeness statusfailed,is_completefalse, a non-blank row path, the row message bound) fails its two new cases. Removing any one of twelve more guards fails its new cases: the LLM-analyzer allowlist, top-level failure markers, top-level and completenessexecution_successful, the partial count, the skipped count, the row outcome, non-empty row analyzers, a non-empty row message, the 4096-row bound, thefatal is Falsecheck on the runtime row, and the exit 2 check that no runner error is set. The top-level markers and top-levelexecution_successfulguards fail only their exit 2 case, because on exit 0 an earlier report check already rejects those reports. Before, the other cases passed with any of these guards removed.tests/validators/test_security.py,test_security_validators.py,test_scan_incomplete.py,test_folder_validation.py,test_artifact_dir_exclusion.py,test_pii_grouping.py,test_private_plugin_composition.py,test_scanner_path_resolution.py,test_static_requirements_audit.py,test_target_dependencies.py,test_url_policy.py,tests/models/test_result.py,tests/reporting/test_incomplete_scans.py,tests/reporting/test_reporters.py,tests/test_cli.py,tests/test_skillspector_provenance.py,tests/test_publication_evidence.py,tests/ci/test_secret_redaction.py,tests/ci/test_image_build.py,tests/test_ci_workflows.py,tests/test_ci_change_classifier.py,tests/test_oss_packaging.py,tests/test_oss_source_hygiene.pyandtests/test_oss_boundary.py.tests/validators/test_security.pywith the remaining docs readers (test_accuracy_arithmetic.py,test_benchmark_rollout_docs.py,test_tier3_public_runtime.py,test_harbor_adapter_safety.py,test_plugin_manifest.py,test_harbor_runtime_skill_isolation.py): 1798 passed and 3 skipped.COLUMNS=40andFORCE_COLOR=1, and under-n 4.ruff checkis clean.ruff format --checkreports no new changes in either file. Both files already fail it onmain, and the branch adds no new hunks.scripts/check_oss_boundary.pypassed.🤖 Generated with Claude Code