NY No Fault Divorce: Can court override a mutually agreed alimony waiver between the parties?

How to properly document an alimony waiver between the parties? In NY state, a separation agreement is not required and you can go straight to divorce, so is it just a verbal agreement in front of the judge or can you do any paperwork beforehand?

While courts should generally respect the agreements of both parties, they can still intervene if they believe the waiver is unjust or if there are significant changes in circumstances after the divorce. How often does this happen in practice? Are there any cases I can look up publicly if I don't have access to LexisNexis?

We have a pretty straightforward and so far amicable case, so we're trying to DIY (+spouse is an attorney, but I want to do my own research).