AI-assisted engineering/AI-collaboration build

Fix satisfies for the registry's version ranges

AI-collaboration buildHard45 min

A package registry decides which version each install gets. Since its resolver was rewritten, some projects get versions their range should keep out, and some miss versions it should let in.

Your task

Fix satisfies so it honors its contract. The assistant may help, and it may be wrong more than once.

  • versions order by MAJOR, MINOR and PATCH as numbers, and a pre-release such as 1.0.0-rc.1 comes before its release
  • pre-release identifiers compare one by one: digits as numbers, the rest as text, a number below text, and a list below a longer one it starts
  • ^ stops below the next change to the left-most non-zero part: ^1.2.3 below 2.0.0, ^0.2.3 below 0.3.0
  • a pre-release satisfies a range only if the range names a pre-release of the same MAJOR.MINOR.PATCH
  • leave run_case alone; it is what the tests call

Hidden tests run at submit. Your prompts, runs and edits are the trace the critique reads.