"""Synthetic status decisions, not a Grok outage detector or API client."""
def next_step(status,attempts,max_attempts=3):
    if attempts>=max_attempts:return "stop and preserve the packet"
    if status in (401,403):return "review authentication or permission; do not blind-retry"
    if status==429:return "inspect limits and response guidance; bounded backoff"
    if 500<=status<=599:return "check service status; bounded backoff"
    return "inspect the actual message and affected route"
if __name__=="__main__":
    assert next_step(429,3).startswith("stop")
    assert next_step(401,0).startswith("review")
    assert next_step(503,0).startswith("check")
    assert next_step(429,1).startswith("inspect limits")
    print("PASS: four synthetic recovery decisions; no requests sent.")
