| > A big part of the problem with SemVer is that "breaking changes" is subjective I don't think that's true. I've always thought a breaking change is defined in broad terms as "the public API surface, runtime, and output". Given that, each of these would be a SemVer major: * remove a publicly-exported function
* public function changes order of arguments
* drop support for an old version of the language
* a function changes behavior significantly (the issue the OP wrote about) Relying on a specific major version, you should be able to assume none of the above will happen. The following would _not_ be a major version: * renamed/removed private versions
* add extra, optional arguments to public function
* add support for new version of language
* the xkcd example about CPU usage In each of these cases, if you rely on non-guaranteed behavior, you should check every version upgrade closely- package maintainers don't make any assurances about those. I'm not sure how mongoid is developed, but this smells like a bug to me. The `or` behavior started considering a thing it didn't used to, possibly unintentionally. Unfortunately, released mistakes are the one thing SemVer doesn't cover. Testing sufficiently about your own assumptions (in this case, that the user upgraded matches the one found in the query) is the best way to CYA. |