Describe the bug
The opportunities list is expected to be sorted by close time. It is possible to break this.
To Reproduce
Steps to reproduce the behavior:
- Generate two segments of opportunities (as opposed to all at once).
- Observe the order of the opportunities list; it is not sorted around the time where the two opportunity generations met.
Expected behavior
Opportunities should always remain sorted.
Additional context
I suspect this comes from not properly reordering opportunities when one of the form [opportunity_start, opportunity_generation_end_time] is extended to [opportunity_start, opportunity_end]. For now, just generate all of your opportunities at once to avoid this issue.