Spaces:
Sleeping
Sleeping
| from workflow_twin.models import Action, Observation | |
| def greedy_queue_policy(obs: Observation) -> Action: | |
| if obs.ticket_id is None: | |
| return Action(action_type="skip", note="no_ticket") | |
| if obs.severity == "high" and obs.attempts_used >= 1: | |
| return Action(action_type="escalate", note="high_severity") | |
| if obs.attempts_remaining <= 1: | |
| return Action(action_type="resolve", note="final_attempt") | |
| if obs.ticket_status == "open": | |
| return Action(action_type="triage", note="initial_triage") | |
| return Action(action_type="respond", note="continue_work") | |