Repository navigation
Honor SkillSpector analysis completeness - #112
Conversation
|
End-to-end follow-up:
The full source suite for this PR also passed: 5160 passed, 17 skipped, 4 deselected. Lint and build passed. |
rng1995
left a comment
There was a problem hiding this comment.
The new contract checks still accept contradictory incomplete evidence.
|
@Tomauskasz Gentle ping when you have a chance: the remaining completeness-contract review thread is still waiting for an update or response. Thank you for your patience throughout the review and for your contribution. |
|
Independent reproduction — this matches the root cause described here exactly, and I bisected the SkillSpector side. Minimal reproducer. A skill with no findings at all is enough; the only trigger is a ---
name: repro
description: Minimal reproducer for the SkillSpector completeness contract mismatch. Use when reproducing the reported validation failure.
---
# Repro
## Overview
Prose only. No executable content.
### Input/Output Separation
Keep inputs and outputs distinct.Behaviour across SkillSpector versions (same skill, same SkillEvaluator commit,
Failure message on 2.10.0+: Three things worth noting:
Environment: SkillEvaluator Until this lands, we are pinning SkillSpector to |
|
Follow-up from the complete three-lane review is in bdd69c1. The ten contradictory/missing completeness-detail cases now share one parameter matrix and one scanner/assertion body. Runtime behavior and case coverage are unchanged; the test removes 23 net lines of duplicated mechanics. Verification:
|
|
Final test-only polish is in 1f25501. The partial-report regression now overrides only fields that differ from the shared fixture. Current and legacy clean-report coverage now shares one parameterized test path. Production behavior and contract coverage are unchanged; the test file is 20 lines smaller. Final verification: 5,482 passed, 17 skipped, 4 deselected; Ruff passed; source and wheel builds passed; Fresh CI, DCO, and Security runs for this head are |
1f25501 to
18b8fc9
Compare
|
The DCO-only failure is corrected in the rebased head The branch was rebased onto current The only rebase conflict was additive in Post-rebase verification: 5,488 passed, 17 skipped, 4 deselected; Ruff passed; source and wheel builds passed; Fresh DCO, CI, and Security runs were created but are currently |
Signed-off-by: Tomas <[email protected]> Signed-off-by: Tomas <[email protected]>
Context: SkillSpector complete-summary flags could contradict authoritative coverage, inspection-count, exception, or limitation details while SkillEvaluator still accepted the scan. Changes: - Require present completeness objects to report numeric 100% coverage, zero integer partial and uninspected counts, and empty exception and limitation lists. - Reject missing authoritative detail fields when the completeness object exists. - Add regressions for contradictory and missing details plus the legacy report path without completeness metadata. Impact: Contradictory or malformed claimed-complete reports fail closed. Older reports that omit the completeness object retain their existing validation path. Validation: - Contradictory-detail regression: 5 passed. - Missing-detail regression: 5 passed. - Focused current, contradictory, missing, and legacy cases: 12 passed. - Validator test suite: 847 passed. - Ruff and `git diff --check`: passed. Notes: The full repository suite was not run locally. Signed-off-by: Tomas <[email protected]>
Context: Contradictory and missing SkillSpector completeness details used separate parameterized tests with identical scanner setup, execution, and assertions. Use one ten-case matrix for the shared fail-closed contract. Changes: - Pair each invalid detail mutation with an optional missing-field selector. - Preserve all five contradictory-value cases and all five missing-field cases. - Keep one public validation call and one assertion body for every case. Impact: The validator behavior and coverage remain unchanged while the test removes 23 net lines of duplicated mechanics. Validation: - Focused completeness and legacy contract set: 12 passed. - `uv run pytest -q`: 5482 passed, 17 skipped, 4 deselected. - `uv run ruff check src tests`: passed. - `uv build`: source archive and wheel built successfully. - `git diff --check`: passed. Notes: The repository-wide formatter check remains red on pre-existing files and is not part of the configured Makefile lint target. Signed-off-by: Tomas <[email protected]>
Context: The current and legacy SkillSpector report-contract tests repeated complete fixture values and duplicated the validator execution and assertions. Changes: - Update only the completeness fields that differ in the partial-report case. - Parameterize the shared clean-report acceptance path for current and legacy metadata. Impact: Preserve the current, legacy, and incomplete report assertions while removing 20 lines of repeated fixture and mock setup. Validation: - Full suite: 5482 passed, 17 skipped, 4 deselected. - Lint: All checks passed. - Build: source distribution and wheel built successfully. - Focused report-contract cases: passed. - git diff --check: passed. Notes: None. Signed-off-by: Tomas <[email protected]>
Context: SkillSpector reports now require coherent version-specific completeness evidence before SecurityValidator converts their findings or returns a successful result. Changes: - Select a strict status-less compatibility contract for SkillSpector 2.9.6 and the status-bearing contract for versions 2.10 and newer. - Validate execution markers, component and coverage equations, required analyzer rosters, universal analyzer work accounting, limitation reconciliation, and risk recommendations. - Require coherent pre/post-filter finding counts and reconcile them with serialized active and suppressed findings without rejecting report-deduplicated or occurrence-expanded 2.10 output. - Require non-empty 2.10 finding IDs and derive a conservative risk-score floor across SkillSpector's pre-compaction scoring and post-compaction report representations. - Require versioned findings to identify a non-empty path and require a complete, unique component inventory with boolean executable evidence, reconciled counts, and exact source-scoped issue coverage. - Preserve source scopes, match fingerprints, distinct modern finding IDs, and legacy findings whose display text is null. - Reject occurrence-expanded rows that disagree on the severity, confidence, or finding ID copied from one compacted identity. - Allocate compacted and hidden raw findings once across the most score-reducing rule slots while preserving independently reconstructable visible contributions and explicit rule floors. - Preserve executable-component evidence and a conservative reported-score floor when generated findings are filtered. - Keep SkillSpector's shipped-bytecode finding, blocking score floor, and shipped bytecode bytes authoritative while staging a generated-output-free scan tree. - Preserve findings from coherent partial reports while retaining an incomplete result and suppressing clean summaries. - Add a captured 2.9.6 report fixture, regression coverage for complete, partial, failed, and malformed reports, and changelog documentation. Impact: Failed, contradictory, duplicate, or materially understated SkillSpector output is rejected before findings are processed. Valid partial, compacted, source-scoped, null-fingerprint, legacy null-text, and shipped-bytecode findings remain available without representing an incomplete scan as complete or overstating evidence lost during compaction. Validation: - uv run make test: 5955 passed, 17 skipped, 4 deselected. - uv run make lint: all checks passed. - uv run make build: source distribution and wheel built successfully. - Focused validator suite: 353 passed. - The null-fingerprint public-seam regression failed before the fix and passed after distinct finding IDs became authoritative. - The fractional score-floor and staged-SC8 regressions failed before their fixes and passed afterward. - Eight component-inventory, executable-occurrence, and hidden-multiplicity regressions failed against the prior immutable head and passed after the fixes. - Self-review added passing regressions for duplicate component identities and producer source-scope priority. - Six empty-path, zero/under-counted analyzer-work, and compacted-confidence counterexamples failed against the reviewed head and passed after the fixes; 2.9.6 and future-analyzer compatibility cases also pass. - Two hidden and occurrence-expanded score-floor counterexamples failed against the reviewed head and passed with global unknown-finding allocation; an impossible raw-finding/compact-identity count also fails closed. - A forged compacted-identity report claiming 15/LOW/SAFE for raw findings that score 69/HIGH/DO_NOT_INSTALL failed before the fix and now fails closed; a conflicting-finding-ID variant is also covered. - Live SkillSpector 2.10.0 clean and 14-advisory reference-skill probes passed against clean-checkout content. - SkillSpector 2.10.0 report-deduplication, source-scoped score, null-fingerprint, and SC8 floor probes matched the validator contract. - The SC8 score-floor regression failed under the no-floor mutation and passed after restoration. - git diff --check and JSON fixture parsing passed. Notes: Compatibility covers the captured SkillSpector 2.9.6 contract and the completeness and report-compaction behavior used by SkillSpector 2.10 and newer. Signed-off-by: Tomas <[email protected]>
18b8fc9 to
debc843
Compare
|
The three September 3 P1 review findings and the subsequent contract findings are addressed in rebased head
The follow-up also requires the captured 2.9.6 analyzer roster, the stable 2.10+ roster, and all semantic analyzers when LLM availability is confirmed. It validates analyzer work partitions and state agreement, and checks both execution markers, stage-specific LLM metadata, limitations, recommendation semantics, and non-empty 2.10 finding IDs. Self-review caught and fixed the partial LOW/CAUTION path, huge-integer coverage ordering, incomplete analyzer-roster acceptance, duplicate transitive analyzer IDs, released transitive-truncation output, unvalidated finding totals and identities, a real 2.10 pre-compaction score compatibility failure, source-provenance loss in score reconstruction, modern null-fingerprint findings collapsed by display prose, legacy null-text findings collapsed into one row, executable component evidence lost during post-filter scoring, lossy replacement of the producer score, fractional score truncation at the policy threshold, shipped bytecode removed before the artifact-integrity analyzer ran, inconsistent source-scope priority, and duplicate component identities. Exact SkillSpector 2.10.0 probes confirm that report-time deduplication can reduce two post-filter findings to one serialized issue, a non-executable source remains at score 40 even when another source uses the same executable path, three source scopes score 70 rather than collapsing to 40, and distinct null-fingerprint finding IDs remain score-distinct. Independent review of the prior immutable head reproduced three additional counterexamples. Missing components allowed executable-risk understatement; compacted mixed executable/non-executable occurrences could select the wrong multiplier; and hidden raw duplicates made a serialized-only producer-score bound unsafe. The final contract rejects missing evidence and preserves only independently provable score evidence across compaction. Final immutable-head review found three more P1s. Empty or absent issue paths bypassed executable-score matching; a complete report could claim zero universal analyzer work; and representative confidence copied during compaction could reject a genuine producer score. All six exact public-seam cases failed against the reviewed head and pass after the fixes. Captured 2.9.6, future-analyzer, and partial-report compatibility cases also pass. A subsequent immutable-head review found one more P1 in that correction: one hidden raw finding or one occurrence-expanded identity erased independently provable risk from every visible rule. The final implementation deduplicates modern report identities, computes the finite global count of unknown raw findings, and allocates those findings once to the largest possible diminishing-weight reductions. The six-rule counterexamples now retain conservative score floors of 55 with one hidden raw finding and 30 with six expanded duplicates. Reports that claim fewer raw findings than their distinct compact identities also fail closed. The last immutable-head review found that contradictory representative fields under one compact identity could forge a passing score. A six-rule report claiming Post-rebase verification: 5,955 passed, 17 skipped, 4 deselected; Ruff passed; source and wheel builds passed; the focused validator suite passed 353 tests; live SkillSpector 2.10.0 clean and 14-advisory reference-skill probes passed against clean-checkout content; report-deduplication, source-scoped score, null-fingerprint, and Final exact-head producer-contract and repository-standards reviews found no P0-P2 issues. |
The original requested changes have been addressed at current head debc843; the related review threads were independently verified and resolved.
|
@Tomauskasz Could you please address these three current-head contract gaps before we merge?
Why this must be addressed before merge: issue 1 rejects valid output from the currently released scanner; issue 2 can turn missing security-analysis evidence into a false SAFE result; and issue 3 breaks an already released scanner without an explicit minimum-version contract. The repository's green checks do not currently exercise these real producer/consumer combinations. Please add captured or real-version regression coverage for the 2.11.1 classification-distinct PE3 case, a 2.11.1 report missing |
Context: SkillSpector 2.11.1 preserves classification-distinct findings that share a match fingerprint. The evaluator must retain their finding identities. The reviewer also identified missing 2.11 analyzer evidence and rejection of the released 2.9.5 statusless report schema. Changes: - Use finding IDs for 2.11.1+ validation, deduplication, and score floors. - Reject conflicting ID reuse, including JSON evidence type differences. - Require bundled_execution_surface evidence starting at 2.11.0. - Share the statusless compatibility contract between 2.9.5 and 2.9.6. - Add captured producer reports and public-seam compatibility regressions. - Update the compatibility changelog entry. Impact: Real 2.11.1 classification-distinct PE3 findings remain visible as security findings. Missing required analyzer evidence and inconsistent identities fail closed. Older identity behavior remains version-gated. Validation: - Full suite: 5,997 passed, 17 skipped, 4 deselected. - Focused validator suite: 367 passed. - Ruff src/tests, source and wheel builds, and diff checks passed. - Live evaluator --no-llm probes passed with 2.9.5, 2.9.6, 2.10.0, 2.11.1. - Three native final-tree review lanes reported no new supported findings. - Evidence-type regression failed before its correction and passed after. Notes: Preserves NVIDIA's merge commits. Local review receipts and registry validate; host execution provenance remains partial. No merge requested. Signed-off-by: Tomas <[email protected]>
|
@chrisknvidia All three requested contract fixes are in
Verification on the pushed tree: 5,997 passed, 17 skipped, 4 deselected; 367 focused validator tests passed; Ruff, source/wheel builds, and diff checks passed. Live evaluator CLI The new regressions reproduce the prior-head failures. Three independent native review lanes inspected the final immutable diff and reported no new supported findings. An evidence-equality issue raised during the first review was reproduced, corrected, and covered by a red/green regression before the final review. Local review receipts and the reconciled finding registry validate; host execution provenance remains partial. The new CI, DCO, and Security runs are |
Resolve CHANGELOG.md after merging upstream NVIDIA#99, NVIDIA#107, and NVIDIA#112.
Resolve CHANGELOG.md after merging upstream NVIDIA#99, NVIDIA#107, and NVIDIA#112.
Resolve CHANGELOG.md after merging upstream NVIDIA#99, NVIDIA#107, and NVIDIA#112.
Summary
SkillEvaluator now validates the SkillSpector report contract across the supported schema generations. It explicitly supports statusless 2.9.5 and 2.9.6 reports, status-bearing 2.10+ reports, and requires
bundled_execution_surfacebeginning with 2.11.0. For 2.11.1 and newer reports,finding_idis the logical finding identity throughout validation, deduplication, and score reconstruction. Older report generations retain fingerprint-first behavior.The evaluator now validates completeness counts and coverage, the required analyzer roster and work partitions, source-scoped component inventories and paths, filtering counts, and the risk recommendation. It preserves valid HIGH findings from coherent partial scans while keeping the overall result incomplete. Score reconstruction is conservative across compaction and hidden occurrences. The SC8 shipped-bytecode floor is explicit, and the staged scanner retains shipped bytecode for that check.
For 2.11.1+, validation rejects conflicting reuse of a finding ID across scoring, classification, and source fields. Evidence JSON comparisons preserve
true-versus-1type distinctions. The fixture set includes real 2.9.5 SAFE, 2.11.1 SAFE, and 2.11.1 classification-distinct PE3 cases; the existing 2.9.6 fixture remains covered.CHANGELOG.mdrecords the release impact.Verification
On the exact final tree (
e6799e85fff8e42c3785c2fe5f115a4ffd6c0195):srcandtests.--no-llmSAFE probes passed for tagged 2.9.5, 2.9.6, 2.10.0, and 2.11.1 reports.Three independent native review lanes reported no new supported findings on this tree. The first review identified a JSON evidence equality gap; its regression failed before correction and passes afterward. Local execution receipts and the reconciled finding registry validate. Host execution provenance remains partial.
AI assistance
Codex implemented, tested, and reviewed these changes.