Skip to content

Add strict mode for interface comparison#1

Merged
thiagoa merged 1 commit into
mainfrom
strict-mode
Mar 9, 2026
Merged

Add strict mode for interface comparison#1
thiagoa merged 1 commit into
mainfrom
strict-mode

Conversation

@thiagoa
Copy link
Copy Markdown
Contributor

@thiagoa thiagoa commented Mar 9, 2026

Summary

  • Extract KeywordNormalizer and SequentialNormalizer from ParamsNormalizer, which becomes a factory via ParamsNormalizer.for(strict:)
  • Add DefaultParamsNormalizer (sorts keywords + sequentializes positional names) and StrictParamsNormalizer (sorts keywords only, preserving positional names)
  • Add strict: false to InterfaceChecker, BulkInterfaceChecker, assert_interfaces_match, and have_matching_interfaces / shared example

In strict mode, positional argument names must match exactly. Keyword argument names always matter regardless of this setting.

Test plan

  • bundle exec rake ci passes
  • New normalizer unit tests cover each class in isolation and together
  • InterfaceCheckerTest covers strict mode behaviour
  • README documents the strict: option for all integration points

🤖 Generated with Claude Code

@thiagoa thiagoa force-pushed the strict-mode branch 3 times, most recently from 9497a72 to d2779d8 Compare March 9, 2026 14:29
Extract KeywordNormalizer and SequentialNormalizer from
ParamsNormalizer. Add DefaultParamsNormalizer (both normalizers)
and StrictParamsNormalizer (keywords only), where strict mode
makes positional argument names significant. ParamsNormalizer
becomes a factory via ParamsNormalizer.for(strict:). Thread
strict: false through InterfaceChecker, BulkInterfaceChecker,
and both test helpers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@thiagoa thiagoa self-assigned this Mar 9, 2026
@thiagoa thiagoa merged commit 6125788 into main Mar 9, 2026
3 checks passed
@thiagoa thiagoa deleted the strict-mode branch March 9, 2026 14:35
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