Skip to content

fix(skills): parse two-character operators in resolveVersion - #16204

Merged
diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
Louayzouaoui1:fix/skills-resolve-version-operators
Oct 11, 2026
Merged

diegosouzapw merged 1 commit into
cheaper-inference:release/v3.8.52from
Louayzouaoui1:fix/skills-resolve-version-operators

Conversation

@Louayzouaoui1

@Louayzouaoui1 Louayzouaoui1 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes skillRegistry.resolveVersion for >=, <= and == constraints (src/lib/skills/registry.ts). The operator was read with constraint.charAt(0), so ">=1.0.0" became operator ">" against base "=1.0.0", whose major parses to NaN, and no version ever satisfied it. The ">=", "<=" and "==" cases in the switch were 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

  • Change type: other (skills registry)
  • Focused tests: 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, plus tests/unit/characterization-skills.test.ts)
  • eslint and prettier --check on the changed files
  • Based on the tip of release/v3.8.52
  • Production-code change includes a new automated test in this PR

Tests Added Or Updated

  • Added 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.
  • Updated tests/unit/characterization-skills.test.ts: the characterization test for this bug now asserts the corrected behaviour.
  • Added the changelog fragment changelog.d/fixes/0000-skills-resolve-version-operators.md.

Coverage Notes

  • resolveVersion operator parsing is covered by the new test file.

Reviewer Notes

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @Louayzouaoui1 — closing this pull request to clear the open queue. The branch fix/skills-resolve-version-operators is kept, so the commits stay. Comment here if it should be reopened.

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Hi @Louayzouaoui1 — reopening this pull request. The close was a mistake, and it is back in the merge queue. The branch fix/skills-resolve-version-operators was kept.

@diegosouzapw diegosouzapw reopened this Oct 10, 2026
@diegosouzapw
diegosouzapw merged commit 02a1204 into cheaper-inference:release/v3.8.52 Oct 11, 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.

skills: resolveVersion never matches >=, <= or == constraints (operator parsed with charAt(0))

2 participants