Preheat the oven to 200°C (400°F/Gas 6). Put the ribs on a baking tray and roast for about 1 hour, or until golden brown.
Heat the wok until smoking. Add the oil and, when hot, add the ginger, garlic and sea salt and stir-fry until fragrant. Deglaze the wok with the shaoxing, then add the tomato and simmer until the tomato breaks down. Stir in the sugar and cook for about 5 minutes, allowing the sugar to caramelise a little. Stir in the bean paste, oyster sauce, soy sauce and tamarind water. Add the ribs to the wok, cover with the chicken stock and stir together. Simmer, covered, for 2 hours, or until the ribs are tender. Remove the lid and skim off any impurities. Remove the ribs, increase the heat and simmer until the sauce reduces and thickens. Pour the sauce over the ribs to serve.