Skip to content

test(checks): boundary cases for case-insensitive matching and Jaccard threshold#20

Merged
protosphinx merged 1 commit into
mainfrom
bot/checks-boundary-tests
May 24, 2026
Merged

test(checks): boundary cases for case-insensitive matching and Jaccard threshold#20
protosphinx merged 1 commit into
mainfrom
bot/checks-boundary-tests

Conversation

@protosphinx
Copy link
Copy Markdown
Member

Why

Three behavioral invariants in runChecks were not covered by tests:

  1. duplicate-name groups skills case-insensitively (Deploy and deploy are the same name).
  2. description-collision fires at exactly the 0.6 Jaccard threshold (the boundary, >= 0.6).
  3. name-drift lowercases both sides before comparing, so name: FOO correctly matches foo.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 new it blocks added to the existing runChecks describe suite.
    • duplicate-name match is case-insensitive
    • description-collision fires at exactly the 0.6 Jaccard threshold
    • name-drift match is case-insensitive

No source changes. No new dependencies.

Tests

  • npm run lint && npm run build && npm test: all 92 tests pass (up from 89 before this PR).
  • The Jaccard threshold case uses descriptions with token sets of size 4 sharing 3 tokens: 3 / (4 + 4 - 3) = 0.6 exactly.

Self-merge gate

  • all CI checks pass
  • LOC delta < 250 (added + removed): 26 lines added
  • no public-API surface change
  • no runtime-dependency additions
  • no workflow file changes
  • tests added or extended: yes, 3 new test cases

Generated by Claude Code

…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
@protosphinx protosphinx merged commit 984c2c0 into main May 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant