Skip to content

fix(bindings): remove early return in isImplementedBy loop#2085

Merged
viktormarinho merged 1 commit intomainfrom
fix/binding-checker-early-return
Dec 23, 2025
Merged

fix(bindings): remove early return in isImplementedBy loop#2085
viktormarinho merged 1 commit intomainfrom
fix/binding-checker-early-return

Conversation

@viktormarinho
Copy link
Copy Markdown
Contributor

@viktormarinho viktormarinho commented Dec 23, 2025

Summary

  • Fixed a bug in createBindingChecker where isImplementedBy() returned true after finding the first matching tool, instead of checking all required tools in the binding
  • This caused false positives when only some required tools were present (e.g., binding requires [A, B, C] but only A exists → incorrectly returned true)

Test plan

  • Existing tests pass (bun test packages/bindings)
  • The fix is a simple one-line deletion that removes the premature return true; statement inside the for loop

Summary by cubic

Removed the early return in createBindingChecker’s isImplementedBy so it checks all required tools before returning true. This prevents false positives when a binding requires multiple tools but only some exist.

Written for commit 255ca01. Summary will update automatically on new commits.

@viktormarinho viktormarinho force-pushed the fix/binding-checker-early-return branch from a8f106c to 9c817ac Compare December 23, 2025 19:18
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

The isImplementedBy function was returning true after finding the first
matching tool, instead of checking all required tools in the binding.
This caused false positives when only some required tools were present.
@viktormarinho viktormarinho force-pushed the fix/binding-checker-early-return branch from 9c817ac to 255ca01 Compare December 23, 2025 19:19
@viktormarinho viktormarinho merged commit e90c721 into main Dec 23, 2025
1 check passed
@viktormarinho viktormarinho deleted the fix/binding-checker-early-return branch December 23, 2025 19:22
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.

2 participants