{
  "briefID": "B62-16",
  "kind": "ORIGINAL_FICTIONAL_RESPONSE_CLOCKS_NOT_NETWORK_RESULTS",
  "method": "GET",
  "path": "/palettes?collection=coast",
  "clock_origin_utc": "2024-01-01T12:00:00+00:00",
  "budget_seconds": 20,
  "max_attempts": 3,
  "per_attempt_cap": 4,
  "minimum_wait": 1,
  "date_parser_subset": "exact IMF-fixdate,validated weekday/roundtrip;not full HTTP-date parser",
  "fallback_seconds_by_completed_attempts": {
    "1": 2,
    "2": 4
  },
  "scenarios": [
    {
      "id": "seconds",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "3"
        },
        {
          "duration": 2,
          "status": 429,
          "retry_after": "4"
        },
        {
          "duration": 3,
          "status": 200,
          "retry_after": null,
          "body": {
            "palettes": [
              "coast-blue",
              "sand"
            ]
          }
        }
      ],
      "expected": {
        "reason": "success",
        "attempts": 3,
        "elapsed": 14,
        "request_seconds": 7,
        "wait_seconds": 7,
        "starts": [
          0,
          5,
          11
        ]
      }
    },
    {
      "id": "dates",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "Mon, 01 Jan 2024 12:00:06 GMT"
        },
        {
          "duration": 2,
          "status": 429,
          "retry_after": "Mon, 01 Jan 2024 12:00:12 GMT"
        },
        {
          "duration": 2,
          "status": 200,
          "retry_after": null,
          "body": {
            "palettes": [
              "coast-blue",
              "sand"
            ]
          }
        }
      ],
      "expected": {
        "reason": "success",
        "attempts": 3,
        "elapsed": 14,
        "request_seconds": 6,
        "wait_seconds": 8,
        "starts": [
          0,
          6,
          12
        ]
      }
    },
    {
      "id": "missing",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": null
        },
        {
          "duration": 2,
          "status": 200,
          "retry_after": null,
          "body": {
            "palettes": [
              "coast-blue",
              "sand"
            ]
          }
        }
      ],
      "expected": {
        "reason": "success",
        "attempts": 2,
        "elapsed": 6,
        "request_seconds": 4,
        "wait_seconds": 2,
        "starts": [
          0,
          4
        ]
      }
    },
    {
      "id": "invalid-fraction",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "1.5"
        },
        {
          "duration": 2,
          "status": 200,
          "retry_after": null,
          "body": {
            "palettes": [
              "coast-blue",
              "sand"
            ]
          }
        }
      ],
      "expected": {
        "reason": "success",
        "attempts": 2,
        "elapsed": 6,
        "request_seconds": 4,
        "wait_seconds": 2,
        "starts": [
          0,
          4
        ]
      }
    },
    {
      "id": "long-delay",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "30"
        }
      ],
      "expected": {
        "reason": "budget_no_fit",
        "attempts": 1,
        "elapsed": 2,
        "request_seconds": 2,
        "wait_seconds": 0,
        "starts": [
          0
        ]
      }
    },
    {
      "id": "reserve-does-not-fit",
      "responses": [
        {
          "duration": 4,
          "status": 429,
          "retry_after": "6"
        },
        {
          "duration": 4,
          "status": 429,
          "retry_after": "4"
        }
      ],
      "expected": {
        "reason": "budget_no_fit",
        "attempts": 2,
        "elapsed": 14,
        "request_seconds": 8,
        "wait_seconds": 6,
        "starts": [
          0,
          10
        ]
      }
    },
    {
      "id": "attempt-cap",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "0"
        },
        {
          "duration": 2,
          "status": 429,
          "retry_after": "0"
        },
        {
          "duration": 2,
          "status": 429,
          "retry_after": "0"
        }
      ],
      "expected": {
        "reason": "attempt_limit",
        "attempts": 3,
        "elapsed": 8,
        "request_seconds": 6,
        "wait_seconds": 2,
        "starts": [
          0,
          3,
          6
        ]
      }
    },
    {
      "id": "user-left",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "8"
        }
      ],
      "user_leaves_at": 5,
      "expected": {
        "reason": "user_left",
        "attempts": 1,
        "elapsed": 5,
        "request_seconds": 2,
        "wait_seconds": 3,
        "starts": [
          0
        ]
      }
    },
    {
      "id": "clock-untrusted",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "Mon, 01 Jan 2024 12:00:06 GMT"
        }
      ],
      "clock_trusted": false,
      "expected": {
        "reason": "clock_untrusted",
        "attempts": 1,
        "elapsed": 2,
        "request_seconds": 2,
        "wait_seconds": 0,
        "starts": [
          0
        ]
      }
    },
    {
      "id": "late-wake",
      "responses": [
        {
          "duration": 2,
          "status": 429,
          "retry_after": "2"
        }
      ],
      "wake_lateness": [
        14
      ],
      "expected": {
        "reason": "budget_no_fit",
        "attempts": 1,
        "elapsed": 18,
        "request_seconds": 2,
        "wait_seconds": 16,
        "starts": [
          0
        ]
      }
    }
  ],
  "additional_parser_cases": [
    {
      "header": "-1",
      "expected_wait_after_first": 2
    },
    {
      "header": "tomorrow",
      "expected_wait_after_first": 2
    },
    {
      "header": "NaN",
      "expected_wait_after_first": 2
    },
    {
      "header": "0",
      "expected_wait_after_first": 1
    },
    {
      "header": "Mon, 01 Jan 2024 11:59:00 GMT",
      "expected_wait_after_first": 1
    }
  ],
  "request_timeout_implementation": "not implemented;durations above cap rejected in model"
}
