Repository navigation
fix(skills): parse two-character operators in resolveVersion - #16204
Merged
diegosouzapw merged 1 commit intoOct 11, 2026
Conversation
Louayzouaoui1
force-pushed
the
fix/skills-resolve-version-operators
branch
from
October 10, 2026 13:26
a023cdc to
5917fa8
Compare
5 tasks done
Collaborator
|
Hi @Louayzouaoui1 — closing this pull request to clear the open queue. The branch |
Collaborator
|
Hi @Louayzouaoui1 — reopening this pull request. The close was a mistake, and it is back in the merge queue. The branch |
diegosouzapw
merged commit Oct 11, 2026
02a1204
into
cheaper-inference:release/v3.8.52
3 checks passed
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
Fixes
skillRegistry.resolveVersionfor>=,<=and==constraints (src/lib/skills/registry.ts). The operator was read withconstraint.charAt(0), so">=1.0.0"became operator">"against base"=1.0.0", whose major parses toNaN, and no version ever satisfied it. The">=","<="and"=="cases in theswitchwere unreachable.The operator is now matched with
/^(>=|<=|==|\^|~|>|<)/(two-character operators first) and the base version is the rest of the string. Constraints without an operator still fall through to the exact-version match, and single-character operators behave as before.Related Issues
Validation
node --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts --import ./tests/_setup/isolateDataDir.ts --test --test-force-exit tests/unit/skills-resolve-version.test.ts tests/unit/skills-executor.test.ts tests/unit/skills-injection.test.ts tests/unit/skills-marketplace.test.ts(24 pass, plustests/unit/characterization-skills.test.ts)eslintandprettier --checkon the changed filesrelease/v3.8.52Tests Added Or Updated
tests/unit/skills-resolve-version.test.ts:>=,<=and==(match and no-match cases), plus a case pinning that>,<,^,~and exact versions are unchanged. The three new-operator tests fail without the fix and pass with it.tests/unit/characterization-skills.test.ts: the characterization test for this bug now asserts the corrected behaviour.changelog.d/fixes/0000-skills-resolve-version-operators.md.Coverage Notes
resolveVersionoperator parsing is covered by the new test file.Reviewer Notes
characterization: resolveVersion with >=, <= or == constraints currently never matches. I flipped that test in this PR (renamed, with the corrected expectations), as skills: resolveVersion never matches >=, <= or == constraints (operator parsed with charAt(0)) #16186 asked.npm run lintlocally; CI runs them.