Commit the lock
For an app, commit the lock so a rebuild on another machine resolves the same versions. For a library, you may not ship a lock; then the range and the CI check are the substitute.
When a range is too wide
If the upper bound is missing, a future major can be resolved silently. Add the upper bound at the major you last tested against, so the next major fails at resolve time.