I wish I knew more about this so I could help but I'm completely ignorant. I suspect each implementation is different. I also suspect the implementation tries to do a cooperative close unless the peers can't communicate or come to an agreement.
I asked for you on the Bitcoin stack exchange to see if we can get some more answers: https://bitcoin.stackexchange.com/questions/113132/under-what-conditions-would-lightning-channels-be-force-closed-automatically