fix(coverage): reduce false positives in negative test isolation#5398
Merged
madskristensen merged 1 commit intoSchemaStore:masterfrom Feb 23, 2026
Merged
Conversation
The negative test isolation heuristic used name-based property matching but overwrote constraints when the same property name appeared at different schema depths (e.g., "source" as object at one level and string at another). This caused false wrong_type violations. Changes: - Union all types, patterns, and enum values per property name instead of overwriting with last-seen value - Infer types from anyOf/oneOf/allOf variants when no explicit type is declared on a property schema - Update heuristic note to advise manual verification of flagged files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thanks for the PR! This section of the codebase is owned by @madskristensen and |
Contributor
|
Awesome. Thanks |
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
anyOf/oneOf/allOfvariants when no explicittypeis declaredContext
The
sourceproperty inclaude-code-settings.jsonappears as both an object (marketplace source config) and a string (source type discriminator like"git","url"). The old code kept only the last-seen type, causing falsewrong_typeviolations in negative test files that were actually single-violation.Test plan
node ./cli.js coverage --schema-name=claude-code-settings.jsonpasses 8/8 with 0 warnings when run on the claude-code-settings schema being opted into coverage in feat(claude-code-settings): sync to Claude Code v2.1.50 #5397🤖 Generated with Claude Code