How to Make It
Preheat the oven to 300°. Shake the nuts in a fine sieve to remove any fine crumbs. In a large ovenproof saucepan, heat the oil. Add the garlic and stir over moderate heat until fragrant, 30 seconds. Add the nuts and cook, stirring, until well toasted, about 5 minutes. Add the thyme, bay leaves, rosemary and wine and cook until the wine is evaporated, about 2 minutes. Add the 28 ounces of tomatoes and bring to a boil. Partially cover the ragout and bake for about 1 1/2 hours, until thickened and the nuts are tender.
In a stand mixer fitted with the paddle, combine the flour with the ricotta, egg and salt and beat at medium speed until a dough just starts to form, about 1 minute. Attach the dough hook and beat at medium speed until a ball forms, 2 to 3 minutes. Scrape the dough out onto an unfloured work surface and knead until smooth. Wrap in plastic and let stand at room temperature for 1 hour.
Cut the dough into 4 pieces. Work with 1 piece at a time; cover the remaining pieces with plastic wrap. On an unfloured work surface, roll the dough into a 1/2-inch-thick rope. Cut the rope into 1/4-inch pieces. Roll each piece into a 1 1/2-inch-long strip. Using the front side of a table knife, press each strip of dough against the work surface, pulling the knife toward you to form a curling strip. Transfer to a lightly floured baking sheet. Repeat with the remaining dough and let stand at room temperature for 30 minutes.
Stir the 15 ounces of tomatoes into the saucepan and bring the ragout to a simmer over moderately low heat. Stir in the butter and season with salt and pepper. Discard the thyme, bay leaves and rosemary.
In a saucepan of salted boiling water, cook the cavatelli until al dente, 3 to 5 minutes. Drain the pasta, reserving 1/2 cup of the cooking water. Toss the cavatelli with the reserved cooking water and half of the nut ragout (reserve the remaining ragout for another dish). Serve with the cheese.