Preheat oven to 250 degrees.
Place the tomatoes, cut sides up, on a rack set on a baking sheet. Sprinkle with sea salt and place in the oven for about 2 hours. The tomatoes will dehydrate and intensify in flavor but should still be a bit soft. Remove from oven and set aside.
Meanwhile, pick over the lentils and discard any misshappen lentils and stones. Rinse the lentils. Place in a bowl and add water to cover generously. Let stand for 1 hour. Drain and set aside.
In a saucepan over medium heat, warm the olive oil. Add the onion, carrot, and celery and saute until golden brown, 5-7 minutes.
Add the stock, drained lentils, and potatoes and bring to a boil. Reduce the heat to low and simmer, uncovered, until the lentils and potatoes are tender, 30-40 minutes.
Add the reserved tomatoes and the rosemary and continue to simmer, stirring gently to retain the shape of the tomatoes, until the flavors have blended, about 15 minutes more. Season with salt and pepper.
Ladle into warmed bowls and serve hot.