Wash chicken pieces and pat dry. Heat oil in large skillet and cook onions over medium heat until soft. Add ⅔ of the minced garlic, salt, pepper, bay leaves, and saffron. Mix in chicken and cover with of water. Simmer over medium-low heat until chicken is tender, about 20-30 minutes. Let chicken cool in broth before straining broth into a bowl. Separate chicken meat from bone and skin. Break pieces into small bite size chunks. Season with salt and pepper and set aside in a bowl with remaining tsp minced garlic and 1 cup strained broth to keep warm.
In a non-stick skillet, toast flour over medium heat stirring constantly. When it turns a light beige color, add paprika and allspice. Cook 30 seconds more and remove from heat.
In a food processor, grind the seasoned flour and walnuts to a paste. Drizzle in 1 cup strained broth to make a smooth sauce. Process in 1 more cup of broth.
Scrape walnut sauce into a skillet and bring to a boil over medium-low heat. Cook for 20 minutes, stirring occasionally.
Drain chicken pieces and arrange in one layer in an oven-proof serving dish. Mix in 1 cup of walnut sauce and lemon juice. Thin remaining sauce slightly and pour over the chicken. Let mixture cool completely then place in refrigerator, covered, for at least 2 hours before serving.
To serve, remove from refrigerator an hour-or-two in advance. Right before serving, heat 1 tbsp walnut oil in a very small saucepan. When shimmering, add ¼ tsp Aleppo or cayenne pepper and swirl to combine. Remove from heat and let pepper settle. Warm casserole slightly in a microwave, drizzle top with red oil, and serve with warm pita bread.