fix(skillspector): fail loud on output-schema drift, not silent clean - #10
Merged
Conversation
Verified honey's skillspector lens against SkillSpector 2.3.11 (upstream moved 2.0.0 -> 2.3.11): the `issues[]` contract is unchanged — id/pattern/severity/ category/location — and the lens produces identical well-formed findings on both bash and PowerShell (116 findings; severities are now UPPERCASE, which the lens already lowercases). But the lens normalized `(.issues // [])`, so if a FUTURE version renames or drops that array, honey would yield ZERO findings and report `clean` — a silent false all-clear over an unscanned surface, exactly the risk of a fast-moving, release-less upstream. Add a schema guard: valid JSON that lacks a top-level `issues` key is treated as scan_error (visible) rather than clean. A genuine `issues: []` is still correctly clean. Both platforms; shellcheck clean; PSScriptAnalyzer clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Prompted by skillspector's upstream churn (2.0.0 → 2.3.11 in weeks, no formal releases).
Compat: verified good. Upgraded the local install to 2.3.11 and ran the lens on both platforms — the
issues[]core contract (id/pattern/severity/category/location) is unchanged, findings normalize identically (116), severities are now uppercase which the lens already lowercases. Updating skillspector is safe.The hardening (the real change). The lens did
(.issues // []), so a future rename/drop of that array would silently produce zero findings →clean— a false all-clear over an unscanned surface. Now: valid JSON lacking a top-levelissueskey →scan_error(loud, surfaced in the daily DM), while a genuineissues: []stays correctly clean. Applied to bothlenses/skillspector.shandwin/lenses/skillspector.ps1.shellcheck clean; PSScriptAnalyzer clean.
🤖 Generated with Claude Code