Finely mince rosemary and combine with olive oil in a small bowl. Set aside so the rosemary can infuse the oil.
Combine flour, sugar, salt, and yeast in the bowl of a stand mixer. Mix with your hand to combine.
Make a well in the center of the dry ingredients and pour the water and minced rosemary-infused olive oil into the center. Run the mixer on low speed to combine until a shaggy dough forms, pausing occasionally to scrape down the sides of the bowl as needed. This may take several minutes. If the dough seems really dry, drizzle in water 1 tsp at a time, letting the mixer run after each addition until it comes together on its own. You're looking for a fairly low hydration dough, so resist adding water unless absolutely necessary.
Once the dough has mostly come together in a shaggy mass, increase the mixer speed to a low-medium speed and let the mixer run for 3 minutes until dough becomes smooth and slightly tacky. Dust in additional flour if needed to keep the dough from sticking to the sides of the bowl.
Shape the dough into a round ball. Tuck the edges under the dough to create a smooth surface. Drizzle a little bit of oil into the mixer bowl. Plop the dough inside and turn it around to coat it with oil. Cover the bowl and let it rise in a warm spot for about an hour, until it just about doubles in size. When you press it with a finger the indent should bounce back slightly but not completely.
Once the dough has doubled in size, punch it down to collapse any air bubbles that have built up inside. Cover and let rest 10 more minutes.
Divide the dough into 8 equal portions (use a kitchen scale for precision). Shape each portion of dough into a smooth dough round. If combining a few pieces of dough, stack the smaller ones on top of the bigger ones. Tuck the edges of the dough up so the bottom of the dough is smooth against the counter and all the ends are pinched together on top. Flip the dough round over and cup your hand around it with your pinkie flat against the counter. Slide your hand forward dragging the dough with it to create tension of the top of the dough. The dough will take on an oval shape. Then rotate the dough 90° and repeat to turn the oval into a round. Set aside to rest while you shape the rest of the dough. Starting with the first dough round you shaped, dip your thumb in flour and poke it through the bottom of the dough and out the other side. Slide your other thumb through next to it and begin stretching and squeezing the dough as you rotate it through your hands. Be careful not to tear the dough, just gently stretch it. Repeat with the rest of the dough rounds, then cover them with a damp paper towel and let them rest for 10 minutes.
While the bagels rest, preheat your oven to 425°F and fill a large, high-sided skillet about halfway with water — just enough that there's room for the bagels to float without resting on the bottom. Bring to a low boil.
Working in batches, boil the bagels 1 minute per side. Remove the boiled bagels to a silicone mat or parchment lined sheet pan sprinkled with corn meal.
Whisk an egg with a splash of water and pinch of salt, then brush it over the boiled bagels.
Bake the bagels for 20 minutes in a 425°F oven. Remove to a rack to cool at least 10 minutes before slicing, if you can bear to wait that long.