Roast and peel the chilies, reserving the peels, stems and seeds. I like to use a food mill for this. After pealing the chilies, chop them up and add to the food mill with a medium plate. Reserve the seeds.
Add the reserved seeds, stems and peels to the chicken stock and bring to a boil. Simmer for ~ 20 minutes to infuse with the chili flavor and heat. Strain out the seeds and stems.
Chop the onion and garlic and sweat (add 1 tsp salt here) over medium heat for ~10 minutes, until soft. Pulse the onions in a blender a couple of times (or use the food mill if you have it out already) until slightly smooth but still a little chunky.
If you are doing the chopped tomatoes yourself, blanch the tomatoes for a couple of minutes in boiling water, transfer to ice water bath, peel and chop (or use the food mill again).
In a saucepan, heat the oil, add the flour and stir for a minute or so to form a roux. The roux should get to a golden brown. Add the stock to the pan and whisk to prevent any clumps of flour. Add all remaining ingredients. Bring to a boil, and simmer over medium heat, stirring frequently, until the liquid has reduced by half, about 30 minutes or so. Taste halfway through and add salt to taste.
It's ready to serve, but I like to let it cool and refrigerate for at least 2 hours or overnight. This allows the flavors to come together.