Two-phase commit outcome

Write codeEasy20 minOracle style

Your task

A coordinator runs two-phase commit across participants. In the prepare phase each participant votes: 'yes', 'no', or 'timeout' (no reply within the window). The protocol commits ONLY if every participant voted 'yes'; if any participant voted 'no' or 'timeout', the coordinator aborts. Given the list of votes, return 'commit' or 'abort'. An empty participant set commits (vacuously, nothing to coordinate).

Examples

two_phase_decision(votes: list[str]) -> str
Example 1
Inputtwo_phase_decision(["yes", "yes", "yes"])
Output"commit"