feat(report): add analysis_completeness field to JSON output#160
Merged
rng1995 merged 1 commit intoJun 23, 2026
Merged
Conversation
Adds an analysis_completeness section to the JSON report output that communicates scan coverage and known limitations to consumers: - total_components / scanned_components / coverage_percent - llm_analysis status (applied/skipped) - findings_before_filtering / findings_after_filtering - limitations array (human-readable list of gaps) - is_complete boolean for quick programmatic checks This helps CI integrations and registry gates understand whether a "clean" scan actually analyzed everything or if gaps exist that require re-scanning with full capabilities. Only included in JSON format output; SARIF and terminal formats are unchanged. Fixes NVIDIA#149
2d0758f to
5f3e62b
Compare
rng1995
approved these changes
Jun 23, 2026
rng1995
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: Approve — additive transparency metadata, no detection-logic change, well tested.
What's good
- New
_build_analysis_completeness(src/skillspector/nodes/report.py, ~L9-54) reports coverage %, scanned vs total components, LLM applied/skipped, findings before/after filtering, alimitationslist, andis_complete. Emitted JSON-only (~L72-73,_format_json); SARIF/markdown/terminal unaffected. This is exactly the kind of "what was NOT analyzed" signal a fail-closed scanner should surface. - No change to what is detected or filtered — purely reporting.
Non-blocking
- Touches
report()/_format_json, so it will textually conflict with #142, #158, #143, and #163 (all editreport.py). Needs rebase coordination, but no logic concern.
Tests
Good: full/partial coverage, LLM unavailable vs disabled, findings-filtered note, empty-components → 100%, and presence in JSON / absence in SARIF. LGTM.
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 SkillSpector produces a "clean" scan (no findings), consumers have no way to know whether the tool actually analyzed everything or if it silently skipped components due to missing file content, LLM unavailability, or other limitations. This makes it impossible to trust a clean scan for registry gating decisions.
This PR adds an
analysis_completenesssection to the JSON report format that explicitly communicates scan coverage.Example Output
{ "analysis_completeness": { "total_components": 5, "scanned_components": 5, "coverage_percent": 100.0, "llm_analysis": "applied", "findings_before_filtering": 3, "findings_after_filtering": 1, "limitations": null, "is_complete": true } }When limitations exist:
{ "analysis_completeness": { "total_components": 5, "scanned_components": 3, "coverage_percent": 60.0, "llm_analysis": "skipped", "findings_before_filtering": 2, "findings_after_filtering": 2, "limitations": [ "2 component(s) had no content in file_cache (skipped)", "LLM meta-analysis unavailable: OPENAI_API_KEY not set" ], "is_complete": false } }Design Decisions
is_completeboolean: Enables simple programmatic checks (if not report.analysis_completeness.is_complete: warn)Testing
8 new tests covering:
is_complete: trueFixes #149