test(checks): boundary cases for case-insensitive matching and Jaccard threshold#20
Merged
Merged
Conversation
…nd Jaccard threshold Cover three untested behavioral paths in runChecks: - duplicate-name is case-insensitive (Deploy vs deploy triggers the rule) - description-collision fires at exactly the 0.6 Jaccard threshold - name-drift match lowercases both sides so FOO matches foo.md cleanly
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.
Why
Three behavioral invariants in
runCheckswere not covered by tests:duplicate-namegroups skills case-insensitively (Deployanddeployare the same name).description-collisionfires at exactly the 0.6 Jaccard threshold (the boundary,>= 0.6).name-driftlowercases both sides before comparing, soname: FOOcorrectly matchesfoo.md.All three are real behaviors that a future refactor could silently break. Adding explicit regression tests locks them in.
What
test/checks.test.ts: three newitblocks added to the existingrunChecksdescribe suite.duplicate-name match is case-insensitivedescription-collision fires at exactly the 0.6 Jaccard thresholdname-drift match is case-insensitiveNo source changes. No new dependencies.
Tests
npm run lint && npm run build && npm test: all 92 tests pass (up from 89 before this PR).3 / (4 + 4 - 3) = 0.6exactly.Self-merge gate
Generated by Claude Code