When a mail message file (e.g. inbox/new/*.json) contains invalid JSON, the tps mail list and tps mail log commands crash with a JSON parse error, breaking the entire mailbox.
To Reproduce:
- Create a malformed JSON file in an agent's mail directory
- Run
tps mail list or tps mail log for that agent
Expected Behavior:
TPS should catch the JSON parse error, log a warning or move the corrupted file to a dead-letter queue/error directory, and continue processing the valid messages in the mailbox. A single corrupted file should not take down the whole mailbox.