When a warning gets created punishment actions of the warning get executed.
At this point the warning is in a state where it is counted during threshold calculation.
A player can appeal the warning, a staff member can manually expire the warning or even delete the warning
When a warning gets appealed a staff member has the ability to approve or reject the appeal.
Once an appeal is rejected the player can no longer appeal it. When an appeal is approved, rollback actions are triggered and the warning is marked appeal approved. Once an appeal is approved it is like the warning never existed. It does not get counted when doing threshold calculations and won't show up in the infractions GUI. However the warning does not get deleted, this makes sure we can keep a history of the warning and appeal reasons.
Warnings can expire after a configured amount of time. Or manually by a staff member. When a warning is expired the punishments do not get rollbacked. The only real reason for warning expiration is to make sure this warning no longer gets counted when doing threshold calculations. It's a way to ensure warnings won't be held against the player forever.
Notice that a player can still appeal this warning. The reason a player might want to do this is if feels the warning was incorrectly given and although it's expired he still received the punishment. So by appealing he asks to rollback his punishment.
A staff member can choose to delete a warning completely. This action can always be taken no matter what status the warning is in. When a warning gets deleted, rollback actions are triggered and the warning is removed from the database. All history of the warning is gone.
In general you should only delete a warning if there was actually a mistake made. In most cases you can use the appeal system to rollback warnings in a clean way.