BUG: incorrect rounding in groupby.cummin near int64 implementation bounds
- [ ] closes #xxxx
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

xref #40719

why would we need to cast? can we not simply use a mask and leave the values as int?  > why would we need to cast? can we not simply use a mask and leave the values as int?

that was option c in my comment, return an IntegerArray.  For that we'd need IntegerArray to be 1) not opt-in and 2a) support 2D (#38992) or 2b) go full ArrayManager maybe u misunderstand 

in the cython code we use the incoming dtype and a mask

no casting required and you can always return the original type (except of course you may have to cast to floats if make nans but that would be rare) > maybe u misunderstand

suggested phrasing: "maybe we're talking past each other" or "maybe there's a miscommunication"

> no casting required and you can always return the original type (except of course you may have to cast to floats if make nans but that would be rare)

the casting under discussion is on the _back end_ after the cython call.
 this is a very slight user facing change right? can you add a whatsnew note (ref this PR) thanks @jbrockmendel 