That’d be case 3: when in doubt, detain. Blatantly illegal.
What made me think that it wasn’t that case was that OP mentions app specifies whether or not an order of deportation had been issued.
If that is one of several possible “detain” conditions, the app would function like case 2. If that was the only trigger for detention, the app would function like case 1.