Flaw the first, the joist that was holding up the roof was cracked and bowing.
Apparently my little pergola excursion on Friday was even more dangerous than I thought. The other problem was that the swaying and flexing was a little more than I was comfortable with. But I didn't really seem to have the will power to do the right thing. Luckily, James arrived
and provided the will power for me. We fully replaced the broken joist, a tricky operation, and added all sorts of triangle bracing*, and joist hangers (!), and hurricane ties and such.